; LLVM IR from eyangch/competitive-programming :: Codeforces/803 (e)

; 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

; 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 ptr, align 8
  %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 i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %20 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %21 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %22 = getelementptr i8, ptr %21, i64 -24
  %23 = load i64, ptr %22, align 8
  %24 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %23
  %25 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %24, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  %26 = 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)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  %28 = 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 %29 unwind label %42

29:                                               ; preds = %0
  %30 = load i32, ptr %2, align 4, !tbaa !8
  %31 = zext i32 %30 to i64
  %32 = call ptr @llvm.stacksave.p0()
  store ptr %32, ptr %7, align 8
  %33 = alloca i32, i64 %31, align 16
  store i64 %31, ptr %8, align 8
  %34 = load i32, ptr %2, align 4, !tbaa !8
  %35 = zext i32 %34 to i64
  %36 = alloca i32, i64 %35, align 16
  store i64 %35, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 0, ptr %10, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !8
  br label %37

37:                                               ; preds = %129, %29
  %38 = load i32, ptr %12, align 4, !tbaa !8
  %39 = load i32, ptr %2, align 4, !tbaa !8
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %46, label %41

41:                                               ; preds = %37
  store i32 2, ptr %13, align 4
  br label %132

42:                                               ; preds = %0
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %5, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %6, align 4
  br label %297

46:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %47 = load i32, ptr %3, align 4, !tbaa !8
  %48 = sub nsw i32 0, %47
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %14, align 4, !tbaa !8
  %50 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %51 unwind label %66

51:                                               ; preds = %46
  %52 = load i32, ptr %50, align 4, !tbaa !8
  store i32 %52, ptr %10, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %53 = load i32, ptr %3, align 4, !tbaa !8
  %54 = sub nsw i32 %53, 1
  store i32 %54, ptr %15, align 4, !tbaa !8
  %55 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %56 unwind label %70

56:                                               ; preds = %51
  %57 = load i32, ptr %55, align 4, !tbaa !8
  store i32 %57, ptr %11, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  %58 = load i32, ptr %10, align 4, !tbaa !8
  %59 = load i32, ptr %11, align 4, !tbaa !8
  %60 = icmp sgt i32 %58, %59
  br i1 %60, label %61, label %78

61:                                               ; preds = %56
  %62 = 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 %63 unwind label %74

63:                                               ; preds = %61
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %65 unwind label %74

65:                                               ; preds = %63
  store i32 0, ptr %1, align 4
  store i32 1, ptr %13, align 4
  br label %132

66:                                               ; preds = %46
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %5, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %134

70:                                               ; preds = %51
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %5, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %134

74:                                               ; preds = %112, %99, %78, %63, %61
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %5, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %6, align 4
  br label %134

78:                                               ; preds = %56
  %79 = load i32, ptr %10, align 4, !tbaa !8
  %80 = load i32, ptr %12, align 4, !tbaa !8
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds i32, ptr %33, i64 %81
  store i32 %79, ptr %82, align 4, !tbaa !8
  %83 = load i32, ptr %11, align 4, !tbaa !8
  %84 = load i32, ptr %12, align 4, !tbaa !8
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i32, ptr %36, i64 %85
  store i32 %83, ptr %86, align 4, !tbaa !8
  %87 = load i32, ptr %12, align 4, !tbaa !8
  %88 = sext i32 %87 to i64
  %89 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %88)
          to label %90 unwind label %74

90:                                               ; preds = %78
  %91 = load i8, ptr %89, align 1, !tbaa !11
  %92 = sext i8 %91 to i32
  %93 = icmp eq i32 %92, 76
  br i1 %93, label %94, label %99

94:                                               ; preds = %90
  %95 = load i32, ptr %10, align 4, !tbaa !8
  %96 = add nsw i32 %95, -1
  store i32 %96, ptr %10, align 4, !tbaa !8
  %97 = load i32, ptr %11, align 4, !tbaa !8
  %98 = add nsw i32 %97, -1
  store i32 %98, ptr %11, align 4, !tbaa !8
  br label %128

99:                                               ; preds = %90
  %100 = load i32, ptr %12, align 4, !tbaa !8
  %101 = sext i32 %100 to i64
  %102 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %101)
          to label %103 unwind label %74

103:                                              ; preds = %99
  %104 = load i8, ptr %102, align 1, !tbaa !11
  %105 = sext i8 %104 to i32
  %106 = icmp eq i32 %105, 87
  br i1 %106, label %107, label %112

107:                                              ; preds = %103
  %108 = load i32, ptr %10, align 4, !tbaa !8
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %10, align 4, !tbaa !8
  %110 = load i32, ptr %11, align 4, !tbaa !8
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %11, align 4, !tbaa !8
  br label %127

112:                                              ; preds = %103
  %113 = load i32, ptr %12, align 4, !tbaa !8
  %114 = sext i32 %113 to i64
  %115 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %114)
          to label %116 unwind label %74

116:                                              ; preds = %112
  %117 = load i8, ptr %115, align 1, !tbaa !11
  %118 = sext i8 %117 to i32
  %119 = icmp eq i32 %118, 68
  br i1 %119, label %120, label %121

120:                                              ; preds = %116
  br label %126

121:                                              ; preds = %116
  %122 = load i32, ptr %10, align 4, !tbaa !8
  %123 = add nsw i32 %122, -1
  store i32 %123, ptr %10, align 4, !tbaa !8
  %124 = load i32, ptr %11, align 4, !tbaa !8
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %11, align 4, !tbaa !8
  br label %126

126:                                              ; preds = %121, %120
  br label %127

127:                                              ; preds = %126, %107
  br label %128

128:                                              ; preds = %127, %94
  br label %129

129:                                              ; preds = %128
  %130 = load i32, ptr %12, align 4, !tbaa !8
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %12, align 4, !tbaa !8
  br label %37, !llvm.loop !12

132:                                              ; preds = %65, %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  %133 = load i32, ptr %13, align 4
  switch i32 %133, label %293 [
    i32 2, label %135
  ]

134:                                              ; preds = %74, %70, %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %296

135:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !8
  %136 = load i32, ptr %2, align 4, !tbaa !8
  %137 = zext i32 %136 to i64
  %138 = alloca i8, i64 %137, align 16
  store i64 %137, ptr %17, align 8
  %139 = load i32, ptr %10, align 4, !tbaa !8
  %140 = load i32, ptr %3, align 4, !tbaa !8
  %141 = icmp sle i32 %139, %140
  br i1 %141, label %142, label %148

142:                                              ; preds = %135
  %143 = load i32, ptr %11, align 4, !tbaa !8
  %144 = load i32, ptr %3, align 4, !tbaa !8
  %145 = icmp sge i32 %143, %144
  br i1 %145, label %146, label %148

146:                                              ; preds = %142
  %147 = load i32, ptr %3, align 4, !tbaa !8
  store i32 %147, ptr %16, align 4, !tbaa !8
  br label %162

148:                                              ; preds = %142, %135
  %149 = load i32, ptr %10, align 4, !tbaa !8
  %150 = load i32, ptr %3, align 4, !tbaa !8
  %151 = sub nsw i32 0, %150
  %152 = icmp sle i32 %149, %151
  br i1 %152, label %153, label %161

153:                                              ; preds = %148
  %154 = load i32, ptr %11, align 4, !tbaa !8
  %155 = load i32, ptr %3, align 4, !tbaa !8
  %156 = sub nsw i32 0, %155
  %157 = icmp sge i32 %154, %156
  br i1 %157, label %158, label %161

158:                                              ; preds = %153
  %159 = load i32, ptr %3, align 4, !tbaa !8
  %160 = sub nsw i32 0, %159
  store i32 %160, ptr %16, align 4, !tbaa !8
  br label %161

161:                                              ; preds = %158, %153, %148
  br label %162

162:                                              ; preds = %161, %146
  %163 = load i32, ptr %16, align 4, !tbaa !8
  %164 = icmp eq i32 %163, 0
  br i1 %164, label %165, label %174

165:                                              ; preds = %162
  %166 = 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 %167 unwind label %170

167:                                              ; preds = %165
  %168 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %166, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %169 unwind label %170

169:                                              ; preds = %167
  store i32 0, ptr %1, align 4
  store i32 1, ptr %13, align 4
  br label %291

170:                                              ; preds = %288, %167, %165
  %171 = landingpad { ptr, i32 }
          cleanup
  %172 = extractvalue { ptr, i32 } %171, 0
  store ptr %172, ptr %5, align 8
  %173 = extractvalue { ptr, i32 } %171, 1
  store i32 %173, ptr %6, align 4
  br label %292

174:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %175 = load i32, ptr %2, align 4, !tbaa !8
  %176 = sub nsw i32 %175, 1
  store i32 %176, ptr %18, align 4, !tbaa !8
  br label %177

177:                                              ; preds = %265, %174
  %178 = load i32, ptr %18, align 4, !tbaa !8
  %179 = icmp sge i32 %178, 0
  br i1 %179, label %181, label %180

180:                                              ; preds = %177
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %268

181:                                              ; preds = %177
  %182 = load i32, ptr %18, align 4, !tbaa !8
  %183 = sext i32 %182 to i64
  %184 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %183)
          to label %185 unwind label %208

185:                                              ; preds = %181
  %186 = load i8, ptr %184, align 1, !tbaa !11
  %187 = sext i8 %186 to i32
  %188 = icmp ne i32 %187, 63
  br i1 %188, label %189, label %225

189:                                              ; preds = %185
  %190 = load i32, ptr %18, align 4, !tbaa !8
  %191 = sext i32 %190 to i64
  %192 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %191)
          to label %193 unwind label %208

193:                                              ; preds = %189
  %194 = load i8, ptr %192, align 1, !tbaa !11
  %195 = load i32, ptr %18, align 4, !tbaa !8
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds i8, ptr %138, i64 %196
  store i8 %194, ptr %197, align 1, !tbaa !11
  %198 = load i32, ptr %18, align 4, !tbaa !8
  %199 = sext i32 %198 to i64
  %200 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %199)
          to label %201 unwind label %208

201:                                              ; preds = %193
  %202 = load i8, ptr %200, align 1, !tbaa !11
  %203 = sext i8 %202 to i32
  %204 = icmp eq i32 %203, 76
  br i1 %204, label %205, label %212

205:                                              ; preds = %201
  %206 = load i32, ptr %16, align 4, !tbaa !8
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr %16, align 4, !tbaa !8
  br label %224

208:                                              ; preds = %212, %193, %189, %181
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %5, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %292

212:                                              ; preds = %201
  %213 = load i32, ptr %18, align 4, !tbaa !8
  %214 = sext i32 %213 to i64
  %215 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %214)
          to label %216 unwind label %208

216:                                              ; preds = %212
  %217 = load i8, ptr %215, align 1, !tbaa !11
  %218 = sext i8 %217 to i32
  %219 = icmp eq i32 %218, 87
  br i1 %219, label %220, label %223

220:                                              ; preds = %216
  %221 = load i32, ptr %16, align 4, !tbaa !8
  %222 = add nsw i32 %221, -1
  store i32 %222, ptr %16, align 4, !tbaa !8
  br label %223

223:                                              ; preds = %220, %216
  br label %224

224:                                              ; preds = %223, %205
  br label %264

225:                                              ; preds = %185
  %226 = load i32, ptr %18, align 4, !tbaa !8
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds i32, ptr %33, i64 %227
  %229 = load i32, ptr %228, align 4, !tbaa !8
  %230 = load i32, ptr %16, align 4, !tbaa !8
  %231 = icmp sle i32 %229, %230
  br i1 %231, label %232, label %243

232:                                              ; preds = %225
  %233 = load i32, ptr %18, align 4, !tbaa !8
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds i32, ptr %36, i64 %234
  %236 = load i32, ptr %235, align 4, !tbaa !8
  %237 = load i32, ptr %16, align 4, !tbaa !8
  %238 = icmp sge i32 %236, %237
  br i1 %238, label %239, label %243

239:                                              ; preds = %232
  %240 = load i32, ptr %18, align 4, !tbaa !8
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds i8, ptr %138, i64 %241
  store i8 68, ptr %242, align 1, !tbaa !11
  br label %263

243:                                              ; preds = %232, %225
  %244 = load i32, ptr %18, align 4, !tbaa !8
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds i32, ptr %33, i64 %245
  %247 = load i32, ptr %246, align 4, !tbaa !8
  %248 = load i32, ptr %16, align 4, !tbaa !8
  %249 = icmp sgt i32 %247, %248
  br i1 %249, label %250, label %256

250:                                              ; preds = %243
  %251 = load i32, ptr %16, align 4, !tbaa !8
  %252 = add nsw i32 %251, 1
  store i32 %252, ptr %16, align 4, !tbaa !8
  %253 = load i32, ptr %18, align 4, !tbaa !8
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds i8, ptr %138, i64 %254
  store i8 76, ptr %255, align 1, !tbaa !11
  br label %262

256:                                              ; preds = %243
  %257 = load i32, ptr %16, align 4, !tbaa !8
  %258 = add nsw i32 %257, -1
  store i32 %258, ptr %16, align 4, !tbaa !8
  %259 = load i32, ptr %18, align 4, !tbaa !8
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds i8, ptr %138, i64 %260
  store i8 87, ptr %261, align 1, !tbaa !11
  br label %262

262:                                              ; preds = %256, %250
  br label %263

263:                                              ; preds = %262, %239
  br label %264

264:                                              ; preds = %263, %224
  br label %265

265:                                              ; preds = %264
  %266 = load i32, ptr %18, align 4, !tbaa !8
  %267 = add nsw i32 %266, -1
  store i32 %267, ptr %18, align 4, !tbaa !8
  br label %177, !llvm.loop !14

268:                                              ; preds = %180
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 0, ptr %19, align 4, !tbaa !8
  br label %269

269:                                              ; preds = %281, %268
  %270 = load i32, ptr %19, align 4, !tbaa !8
  %271 = load i32, ptr %2, align 4, !tbaa !8
  %272 = icmp slt i32 %270, %271
  br i1 %272, label %274, label %273

273:                                              ; preds = %269
  store i32 8, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %288

274:                                              ; preds = %269
  %275 = load i32, ptr %19, align 4, !tbaa !8
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds i8, ptr %138, i64 %276
  %278 = load i8, ptr %277, align 1, !tbaa !11
  %279 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %278)
          to label %280 unwind label %284

280:                                              ; preds = %274
  br label %281

281:                                              ; preds = %280
  %282 = load i32, ptr %19, align 4, !tbaa !8
  %283 = add nsw i32 %282, 1
  store i32 %283, ptr %19, align 4, !tbaa !8
  br label %269, !llvm.loop !15

284:                                              ; preds = %274
  %285 = landingpad { ptr, i32 }
          cleanup
  %286 = extractvalue { ptr, i32 } %285, 0
  store ptr %286, ptr %5, align 8
  %287 = extractvalue { ptr, i32 } %285, 1
  store i32 %287, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %292

288:                                              ; preds = %273
  %289 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %290 unwind label %170

290:                                              ; preds = %288
  store i32 0, ptr %1, align 4
  store i32 1, ptr %13, align 4
  br label %291

291:                                              ; preds = %290, %169
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %293

292:                                              ; preds = %284, %208, %170
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %296

293:                                              ; preds = %291, %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  %294 = load ptr, ptr %7, align 8
  call void @llvm.stackrestore.p0(ptr %294)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %295 = load i32, ptr %1, align 4
  ret i32 %295

296:                                              ; preds = %292, %134
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %297

297:                                              ; preds = %296, %42
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %298

298:                                              ; preds = %297
  %299 = load ptr, ptr %5, align 8
  %300 = load i32, ptr %6, align 4
  %301 = insertvalue { ptr, i32 } poison, ptr %299, 0
  %302 = insertvalue { ptr, i32 } %301, i32 %300, 1
  resume { ptr, i32 } %302
}

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: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

; 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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

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

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

; 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_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #6

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

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


; 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

; 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 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %9 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %10 = getelementptr i8, ptr %9, i64 -24
  %11 = load i64, ptr %10, align 8
  %12 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %11
  %13 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %12, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %14 = 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)
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  %16 = 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 %17 unwind label %25

17:                                               ; preds = %0
  %18 = load i32, ptr %1, align 4, !tbaa !8
  %19 = zext i32 %18 to i64
  %20 = call ptr @llvm.stacksave.p0()
  %21 = alloca i32, i64 %19, align 16
  %22 = load i32, ptr %1, align 4, !tbaa !8
  %23 = zext i32 %22 to i64
  %24 = alloca i32, i64 %23, align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 0, ptr %4, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  store i32 0, ptr %5, align 4, !tbaa !8
  %.not66 = icmp sgt i32 %22, 0
  br i1 %.not66, label %.lr.ph, label %.critedge

25:                                               ; preds = %0
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %134

.lr.ph:                                           ; preds = %17, %72
  %indvars.iv = phi i64 [ %indvars.iv.next, %72 ], [ 0, %17 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  %27 = load i32, ptr %2, align 4, !tbaa !8
  %28 = sub i32 1, %27
  store i32 %28, ptr %6, align 4, !tbaa !8
  %29 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %30 = load i32, ptr %29, align 4, !tbaa !8
  store i32 %30, ptr %4, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  %31 = load i32, ptr %2, align 4, !tbaa !8
  %32 = add nsw i32 %31, -1
  store i32 %32, ptr %7, align 4, !tbaa !8
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %34 = load i32, ptr %33, align 4, !tbaa !8
  store i32 %34, ptr %5, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  %35 = load i32, ptr %4, align 4, !tbaa !8
  %36 = icmp sgt i32 %35, %34
  br i1 %36, label %37, label %43

37:                                               ; preds = %.lr.ph
  %38 = 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 %39 unwind label %41

39:                                               ; preds = %37
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %132 unwind label %41

41:                                               ; preds = %39, %37
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %133

43:                                               ; preds = %.lr.ph
  %44 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv
  store i32 %35, ptr %44, align 4, !tbaa !8
  %45 = getelementptr inbounds i32, ptr %24, i64 %indvars.iv
  store i32 %34, ptr %45, align 4, !tbaa !8
  %46 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %indvars.iv)
  %47 = load i8, ptr %46, align 1, !tbaa !11
  %48 = icmp eq i8 %47, 76
  br i1 %48, label %49, label %54

49:                                               ; preds = %43
  %50 = load i32, ptr %4, align 4, !tbaa !8
  %51 = add nsw i32 %50, -1
  store i32 %51, ptr %4, align 4, !tbaa !8
  %52 = load i32, ptr %5, align 4, !tbaa !8
  %53 = add nsw i32 %52, -1
  store i32 %53, ptr %5, align 4, !tbaa !8
  br label %72

54:                                               ; preds = %43
  %55 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %indvars.iv)
  %56 = load i8, ptr %55, align 1, !tbaa !11
  %57 = icmp eq i8 %56, 87
  br i1 %57, label %58, label %63

58:                                               ; preds = %54
  %59 = load i32, ptr %4, align 4, !tbaa !8
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %4, align 4, !tbaa !8
  %61 = load i32, ptr %5, align 4, !tbaa !8
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %5, align 4, !tbaa !8
  br label %72

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

67:                                               ; preds = %63
  %68 = load i32, ptr %4, align 4, !tbaa !8
  %69 = add nsw i32 %68, -1
  store i32 %69, ptr %4, align 4, !tbaa !8
  %70 = load i32, ptr %5, align 4, !tbaa !8
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %5, align 4, !tbaa !8
  br label %72

72:                                               ; preds = %49, %67, %63, %58
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %73 = load i32, ptr %1, align 4, !tbaa !8
  %74 = sext i32 %73 to i64
  %.not = icmp slt i64 %indvars.iv.next, %74
  br i1 %.not, label %.lr.ph, label %.critedge.loopexit, !llvm.loop !12

.critedge.loopexit:                               ; preds = %72
  %.pre = load i32, ptr %4, align 4, !tbaa !8
  %.pre81 = load i32, ptr %5, align 4
  %.pre83 = zext i32 %73 to i64
  %75 = icmp sgt i32 %73, 0
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %17
  %.pre-phi = phi i64 [ %.pre83, %.critedge.loopexit ], [ %23, %17 ]
  %76 = phi i32 [ %.pre81, %.critedge.loopexit ], [ 0, %17 ]
  %77 = phi i32 [ %.pre, %.critedge.loopexit ], [ 0, %17 ]
  %78 = phi i1 [ %75, %.critedge.loopexit ], [ false, %17 ]
  %79 = alloca i8, i64 %.pre-phi, align 16
  %80 = load i32, ptr %2, align 4, !tbaa !8
  %.not51 = icmp sgt i32 %77, %80
  %.not52 = icmp slt i32 %76, %80
  %or.cond = select i1 %.not51, i1 true, i1 %.not52
  br i1 %or.cond, label %81, label %83

81:                                               ; preds = %.critedge
  %82 = sub nsw i32 0, %80
  %.not53 = icmp sgt i32 %77, %82
  %.not54 = icmp slt i32 %76, %82
  %or.cond61 = select i1 %.not53, i1 true, i1 %.not54
  br i1 %or.cond61, label %.thread, label %83

83:                                               ; preds = %81, %.critedge
  %.037 = phi i32 [ %80, %.critedge ], [ %82, %81 ]
  %84 = icmp eq i32 %.037, 0
  br i1 %84, label %.thread, label %.preheader65

.preheader65:                                     ; preds = %83
  br i1 %78, label %.lr.ph71, label %._crit_edge.invoke

.thread:                                          ; preds = %81, %83
  %85 = 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 %._crit_edge.invoke unwind label %86

86:                                               ; preds = %._crit_edge.invoke, %.thread
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %133

.preheader:                                       ; preds = %119
  %.pre82 = load i32, ptr %1, align 4, !tbaa !8
  %88 = icmp sgt i32 %.pre82, 0
  br i1 %88, label %.lr.ph73, label %._crit_edge.invoke

.lr.ph71:                                         ; preds = %.preheader65, %119
  %indvars.iv75 = phi i64 [ %indvars.iv.next76, %119 ], [ %.pre-phi, %.preheader65 ]
  %.13869 = phi i32 [ %.239, %119 ], [ %.037, %.preheader65 ]
  %indvars.iv.next76 = add nsw i64 %indvars.iv75, -1
  %89 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %indvars.iv.next76)
  %90 = load i8, ptr %89, align 1, !tbaa !11
  %.not55 = icmp eq i8 %90, 63
  br i1 %.not55, label %105, label %91

91:                                               ; preds = %.lr.ph71
  %92 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %indvars.iv.next76)
  %93 = load i8, ptr %92, align 1, !tbaa !11
  %94 = getelementptr inbounds i8, ptr %79, i64 %indvars.iv.next76
  store i8 %93, ptr %94, align 1, !tbaa !11
  %95 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %indvars.iv.next76)
  %96 = load i8, ptr %95, align 1, !tbaa !11
  %97 = icmp eq i8 %96, 76
  br i1 %97, label %98, label %100

98:                                               ; preds = %91
  %99 = add nsw i32 %.13869, 1
  br label %119

100:                                              ; preds = %91
  %101 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %indvars.iv.next76)
  %102 = load i8, ptr %101, align 1, !tbaa !11
  %103 = icmp eq i8 %102, 87
  %104 = sext i1 %103 to i32
  %spec.select = add nsw i32 %.13869, %104
  br label %119

105:                                              ; preds = %.lr.ph71
  %106 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv.next76
  %107 = load i32, ptr %106, align 4, !tbaa !8
  %.not56 = icmp sgt i32 %107, %.13869
  br i1 %.not56, label %113, label %108

108:                                              ; preds = %105
  %109 = getelementptr inbounds i32, ptr %24, i64 %indvars.iv.next76
  %110 = load i32, ptr %109, align 4, !tbaa !8
  %.not57 = icmp slt i32 %110, %.13869
  br i1 %.not57, label %116, label %111

111:                                              ; preds = %108
  %112 = getelementptr inbounds i8, ptr %79, i64 %indvars.iv.next76
  store i8 68, ptr %112, align 1, !tbaa !11
  br label %119

113:                                              ; preds = %105
  %114 = add nsw i32 %.13869, 1
  %115 = getelementptr inbounds i8, ptr %79, i64 %indvars.iv.next76
  store i8 76, ptr %115, align 1, !tbaa !11
  br label %119

116:                                              ; preds = %108
  %117 = add nsw i32 %.13869, -1
  %118 = getelementptr inbounds i8, ptr %79, i64 %indvars.iv.next76
  store i8 87, ptr %118, align 1, !tbaa !11
  br label %119

119:                                              ; preds = %100, %98, %113, %116, %111
  %.239 = phi i32 [ %99, %98 ], [ %.13869, %111 ], [ %114, %113 ], [ %117, %116 ], [ %spec.select, %100 ]
  %120 = icmp ugt i64 %indvars.iv75, 1
  br i1 %120, label %.lr.ph71, label %.preheader, !llvm.loop !14

._crit_edge.invoke:                               ; preds = %126, %.thread, %.preheader, %.preheader65
  %121 = phi ptr [ @_ZSt4cout, %.preheader65 ], [ @_ZSt4cout, %.preheader ], [ %85, %.thread ], [ @_ZSt4cout, %126 ]
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %121, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %132 unwind label %86

.lr.ph73:                                         ; preds = %.preheader, %126
  %indvars.iv78 = phi i64 [ %indvars.iv.next79, %126 ], [ 0, %.preheader ]
  %123 = getelementptr inbounds i8, ptr %79, i64 %indvars.iv78
  %124 = load i8, ptr %123, align 1, !tbaa !11
  %125 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %124)
          to label %126 unwind label %130

126:                                              ; preds = %.lr.ph73
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %127 = load i32, ptr %1, align 4, !tbaa !8
  %128 = sext i32 %127 to i64
  %129 = icmp slt i64 %indvars.iv.next79, %128
  br i1 %129, label %.lr.ph73, label %._crit_edge.invoke, !llvm.loop !15

130:                                              ; preds = %.lr.ph73
  %131 = landingpad { ptr, i32 }
          cleanup
  br label %133

132:                                              ; preds = %._crit_edge.invoke, %39
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.stackrestore.p0(ptr %20)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0

133:                                              ; preds = %86, %130, %41
  %.pn.pn = phi { ptr, i32 } [ %42, %41 ], [ %87, %86 ], [ %131, %130 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  br label %134

134:                                              ; preds = %133, %25
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %133 ], [ %26, %25 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn.pn.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

; 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 nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

; 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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

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

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

; 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_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #6

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

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


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