; LLVM IR from eyangch/competitive-programming :: Codeforces/1365 (d)

; 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::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%"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 i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  %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 i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i8, align 1
  %19 = alloca %"class.std::queue", align 8
  %20 = alloca %"struct.std::pair", align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca %"struct.std::pair", align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %"struct.std::pair", align 4
  %27 = alloca i32, align 4
  %28 = alloca %"struct.std::pair", align 4
  %29 = alloca i32, align 4
  %30 = alloca %"struct.std::pair", align 4
  %31 = alloca i32, align 4
  %32 = alloca %"struct.std::pair", align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %36 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %37 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %38 = getelementptr i8, ptr %37, i64 -24
  %39 = load i64, ptr %38, align 8
  %40 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %39
  %41 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %40, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #9
  %42 = 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 %43

43:                                               ; preds = %569, %566, %0
  %44 = load i32, ptr %2, align 4, !tbaa !8
  %45 = add nsw i32 %44, -1
  store i32 %45, ptr %2, align 4, !tbaa !8
  %46 = icmp ne i32 %44, 0
  br i1 %46, label %47, label %581

47:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #9
  %48 = 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)
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %48, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %50 = load i32, ptr %3, align 4, !tbaa !8
  %51 = zext i32 %50 to i64
  %52 = call ptr @llvm.stacksave.p0()
  store ptr %52, ptr %5, align 8
  %53 = alloca %"class.std::__cxx11::basic_string", i64 %51, align 16
  store i64 %51, ptr %6, align 8
  %54 = icmp eq i64 %51, 0
  br i1 %54, label %61, label %55

55:                                               ; preds = %47
  %56 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %51
  br label %57

57:                                               ; preds = %57, %55
  %58 = phi ptr [ %53, %55 ], [ %59, %57 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %58) #9
  %59 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %58, i64 1
  %60 = icmp eq ptr %59, %56
  br i1 %60, label %61, label %57

61:                                               ; preds = %57, %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  store i32 0, ptr %7, align 4, !tbaa !8
  br label %62

62:                                               ; preds = %73, %61
  %63 = load i32, ptr %7, align 4, !tbaa !8
  %64 = load i32, ptr %3, align 4, !tbaa !8
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  br label %80

67:                                               ; preds = %62
  %68 = load i32, ptr %7, align 4, !tbaa !8
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %69
  %71 = 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) %70)
          to label %72 unwind label %76

72:                                               ; preds = %67
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %7, align 4, !tbaa !8
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %7, align 4, !tbaa !8
  br label %62, !llvm.loop !11

76:                                               ; preds = %67
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %8, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  br label %573

80:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #9
  store i8 1, ptr %10, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  store i32 0, ptr %11, align 4, !tbaa !8
  br label %81

81:                                               ; preds = %181, %80
  %82 = load i32, ptr %11, align 4, !tbaa !8
  %83 = load i32, ptr %3, align 4, !tbaa !8
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %86, label %85

85:                                               ; preds = %81
  store i32 7, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  br label %184

86:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  store i32 0, ptr %13, align 4, !tbaa !8
  br label %87

87:                                               ; preds = %177, %86
  %88 = load i32, ptr %13, align 4, !tbaa !8
  %89 = load i32, ptr %4, align 4, !tbaa !8
  %90 = icmp slt i32 %88, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %87
  store i32 10, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %180

92:                                               ; preds = %87
  %93 = load i32, ptr %11, align 4, !tbaa !8
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %94
  %96 = load i32, ptr %13, align 4, !tbaa !8
  %97 = sext i32 %96 to i64
  %98 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %95, i64 noundef %97)
          to label %99 unwind label %119

99:                                               ; preds = %92
  %100 = load i8, ptr %98, align 1, !tbaa !15
  %101 = sext i8 %100 to i32
  %102 = icmp eq i32 %101, 66
  br i1 %102, label %103, label %176

103:                                              ; preds = %99
  %104 = load i32, ptr %11, align 4, !tbaa !8
  %105 = icmp sgt i32 %104, 0
  br i1 %105, label %106, label %123

106:                                              ; preds = %103
  %107 = load i32, ptr %11, align 4, !tbaa !8
  %108 = sub nsw i32 %107, 1
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %109
  %111 = load i32, ptr %13, align 4, !tbaa !8
  %112 = sext i32 %111 to i64
  %113 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %110, i64 noundef %112)
          to label %114 unwind label %119

114:                                              ; preds = %106
  %115 = load i8, ptr %113, align 1, !tbaa !15
  %116 = sext i8 %115 to i32
  %117 = icmp eq i32 %116, 71
  br i1 %117, label %118, label %123

118:                                              ; preds = %114
  store i8 0, ptr %10, align 1, !tbaa !13
  br label %123

119:                                              ; preds = %162, %144, %128, %106, %92
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %8, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  br label %572

123:                                              ; preds = %118, %114, %103
  %124 = load i32, ptr %11, align 4, !tbaa !8
  %125 = load i32, ptr %3, align 4, !tbaa !8
  %126 = sub nsw i32 %125, 1
  %127 = icmp slt i32 %124, %126
  br i1 %127, label %128, label %141

128:                                              ; preds = %123
  %129 = load i32, ptr %11, align 4, !tbaa !8
  %130 = add nsw i32 %129, 1
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %131
  %133 = load i32, ptr %13, 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) %132, i64 noundef %134)
          to label %136 unwind label %119

136:                                              ; preds = %128
  %137 = load i8, ptr %135, align 1, !tbaa !15
  %138 = sext i8 %137 to i32
  %139 = icmp eq i32 %138, 71
  br i1 %139, label %140, label %141

140:                                              ; preds = %136
  store i8 0, ptr %10, align 1, !tbaa !13
  br label %141

141:                                              ; preds = %140, %136, %123
  %142 = load i32, ptr %13, align 4, !tbaa !8
  %143 = icmp sgt i32 %142, 0
  br i1 %143, label %144, label %157

144:                                              ; preds = %141
  %145 = load i32, ptr %11, align 4, !tbaa !8
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %146
  %148 = load i32, ptr %13, align 4, !tbaa !8
  %149 = sub nsw i32 %148, 1
  %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) %147, i64 noundef %150)
          to label %152 unwind label %119

152:                                              ; preds = %144
  %153 = load i8, ptr %151, align 1, !tbaa !15
  %154 = sext i8 %153 to i32
  %155 = icmp eq i32 %154, 71
  br i1 %155, label %156, label %157

156:                                              ; preds = %152
  store i8 0, ptr %10, align 1, !tbaa !13
  br label %157

157:                                              ; preds = %156, %152, %141
  %158 = load i32, ptr %13, align 4, !tbaa !8
  %159 = load i32, ptr %4, align 4, !tbaa !8
  %160 = sub nsw i32 %159, 1
  %161 = icmp slt i32 %158, %160
  br i1 %161, label %162, label %175

162:                                              ; preds = %157
  %163 = load i32, ptr %11, align 4, !tbaa !8
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %164
  %166 = load i32, ptr %13, align 4, !tbaa !8
  %167 = add nsw i32 %166, 1
  %168 = sext i32 %167 to i64
  %169 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %165, i64 noundef %168)
          to label %170 unwind label %119

170:                                              ; preds = %162
  %171 = load i8, ptr %169, align 1, !tbaa !15
  %172 = sext i8 %171 to i32
  %173 = icmp eq i32 %172, 71
  br i1 %173, label %174, label %175

174:                                              ; preds = %170
  store i8 0, ptr %10, align 1, !tbaa !13
  br label %175

175:                                              ; preds = %174, %170, %157
  br label %176

176:                                              ; preds = %175, %99
  br label %177

177:                                              ; preds = %176
  %178 = load i32, ptr %13, align 4, !tbaa !8
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %13, align 4, !tbaa !8
  br label %87, !llvm.loop !16

180:                                              ; preds = %91
  br label %181

181:                                              ; preds = %180
  %182 = load i32, ptr %11, align 4, !tbaa !8
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %11, align 4, !tbaa !8
  br label %81, !llvm.loop !17

184:                                              ; preds = %85
  %185 = load i8, ptr %10, align 1, !tbaa !13, !range !18, !noundef !19
  %186 = trunc i8 %185 to i1
  br i1 %186, label %196, label %187

187:                                              ; preds = %184
  %188 = 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 %189 unwind label %192

189:                                              ; preds = %187
  %190 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %188, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %191 unwind label %192

191:                                              ; preds = %189
  store i32 2, ptr %12, align 4
  br label %559, !llvm.loop !20

192:                                              ; preds = %189, %187
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %8, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %9, align 4
  br label %572

196:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  store i32 0, ptr %14, align 4, !tbaa !8
  br label %197

197:                                              ; preds = %329, %196
  %198 = load i32, ptr %14, align 4, !tbaa !8
  %199 = load i32, ptr %3, align 4, !tbaa !8
  %200 = icmp slt i32 %198, %199
  br i1 %200, label %202, label %201

201:                                              ; preds = %197
  store i32 13, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  br label %332

202:                                              ; preds = %197
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  store i32 0, ptr %15, align 4, !tbaa !8
  br label %203

203:                                              ; preds = %325, %202
  %204 = load i32, ptr %15, align 4, !tbaa !8
  %205 = load i32, ptr %4, align 4, !tbaa !8
  %206 = icmp slt i32 %204, %205
  br i1 %206, label %208, label %207

207:                                              ; preds = %203
  store i32 16, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  br label %328

208:                                              ; preds = %203
  %209 = load i32, ptr %14, align 4, !tbaa !8
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %210
  %212 = load i32, ptr %15, align 4, !tbaa !8
  %213 = sext i32 %212 to i64
  %214 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %211, i64 noundef %213)
          to label %215 unwind label %243

215:                                              ; preds = %208
  %216 = load i8, ptr %214, align 1, !tbaa !15
  %217 = sext i8 %216 to i32
  %218 = icmp eq i32 %217, 66
  br i1 %218, label %219, label %324

219:                                              ; preds = %215
  %220 = load i32, ptr %14, align 4, !tbaa !8
  %221 = icmp sgt i32 %220, 0
  br i1 %221, label %222, label %247

222:                                              ; preds = %219
  %223 = load i32, ptr %14, align 4, !tbaa !8
  %224 = sub nsw i32 %223, 1
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %225
  %227 = load i32, ptr %15, align 4, !tbaa !8
  %228 = sext i32 %227 to i64
  %229 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %226, i64 noundef %228)
          to label %230 unwind label %243

230:                                              ; preds = %222
  %231 = load i8, ptr %229, align 1, !tbaa !15
  %232 = sext i8 %231 to i32
  %233 = icmp ne i32 %232, 66
  br i1 %233, label %234, label %247

234:                                              ; preds = %230
  %235 = load i32, ptr %14, align 4, !tbaa !8
  %236 = sub nsw i32 %235, 1
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %237
  %239 = load i32, ptr %15, align 4, !tbaa !8
  %240 = sext i32 %239 to i64
  %241 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %238, i64 noundef %240)
          to label %242 unwind label %243

242:                                              ; preds = %234
  store i8 35, ptr %241, align 1, !tbaa !15
  br label %247

243:                                              ; preds = %314, %302, %288, %276, %264, %252, %234, %222, %208
  %244 = landingpad { ptr, i32 }
          cleanup
  %245 = extractvalue { ptr, i32 } %244, 0
  store ptr %245, ptr %8, align 8
  %246 = extractvalue { ptr, i32 } %244, 1
  store i32 %246, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  br label %572

247:                                              ; preds = %242, %230, %219
  %248 = load i32, ptr %14, align 4, !tbaa !8
  %249 = load i32, ptr %3, align 4, !tbaa !8
  %250 = sub nsw i32 %249, 1
  %251 = icmp slt i32 %248, %250
  br i1 %251, label %252, label %273

252:                                              ; preds = %247
  %253 = load i32, ptr %14, align 4, !tbaa !8
  %254 = add nsw i32 %253, 1
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %255
  %257 = load i32, ptr %15, align 4, !tbaa !8
  %258 = sext i32 %257 to i64
  %259 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %256, i64 noundef %258)
          to label %260 unwind label %243

260:                                              ; preds = %252
  %261 = load i8, ptr %259, align 1, !tbaa !15
  %262 = sext i8 %261 to i32
  %263 = icmp ne i32 %262, 66
  br i1 %263, label %264, label %273

264:                                              ; preds = %260
  %265 = load i32, ptr %14, align 4, !tbaa !8
  %266 = add nsw i32 %265, 1
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %267
  %269 = load i32, ptr %15, align 4, !tbaa !8
  %270 = sext i32 %269 to i64
  %271 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %268, i64 noundef %270)
          to label %272 unwind label %243

272:                                              ; preds = %264
  store i8 35, ptr %271, align 1, !tbaa !15
  br label %273

273:                                              ; preds = %272, %260, %247
  %274 = load i32, ptr %15, align 4, !tbaa !8
  %275 = icmp sgt i32 %274, 0
  br i1 %275, label %276, label %297

276:                                              ; preds = %273
  %277 = load i32, ptr %14, align 4, !tbaa !8
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %278
  %280 = load i32, ptr %15, align 4, !tbaa !8
  %281 = sub nsw i32 %280, 1
  %282 = sext i32 %281 to i64
  %283 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %279, i64 noundef %282)
          to label %284 unwind label %243

284:                                              ; preds = %276
  %285 = load i8, ptr %283, align 1, !tbaa !15
  %286 = sext i8 %285 to i32
  %287 = icmp ne i32 %286, 66
  br i1 %287, label %288, label %297

288:                                              ; preds = %284
  %289 = load i32, ptr %14, align 4, !tbaa !8
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %290
  %292 = load i32, ptr %15, align 4, !tbaa !8
  %293 = sub nsw i32 %292, 1
  %294 = sext i32 %293 to i64
  %295 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %291, i64 noundef %294)
          to label %296 unwind label %243

296:                                              ; preds = %288
  store i8 35, ptr %295, align 1, !tbaa !15
  br label %297

297:                                              ; preds = %296, %284, %273
  %298 = load i32, ptr %15, align 4, !tbaa !8
  %299 = load i32, ptr %4, align 4, !tbaa !8
  %300 = sub nsw i32 %299, 1
  %301 = icmp slt i32 %298, %300
  br i1 %301, label %302, label %323

302:                                              ; preds = %297
  %303 = load i32, ptr %14, align 4, !tbaa !8
  %304 = sext i32 %303 to i64
  %305 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %304
  %306 = load i32, ptr %15, align 4, !tbaa !8
  %307 = add nsw i32 %306, 1
  %308 = sext i32 %307 to i64
  %309 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %305, i64 noundef %308)
          to label %310 unwind label %243

310:                                              ; preds = %302
  %311 = load i8, ptr %309, align 1, !tbaa !15
  %312 = sext i8 %311 to i32
  %313 = icmp ne i32 %312, 66
  br i1 %313, label %314, label %323

314:                                              ; preds = %310
  %315 = load i32, ptr %14, align 4, !tbaa !8
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %316
  %318 = load i32, ptr %15, align 4, !tbaa !8
  %319 = add nsw i32 %318, 1
  %320 = sext i32 %319 to i64
  %321 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %317, i64 noundef %320)
          to label %322 unwind label %243

322:                                              ; preds = %314
  store i8 35, ptr %321, align 1, !tbaa !15
  br label %323

323:                                              ; preds = %322, %310, %297
  br label %324

324:                                              ; preds = %323, %215
  br label %325

325:                                              ; preds = %324
  %326 = load i32, ptr %15, align 4, !tbaa !8
  %327 = add nsw i32 %326, 1
  store i32 %327, ptr %15, align 4, !tbaa !8
  br label %203, !llvm.loop !21

328:                                              ; preds = %207
  br label %329

329:                                              ; preds = %328
  %330 = load i32, ptr %14, align 4, !tbaa !8
  %331 = add nsw i32 %330, 1
  store i32 %331, ptr %14, align 4, !tbaa !8
  br label %197, !llvm.loop !22

332:                                              ; preds = %201
  %333 = load i32, ptr %3, align 4, !tbaa !8
  %334 = zext i32 %333 to i64
  %335 = load i32, ptr %4, align 4, !tbaa !8
  %336 = zext i32 %335 to i64
  %337 = mul nuw i64 %334, %336
  %338 = alloca i8, i64 %337, align 16
  store i64 %334, ptr %16, align 8
  store i64 %336, ptr %17, align 8
  %339 = mul nsw i64 0, %336
  %340 = getelementptr inbounds i8, ptr %338, i64 %339
  %341 = load i32, ptr %3, align 4, !tbaa !8
  %342 = sub nsw i32 %341, 1
  %343 = sext i32 %342 to i64
  %344 = mul nsw i64 %343, %336
  %345 = getelementptr inbounds i8, ptr %338, i64 %344
  %346 = load i32, ptr %4, align 4, !tbaa !8
  %347 = sext i32 %346 to i64
  %348 = getelementptr inbounds i8, ptr %345, i64 %347
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #9
  store i8 0, ptr %18, align 1, !tbaa !13
  invoke void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef %340, ptr noundef %348, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %349 unwind label %404

349:                                              ; preds = %332
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #9
  call void @llvm.lifetime.start.p0(i64 80, ptr %19) #9
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %19)
          to label %350 unwind label %408

350:                                              ; preds = %349
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  %351 = load i32, ptr %3, align 4, !tbaa !8
  %352 = sub nsw i32 %351, 1
  store i32 %352, ptr %21, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  %353 = load i32, ptr %4, align 4, !tbaa !8
  %354 = sub nsw i32 %353, 1
  store i32 %354, ptr %22, align 4, !tbaa !8
  invoke void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %355 unwind label %412

355:                                              ; preds = %350
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %19, ptr noundef nonnull align 4 dereferenceable(8) %20)
          to label %356 unwind label %412

356:                                              ; preds = %355
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  br label %357

357:                                              ; preds = %454, %452, %356
  %358 = invoke noundef zeroext i1 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %19)
          to label %359 unwind label %416

359:                                              ; preds = %357
  %360 = xor i1 %358, true
  br i1 %360, label %361, label %473

361:                                              ; preds = %359
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  %362 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %19)
          to label %363 unwind label %420

363:                                              ; preds = %361
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %362, i64 8, i1 false)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %19)
          to label %364 unwind label %420

364:                                              ; preds = %363
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  %365 = getelementptr inbounds %"struct.std::pair", ptr %23, i32 0, i32 0
  %366 = load i32, ptr %365, align 4, !tbaa !23
  store i32 %366, ptr %24, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  %367 = getelementptr inbounds %"struct.std::pair", ptr %23, i32 0, i32 1
  %368 = load i32, ptr %367, align 4, !tbaa !25
  store i32 %368, ptr %25, align 4, !tbaa !8
  %369 = load i32, ptr %24, align 4, !tbaa !8
  %370 = icmp slt i32 %369, 0
  br i1 %370, label %403, label %371

371:                                              ; preds = %364
  %372 = load i32, ptr %24, align 4, !tbaa !8
  %373 = load i32, ptr %3, align 4, !tbaa !8
  %374 = icmp sge i32 %372, %373
  br i1 %374, label %403, label %375

375:                                              ; preds = %371
  %376 = load i32, ptr %25, align 4, !tbaa !8
  %377 = icmp slt i32 %376, 0
  br i1 %377, label %403, label %378

378:                                              ; preds = %375
  %379 = load i32, ptr %25, align 4, !tbaa !8
  %380 = load i32, ptr %4, align 4, !tbaa !8
  %381 = icmp sge i32 %379, %380
  br i1 %381, label %403, label %382

382:                                              ; preds = %378
  %383 = load i32, ptr %24, align 4, !tbaa !8
  %384 = sext i32 %383 to i64
  %385 = mul nsw i64 %384, %336
  %386 = getelementptr inbounds i8, ptr %338, i64 %385
  %387 = load i32, ptr %25, align 4, !tbaa !8
  %388 = sext i32 %387 to i64
  %389 = getelementptr inbounds i8, ptr %386, i64 %388
  %390 = load i8, ptr %389, align 1, !tbaa !13, !range !18, !noundef !19
  %391 = trunc i8 %390 to i1
  br i1 %391, label %403, label %392

392:                                              ; preds = %382
  %393 = load i32, ptr %24, align 4, !tbaa !8
  %394 = sext i32 %393 to i64
  %395 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %394
  %396 = load i32, ptr %25, align 4, !tbaa !8
  %397 = sext i32 %396 to i64
  %398 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %395, i64 noundef %397)
          to label %399 unwind label %424

399:                                              ; preds = %392
  %400 = load i8, ptr %398, align 1, !tbaa !15
  %401 = sext i8 %400 to i32
  %402 = icmp eq i32 %401, 35
  br i1 %402, label %403, label %428

403:                                              ; preds = %399, %382, %378, %375, %371, %364
  store i32 19, ptr %12, align 4
  br label %452, !llvm.loop !26

404:                                              ; preds = %332
  %405 = landingpad { ptr, i32 }
          cleanup
  %406 = extractvalue { ptr, i32 } %405, 0
  store ptr %406, ptr %8, align 8
  %407 = extractvalue { ptr, i32 } %405, 1
  store i32 %407, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #9
  br label %572

408:                                              ; preds = %349
  %409 = landingpad { ptr, i32 }
          cleanup
  %410 = extractvalue { ptr, i32 } %409, 0
  store ptr %410, ptr %8, align 8
  %411 = extractvalue { ptr, i32 } %409, 1
  store i32 %411, ptr %9, align 4
  br label %571

412:                                              ; preds = %355, %350
  %413 = landingpad { ptr, i32 }
          cleanup
  %414 = extractvalue { ptr, i32 } %413, 0
  store ptr %414, ptr %8, align 8
  %415 = extractvalue { ptr, i32 } %413, 1
  store i32 %415, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  br label %570

416:                                              ; preds = %555, %553, %550, %548, %357
  %417 = landingpad { ptr, i32 }
          cleanup
  %418 = extractvalue { ptr, i32 } %417, 0
  store ptr %418, ptr %8, align 8
  %419 = extractvalue { ptr, i32 } %417, 1
  store i32 %419, ptr %9, align 4
  br label %570

420:                                              ; preds = %363, %361
  %421 = landingpad { ptr, i32 }
          cleanup
  %422 = extractvalue { ptr, i32 } %421, 0
  store ptr %422, ptr %8, align 8
  %423 = extractvalue { ptr, i32 } %421, 1
  store i32 %423, ptr %9, align 4
  br label %472

424:                                              ; preds = %392
  %425 = landingpad { ptr, i32 }
          cleanup
  %426 = extractvalue { ptr, i32 } %425, 0
  store ptr %426, ptr %8, align 8
  %427 = extractvalue { ptr, i32 } %425, 1
  store i32 %427, ptr %9, align 4
  br label %471

428:                                              ; preds = %399
  %429 = load i32, ptr %24, align 4, !tbaa !8
  %430 = sext i32 %429 to i64
  %431 = mul nsw i64 %430, %336
  %432 = getelementptr inbounds i8, ptr %338, i64 %431
  %433 = load i32, ptr %25, align 4, !tbaa !8
  %434 = sext i32 %433 to i64
  %435 = getelementptr inbounds i8, ptr %432, i64 %434
  store i8 1, ptr %435, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  %436 = load i32, ptr %24, align 4, !tbaa !8
  %437 = sub nsw i32 %436, 1
  store i32 %437, ptr %27, align 4, !tbaa !8
  invoke void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %26, ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %438 unwind label %455

438:                                              ; preds = %428
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %19, ptr noundef nonnull align 4 dereferenceable(8) %26)
          to label %439 unwind label %455

439:                                              ; preds = %438
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #9
  %440 = load i32, ptr %24, align 4, !tbaa !8
  %441 = add nsw i32 %440, 1
  store i32 %441, ptr %29, align 4, !tbaa !8
  invoke void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %28, ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %442 unwind label %459

442:                                              ; preds = %439
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %19, ptr noundef nonnull align 4 dereferenceable(8) %28)
          to label %443 unwind label %459

443:                                              ; preds = %442
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #9
  %444 = load i32, ptr %25, align 4, !tbaa !8
  %445 = sub nsw i32 %444, 1
  store i32 %445, ptr %31, align 4, !tbaa !8
  invoke void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %30, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %31)
          to label %446 unwind label %463

446:                                              ; preds = %443
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %19, ptr noundef nonnull align 4 dereferenceable(8) %30)
          to label %447 unwind label %463

447:                                              ; preds = %446
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #9
  %448 = load i32, ptr %25, align 4, !tbaa !8
  %449 = add nsw i32 %448, 1
  store i32 %449, ptr %33, align 4, !tbaa !8
  invoke void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %32, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %33)
          to label %450 unwind label %467

450:                                              ; preds = %447
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %19, ptr noundef nonnull align 4 dereferenceable(8) %32)
          to label %451 unwind label %467

451:                                              ; preds = %450
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  store i32 0, ptr %12, align 4
  br label %452

452:                                              ; preds = %451, %403
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  %453 = load i32, ptr %12, align 4
  switch i32 %453, label %588 [
    i32 0, label %454
    i32 19, label %357
  ]

454:                                              ; preds = %452
  br label %357, !llvm.loop !26

455:                                              ; preds = %438, %428
  %456 = landingpad { ptr, i32 }
          cleanup
  %457 = extractvalue { ptr, i32 } %456, 0
  store ptr %457, ptr %8, align 8
  %458 = extractvalue { ptr, i32 } %456, 1
  store i32 %458, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  br label %471

459:                                              ; preds = %442, %439
  %460 = landingpad { ptr, i32 }
          cleanup
  %461 = extractvalue { ptr, i32 } %460, 0
  store ptr %461, ptr %8, align 8
  %462 = extractvalue { ptr, i32 } %460, 1
  store i32 %462, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  br label %471

463:                                              ; preds = %446, %443
  %464 = landingpad { ptr, i32 }
          cleanup
  %465 = extractvalue { ptr, i32 } %464, 0
  store ptr %465, ptr %8, align 8
  %466 = extractvalue { ptr, i32 } %464, 1
  store i32 %466, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #9
  br label %471

467:                                              ; preds = %450, %447
  %468 = landingpad { ptr, i32 }
          cleanup
  %469 = extractvalue { ptr, i32 } %468, 0
  store ptr %469, ptr %8, align 8
  %470 = extractvalue { ptr, i32 } %468, 1
  store i32 %470, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  br label %471

471:                                              ; preds = %467, %463, %459, %455, %424
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  br label %472

472:                                              ; preds = %471, %420
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  br label %570

473:                                              ; preds = %359
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #9
  store i32 0, ptr %34, align 4, !tbaa !8
  br label %474

474:                                              ; preds = %542, %473
  %475 = load i32, ptr %34, align 4, !tbaa !8
  %476 = load i32, ptr %3, align 4, !tbaa !8
  %477 = icmp slt i32 %475, %476
  br i1 %477, label %479, label %478

478:                                              ; preds = %474
  store i32 21, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #9
  br label %545

479:                                              ; preds = %474
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #9
  store i32 0, ptr %35, align 4, !tbaa !8
  br label %480

480:                                              ; preds = %537, %479
  %481 = load i32, ptr %35, align 4, !tbaa !8
  %482 = load i32, ptr %4, align 4, !tbaa !8
  %483 = icmp slt i32 %481, %482
  br i1 %483, label %485, label %484

484:                                              ; preds = %480
  store i32 24, ptr %12, align 4
  br label %540

485:                                              ; preds = %480
  %486 = load i32, ptr %34, align 4, !tbaa !8
  %487 = sext i32 %486 to i64
  %488 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %487
  %489 = load i32, ptr %35, align 4, !tbaa !8
  %490 = sext i32 %489 to i64
  %491 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %488, i64 noundef %490)
          to label %492 unwind label %532

492:                                              ; preds = %485
  %493 = load i8, ptr %491, align 1, !tbaa !15
  %494 = sext i8 %493 to i32
  %495 = icmp eq i32 %494, 71
  br i1 %495, label %496, label %508

496:                                              ; preds = %492
  %497 = load i32, ptr %34, align 4, !tbaa !8
  %498 = sext i32 %497 to i64
  %499 = mul nsw i64 %498, %336
  %500 = getelementptr inbounds i8, ptr %338, i64 %499
  %501 = load i32, ptr %35, align 4, !tbaa !8
  %502 = sext i32 %501 to i64
  %503 = getelementptr inbounds i8, ptr %500, i64 %502
  %504 = load i8, ptr %503, align 1, !tbaa !13, !range !18, !noundef !19
  %505 = trunc i8 %504 to i1
  %506 = zext i1 %505 to i32
  %507 = icmp eq i32 %506, 0
  br i1 %507, label %531, label %508

508:                                              ; preds = %496, %492
  %509 = load i32, ptr %34, align 4, !tbaa !8
  %510 = sext i32 %509 to i64
  %511 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %510
  %512 = load i32, ptr %35, align 4, !tbaa !8
  %513 = sext i32 %512 to i64
  %514 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %511, i64 noundef %513)
          to label %515 unwind label %532

515:                                              ; preds = %508
  %516 = load i8, ptr %514, align 1, !tbaa !15
  %517 = sext i8 %516 to i32
  %518 = icmp eq i32 %517, 66
  br i1 %518, label %519, label %536

519:                                              ; preds = %515
  %520 = load i32, ptr %34, align 4, !tbaa !8
  %521 = sext i32 %520 to i64
  %522 = mul nsw i64 %521, %336
  %523 = getelementptr inbounds i8, ptr %338, i64 %522
  %524 = load i32, ptr %35, align 4, !tbaa !8
  %525 = sext i32 %524 to i64
  %526 = getelementptr inbounds i8, ptr %523, i64 %525
  %527 = load i8, ptr %526, align 1, !tbaa !13, !range !18, !noundef !19
  %528 = trunc i8 %527 to i1
  %529 = zext i1 %528 to i32
  %530 = icmp eq i32 %529, 1
  br i1 %530, label %531, label %536

531:                                              ; preds = %519, %496
  store i8 0, ptr %10, align 1, !tbaa !13
  store i32 24, ptr %12, align 4
  br label %540

532:                                              ; preds = %508, %485
  %533 = landingpad { ptr, i32 }
          cleanup
  %534 = extractvalue { ptr, i32 } %533, 0
  store ptr %534, ptr %8, align 8
  %535 = extractvalue { ptr, i32 } %533, 1
  store i32 %535, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #9
  br label %570

536:                                              ; preds = %519, %515
  br label %537

537:                                              ; preds = %536
  %538 = load i32, ptr %35, align 4, !tbaa !8
  %539 = add nsw i32 %538, 1
  store i32 %539, ptr %35, align 4, !tbaa !8
  br label %480, !llvm.loop !27

540:                                              ; preds = %531, %484
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #9
  br label %541

541:                                              ; preds = %540
  br label %542

542:                                              ; preds = %541
  %543 = load i32, ptr %34, align 4, !tbaa !8
  %544 = add nsw i32 %543, 1
  store i32 %544, ptr %34, align 4, !tbaa !8
  br label %474, !llvm.loop !28

545:                                              ; preds = %478
  %546 = load i8, ptr %10, align 1, !tbaa !13, !range !18, !noundef !19
  %547 = trunc i8 %546 to i1
  br i1 %547, label %548, label %553

548:                                              ; preds = %545
  %549 = 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 %550 unwind label %416

550:                                              ; preds = %548
  %551 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %549, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %552 unwind label %416

552:                                              ; preds = %550
  br label %558

553:                                              ; preds = %545
  %554 = 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 %555 unwind label %416

555:                                              ; preds = %553
  %556 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %554, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %557 unwind label %416

557:                                              ; preds = %555
  br label %558

558:                                              ; preds = %557, %552
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %19) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr %19) #9
  store i32 0, ptr %12, align 4
  br label %559

559:                                              ; preds = %558, %191
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #9
  %560 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %51
  %561 = icmp eq ptr %53, %560
  br i1 %561, label %566, label %562

562:                                              ; preds = %562, %559
  %563 = phi ptr [ %560, %559 ], [ %564, %562 ]
  %564 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %563, i64 -1
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %564) #9
  %565 = icmp eq ptr %564, %53
  br i1 %565, label %566, label %562

566:                                              ; preds = %562, %559
  %567 = load ptr, ptr %5, align 8
  call void @llvm.stackrestore.p0(ptr %567)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  %568 = load i32, ptr %12, align 4
  switch i32 %568, label %588 [
    i32 0, label %569
    i32 2, label %43
  ]

569:                                              ; preds = %566
  br label %43, !llvm.loop !20

570:                                              ; preds = %532, %472, %416, %412
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %19) #9
  br label %571

571:                                              ; preds = %570, %408
  call void @llvm.lifetime.end.p0(i64 80, ptr %19) #9
  br label %572

572:                                              ; preds = %571, %404, %243, %192, %119
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #9
  br label %573

573:                                              ; preds = %572, %76
  %574 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %53, i64 %51
  %575 = icmp eq ptr %53, %574
  br i1 %575, label %580, label %576

576:                                              ; preds = %576, %573
  %577 = phi ptr [ %574, %573 ], [ %578, %576 ]
  %578 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %577, i64 -1
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %578) #9
  %579 = icmp eq ptr %578, %53
  br i1 %579, label %580, label %576

580:                                              ; preds = %576, %573
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  br label %583

581:                                              ; preds = %43
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  %582 = load i32, ptr %1, align 4
  ret i32 %582

583:                                              ; preds = %580
  %584 = load ptr, ptr %8, align 8
  %585 = load i32, ptr %9, align 4
  %586 = insertvalue { ptr, i32 } poison, ptr %584, 0
  %587 = insertvalue { ptr, i32 } %586, i32 %585, 1
  resume { ptr, i32 } %587

588:                                              ; preds = %566, %452
  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: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(8)) #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #8 align 2

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind willreturn }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { 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 #9 = { 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !10, i64 0}
!15 = !{!10, !10, i64 0}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = !{!24, !9, i64 0}
!24 = !{!"_ZTSSt4pairIiiE", !9, i64 0, !9, i64 4}
!25 = !{!24, !9, i64 4}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !12}


; 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::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%"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 i32, align 4
  %4 = alloca i8, align 1
  %5 = alloca %"class.std::queue", align 8
  %6 = alloca %"struct.std::pair", align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 4
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::pair", align 4
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::pair", align 4
  %16 = alloca i32, align 4
  %17 = alloca %"struct.std::pair", align 4
  %18 = alloca i32, align 4
  %19 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %20 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %21 = getelementptr i8, ptr %20, i64 -24
  %22 = load i64, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %22
  %24 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %23, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %25 = 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)
  %26 = load i32, ptr %1, align 4, !tbaa !8
  %27 = add nsw i32 %26, -1
  store i32 %27, ptr %1, align 4, !tbaa !8
  %.not178 = icmp eq i32 %26, 0
  br i1 %.not178, label %._crit_edge181, label %.lr.ph180

.lr.ph180:                                        ; preds = %0, %.loopexit113
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %30 = load i32, ptr %2, align 4, !tbaa !8
  %31 = zext i32 %30 to i64
  %32 = call ptr @llvm.stacksave.p0()
  %33 = alloca %"class.std::__cxx11::basic_string", i64 %31, align 16
  %34 = icmp eq i32 %30, 0
  br i1 %34, label %.loopexit117, label %35

35:                                               ; preds = %.lr.ph180
  %36 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %33, i64 %31
  br label %37

37:                                               ; preds = %37, %35
  %38 = phi ptr [ %33, %35 ], [ %39, %37 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #8
  %39 = getelementptr inbounds i8, ptr %38, i64 32
  %40 = icmp eq ptr %39, %36
  br i1 %40, label %.loopexit117, label %37

.loopexit117:                                     ; preds = %37, %.lr.ph180
  %41 = load i32, ptr %2, align 4, !tbaa !8
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %.lr.ph, label %.preheader115.thread

.preheader116:                                    ; preds = %48
  %43 = icmp sgt i32 %49, 0
  br i1 %43, label %.preheader111.lr.ph, label %.preheader115.thread

.preheader111.lr.ph:                              ; preds = %.preheader116
  %44 = load i32, ptr %3, align 4, !tbaa !8
  %45 = icmp sgt i32 %44, 0
  br i1 %45, label %.preheader111, label %.preheader115.thread265

.preheader115.thread265:                          ; preds = %.preheader111.lr.ph
  %.pre250267 = load i32, ptr %3, align 4, !tbaa !8
  br label %.preheader110.preheader

.lr.ph:                                           ; preds = %.loopexit117, %48
  %indvars.iv = phi i64 [ %indvars.iv.next, %48 ], [ 0, %.loopexit117 ]
  %46 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %33, i64 %indvars.iv
  %47 = 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) %46)
          to label %48 unwind label %52

48:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %49 = load i32, ptr %2, align 4, !tbaa !8
  %50 = sext i32 %49 to i64
  %51 = icmp slt i64 %indvars.iv.next, %50
  br i1 %51, label %.lr.ph, label %.preheader116, !llvm.loop !11

52:                                               ; preds = %.lr.ph
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %368

.preheader111:                                    ; preds = %.preheader111.lr.ph, %._crit_edge
  %54 = phi i32 [ %126, %._crit_edge ], [ %44, %.preheader111.lr.ph ]
  %indvars.iv225 = phi i64 [ %indvars.iv.next226, %._crit_edge ], [ 0, %.preheader111.lr.ph ]
  %.077152 = phi i8 [ %.178.lcssa, %._crit_edge ], [ 1, %.preheader111.lr.ph ]
  %55 = icmp sgt i32 %54, 0
  br i1 %55, label %.lr.ph151, label %._crit_edge

.lr.ph151:                                        ; preds = %.preheader111
  %56 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %33, i64 %indvars.iv225
  %.not98 = icmp eq i64 %indvars.iv225, 0
  %57 = getelementptr i8, ptr %56, i64 -32
  %58 = getelementptr inbounds i8, ptr %56, i64 32
  %59 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %56, i64 noundef 0)
  %60 = load i8, ptr %59, align 1, !tbaa !13
  %61 = icmp eq i8 %60, 66
  br i1 %.not98, label %.lr.ph151.split.us.preheader, label %.lr.ph151.split.preheader

.lr.ph151.split.preheader:                        ; preds = %.lr.ph151
  br i1 %61, label %62, label %79

62:                                               ; preds = %.lr.ph151.split.preheader
  %63 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %57, i64 noundef 0)
  %64 = load i8, ptr %63, align 1, !tbaa !13
  %65 = icmp eq i8 %64, 71
  %spec.select.peel = select i1 %65, i8 0, i8 %.077152
  %66 = load i32, ptr %2, align 4, !tbaa !8
  %67 = add nsw i32 %66, -1
  %68 = sext i32 %67 to i64
  %69 = icmp slt i64 %indvars.iv225, %68
  br i1 %69, label %70, label %._crit_edge239

70:                                               ; preds = %62
  %71 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %58, i64 noundef 0)
  %72 = load i8, ptr %71, align 1, !tbaa !13
  %73 = icmp eq i8 %72, 71
  %spec.select102.peel = select i1 %73, i8 0, i8 %spec.select.peel
  br label %._crit_edge239

._crit_edge239:                                   ; preds = %70, %62
  %.380.peel = phi i8 [ %spec.select.peel, %62 ], [ %spec.select102.peel, %70 ]
  %.pre = load i32, ptr %3, align 4, !tbaa !8
  %74 = icmp sgt i32 %.pre, 1
  br i1 %74, label %75, label %._crit_edge

75:                                               ; preds = %._crit_edge239
  %76 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %56, i64 noundef 1)
  %77 = load i8, ptr %76, align 1, !tbaa !13
  %78 = icmp eq i8 %77, 71
  %spec.select104.peel = select i1 %78, i8 0, i8 %.380.peel
  br label %79

79:                                               ; preds = %75, %.lr.ph151.split.preheader
  %.5.peel.ph = phi i8 [ %spec.select104.peel, %75 ], [ %.077152, %.lr.ph151.split.preheader ]
  %.pr = load i32, ptr %3, align 4, !tbaa !8
  %80 = icmp sgt i32 %.pr, 1
  br i1 %80, label %.lr.ph151.split, label %._crit_edge

.lr.ph151.split.us.preheader:                     ; preds = %.lr.ph151
  br i1 %61, label %81, label %93

81:                                               ; preds = %.lr.ph151.split.us.preheader
  %82 = load i32, ptr %2, align 4, !tbaa !8
  %83 = icmp sgt i32 %82, 1
  br i1 %83, label %84, label %._crit_edge241

84:                                               ; preds = %81
  %85 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %58, i64 noundef 0)
  %86 = load i8, ptr %85, align 1, !tbaa !13
  %87 = icmp eq i8 %86, 71
  %spec.select102.us.peel = select i1 %87, i8 0, i8 %.077152
  br label %._crit_edge241

._crit_edge241:                                   ; preds = %84, %81
  %.380.us.peel = phi i8 [ %.077152, %81 ], [ %spec.select102.us.peel, %84 ]
  %.pre242 = load i32, ptr %3, align 4, !tbaa !8
  %88 = icmp sgt i32 %.pre242, 1
  br i1 %88, label %89, label %._crit_edge

89:                                               ; preds = %._crit_edge241
  %90 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %56, i64 noundef 1)
  %91 = load i8, ptr %90, align 1, !tbaa !13
  %92 = icmp eq i8 %91, 71
  %spec.select104.us.peel = select i1 %92, i8 0, i8 %.380.us.peel
  br label %93

93:                                               ; preds = %89, %.lr.ph151.split.us.preheader
  %.5.us.peel.ph = phi i8 [ %spec.select104.us.peel, %89 ], [ %.077152, %.lr.ph151.split.us.preheader ]
  %.pr254 = load i32, ptr %3, align 4, !tbaa !8
  %94 = icmp sgt i32 %.pr254, 1
  br i1 %94, label %.lr.ph151.split.us, label %._crit_edge

.lr.ph151.split.us:                               ; preds = %93, %119
  %indvars.iv222 = phi i64 [ %indvars.iv.next223, %119 ], [ 1, %93 ]
  %.178149.us = phi i8 [ %.5.us, %119 ], [ %.5.us.peel.ph, %93 ]
  %95 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %56, i64 noundef %indvars.iv222)
  %96 = load i8, ptr %95, align 1, !tbaa !13
  %97 = icmp eq i8 %96, 66
  br i1 %97, label %98, label %119

98:                                               ; preds = %.lr.ph151.split.us
  %99 = load i32, ptr %2, align 4, !tbaa !8
  %100 = icmp sgt i32 %99, 1
  br i1 %100, label %101, label %105

101:                                              ; preds = %98
  %102 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %58, i64 noundef %indvars.iv222)
  %103 = load i8, ptr %102, align 1, !tbaa !13
  %104 = icmp eq i8 %103, 71
  %spec.select102.us = select i1 %104, i8 0, i8 %.178149.us
  br label %105

105:                                              ; preds = %101, %98
  %.380.us = phi i8 [ %.178149.us, %98 ], [ %spec.select102.us, %101 ]
  %106 = add nsw i64 %indvars.iv222, -1
  %107 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %56, i64 noundef %106)
  %108 = load i8, ptr %107, align 1, !tbaa !13
  %109 = icmp eq i8 %108, 71
  %spec.select103.us = select i1 %109, i8 0, i8 %.380.us
  %110 = load i32, ptr %3, align 4, !tbaa !8
  %111 = add nsw i32 %110, -1
  %112 = sext i32 %111 to i64
  %113 = icmp slt i64 %indvars.iv222, %112
  br i1 %113, label %114, label %119

114:                                              ; preds = %105
  %115 = add nuw nsw i64 %indvars.iv222, 1
  %116 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %56, i64 noundef %115)
  %117 = load i8, ptr %116, align 1, !tbaa !13
  %118 = icmp eq i8 %117, 71
  %spec.select104.us = select i1 %118, i8 0, i8 %spec.select103.us
  br label %119

119:                                              ; preds = %114, %105, %.lr.ph151.split.us
  %.5.us = phi i8 [ %spec.select103.us, %105 ], [ %.178149.us, %.lr.ph151.split.us ], [ %spec.select104.us, %114 ]
  %indvars.iv.next223 = add nuw nsw i64 %indvars.iv222, 1
  %120 = load i32, ptr %3, align 4, !tbaa !8
  %121 = sext i32 %120 to i64
  %122 = icmp slt i64 %indvars.iv.next223, %121
  br i1 %122, label %.lr.ph151.split.us, label %._crit_edge, !llvm.loop !14

._crit_edge155:                                   ; preds = %._crit_edge
  %123 = trunc nuw i8 %.178.lcssa to i1
  br i1 %123, label %.preheader115, label %163

.preheader115.thread:                             ; preds = %.preheader116, %.loopexit117
  %.ph = phi i32 [ %41, %.loopexit117 ], [ %49, %.preheader116 ]
  %.pre250263 = load i32, ptr %3, align 4, !tbaa !8
  br label %._crit_edge162

.preheader115:                                    ; preds = %._crit_edge155
  %124 = icmp sgt i32 %127, 0
  %.pre250 = load i32, ptr %3, align 4, !tbaa !8
  br i1 %124, label %.preheader110.preheader, label %._crit_edge162

.preheader110.preheader:                          ; preds = %.preheader115.thread265, %.preheader115
  %.pre250269 = phi i32 [ %.pre250267, %.preheader115.thread265 ], [ %.pre250, %.preheader115 ]
  %125 = phi i32 [ %49, %.preheader115.thread265 ], [ %127, %.preheader115 ]
  %.077.lcssa258268 = phi i8 [ 1, %.preheader115.thread265 ], [ %.178.lcssa, %.preheader115 ]
  br label %.preheader110

._crit_edge:                                      ; preds = %159, %119, %._crit_edge241, %._crit_edge239, %79, %93, %.preheader111
  %126 = phi i32 [ %54, %.preheader111 ], [ %.pr254, %93 ], [ %.pr, %79 ], [ %.pre, %._crit_edge239 ], [ %.pre242, %._crit_edge241 ], [ %120, %119 ], [ %160, %159 ]
  %.178.lcssa = phi i8 [ %.077152, %.preheader111 ], [ %.5.us.peel.ph, %93 ], [ %.5.peel.ph, %79 ], [ %.380.peel, %._crit_edge239 ], [ %.380.us.peel, %._crit_edge241 ], [ %.5.us, %119 ], [ %.5, %159 ]
  %indvars.iv.next226 = add nuw nsw i64 %indvars.iv225, 1
  %127 = load i32, ptr %2, align 4, !tbaa !8
  %128 = sext i32 %127 to i64
  %129 = icmp slt i64 %indvars.iv.next226, %128
  br i1 %129, label %.preheader111, label %._crit_edge155, !llvm.loop !16

.lr.ph151.split:                                  ; preds = %79, %159
  %indvars.iv219 = phi i64 [ %indvars.iv.next220, %159 ], [ 1, %79 ]
  %.178149 = phi i8 [ %.5, %159 ], [ %.5.peel.ph, %79 ]
  %130 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %56, i64 noundef %indvars.iv219)
  %131 = load i8, ptr %130, align 1, !tbaa !13
  %132 = icmp eq i8 %131, 66
  br i1 %132, label %133, label %159

133:                                              ; preds = %.lr.ph151.split
  %134 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %57, i64 noundef %indvars.iv219)
  %135 = load i8, ptr %134, align 1, !tbaa !13
  %136 = icmp eq i8 %135, 71
  %spec.select = select i1 %136, i8 0, i8 %.178149
  %137 = load i32, ptr %2, align 4, !tbaa !8
  %138 = add nsw i32 %137, -1
  %139 = sext i32 %138 to i64
  %140 = icmp slt i64 %indvars.iv225, %139
  br i1 %140, label %141, label %145

141:                                              ; preds = %133
  %142 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %58, i64 noundef %indvars.iv219)
  %143 = load i8, ptr %142, align 1, !tbaa !13
  %144 = icmp eq i8 %143, 71
  %spec.select102 = select i1 %144, i8 0, i8 %spec.select
  br label %145

145:                                              ; preds = %141, %133
  %.380 = phi i8 [ %spec.select, %133 ], [ %spec.select102, %141 ]
  %146 = add nsw i64 %indvars.iv219, -1
  %147 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %56, i64 noundef %146)
  %148 = load i8, ptr %147, align 1, !tbaa !13
  %149 = icmp eq i8 %148, 71
  %spec.select103 = select i1 %149, i8 0, i8 %.380
  %150 = load i32, ptr %3, align 4, !tbaa !8
  %151 = add nsw i32 %150, -1
  %152 = sext i32 %151 to i64
  %153 = icmp slt i64 %indvars.iv219, %152
  br i1 %153, label %154, label %159

154:                                              ; preds = %145
  %155 = add nuw nsw i64 %indvars.iv219, 1
  %156 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %56, i64 noundef %155)
  %157 = load i8, ptr %156, align 1, !tbaa !13
  %158 = icmp eq i8 %157, 71
  %spec.select104 = select i1 %158, i8 0, i8 %spec.select103
  br label %159

159:                                              ; preds = %154, %.lr.ph151.split, %145
  %.5 = phi i8 [ %spec.select103, %145 ], [ %.178149, %.lr.ph151.split ], [ %spec.select104, %154 ]
  %indvars.iv.next220 = add nuw nsw i64 %indvars.iv219, 1
  %160 = load i32, ptr %3, align 4, !tbaa !8
  %161 = sext i32 %160 to i64
  %162 = icmp slt i64 %indvars.iv.next220, %161
  br i1 %162, label %.lr.ph151.split, label %._crit_edge, !llvm.loop !18

163:                                              ; preds = %._crit_edge155
  %164 = 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 %165 unwind label %167

165:                                              ; preds = %163
  %166 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %164, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %359 unwind label %167, !llvm.loop !19

167:                                              ; preds = %165, %163
  %168 = landingpad { ptr, i32 }
          cleanup
  br label %368

.preheader110:                                    ; preds = %.preheader110.preheader, %._crit_edge160
  %169 = phi i32 [ %125, %.preheader110.preheader ], [ %214, %._crit_edge160 ]
  %170 = phi i32 [ %.pre250269, %.preheader110.preheader ], [ %215, %._crit_edge160 ]
  %indvars.iv231 = phi i64 [ 0, %.preheader110.preheader ], [ %indvars.iv.next232, %._crit_edge160 ]
  %171 = icmp sgt i32 %170, 0
  br i1 %171, label %.lr.ph159, label %._crit_edge160

.lr.ph159:                                        ; preds = %.preheader110
  %172 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %33, i64 %indvars.iv231
  %.not92 = icmp eq i64 %indvars.iv231, 0
  %173 = getelementptr i8, ptr %172, i64 -32
  %174 = getelementptr inbounds i8, ptr %172, i64 32
  %175 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %172, i64 noundef 0)
  %176 = load i8, ptr %175, align 1, !tbaa !13
  %177 = icmp eq i8 %176, 66
  br i1 %177, label %178, label %200

178:                                              ; preds = %.lr.ph159
  br i1 %.not92, label %184, label %179

179:                                              ; preds = %178
  %180 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %173, i64 noundef 0)
  %181 = load i8, ptr %180, align 1, !tbaa !13
  %.not93.peel = icmp eq i8 %181, 66
  br i1 %.not93.peel, label %184, label %182

182:                                              ; preds = %179
  %183 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %173, i64 noundef 0)
  store i8 35, ptr %183, align 1, !tbaa !13
  br label %184

184:                                              ; preds = %182, %179, %178
  %185 = load i32, ptr %2, align 4, !tbaa !8
  %186 = add nsw i32 %185, -1
  %187 = sext i32 %186 to i64
  %188 = icmp slt i64 %indvars.iv231, %187
  br i1 %188, label %189, label %._crit_edge246

189:                                              ; preds = %184
  %190 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %174, i64 noundef 0)
  %191 = load i8, ptr %190, align 1, !tbaa !13
  %.not94.peel = icmp eq i8 %191, 66
  br i1 %.not94.peel, label %._crit_edge246, label %192

192:                                              ; preds = %189
  %193 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %174, i64 noundef 0)
  store i8 35, ptr %193, align 1, !tbaa !13
  br label %._crit_edge246

._crit_edge246:                                   ; preds = %192, %189, %184
  %.pre247 = load i32, ptr %3, align 4, !tbaa !8
  %194 = icmp sgt i32 %.pre247, 1
  br i1 %194, label %195, label %._crit_edge160.loopexit

195:                                              ; preds = %._crit_edge246
  %196 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %172, i64 noundef 1)
  %197 = load i8, ptr %196, align 1, !tbaa !13
  %.not97.peel = icmp eq i8 %197, 66
  br i1 %.not97.peel, label %200, label %198

198:                                              ; preds = %195
  %199 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %172, i64 noundef 1)
  store i8 35, ptr %199, align 1, !tbaa !13
  br label %200

200:                                              ; preds = %198, %195, %.lr.ph159
  %.pr260 = load i32, ptr %3, align 4, !tbaa !8
  %201 = icmp sgt i32 %.pr260, 1
  br i1 %201, label %.peel.next, label %._crit_edge160.loopexit

._crit_edge162:                                   ; preds = %._crit_edge160, %.preheader115.thread, %.preheader115
  %.077.lcssa258264 = phi i8 [ %.178.lcssa, %.preheader115 ], [ 1, %.preheader115.thread ], [ %.077.lcssa258268, %._crit_edge160 ]
  %202 = phi i32 [ %.pre250, %.preheader115 ], [ %.pre250263, %.preheader115.thread ], [ %215, %._crit_edge160 ]
  %.lcssa = phi i32 [ %127, %.preheader115 ], [ %.ph, %.preheader115.thread ], [ %214, %._crit_edge160 ]
  %203 = zext i32 %.lcssa to i64
  %204 = zext i32 %202 to i64
  %205 = mul nuw i64 %204, %203
  %206 = alloca i8, i64 %205, align 16
  %207 = add nsw i32 %.lcssa, -1
  %208 = sext i32 %207 to i64
  %209 = mul nsw i64 %204, %208
  %210 = getelementptr inbounds i8, ptr %206, i64 %209
  %211 = sext i32 %202 to i64
  %212 = getelementptr inbounds i8, ptr %210, i64 %211
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #8
  store i8 0, ptr %4, align 1, !tbaa !20
  invoke void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull %206, ptr noundef nonnull %212, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %258 unwind label %288

._crit_edge160.loopexit:                          ; preds = %254, %._crit_edge246, %200
  %213 = phi i32 [ %.pr260, %200 ], [ %.pre247, %._crit_edge246 ], [ %255, %254 ]
  %.pre249 = load i32, ptr %2, align 4, !tbaa !8
  br label %._crit_edge160

._crit_edge160:                                   ; preds = %._crit_edge160.loopexit, %.preheader110
  %214 = phi i32 [ %.pre249, %._crit_edge160.loopexit ], [ %169, %.preheader110 ]
  %215 = phi i32 [ %213, %._crit_edge160.loopexit ], [ %170, %.preheader110 ]
  %indvars.iv.next232 = add nuw nsw i64 %indvars.iv231, 1
  %216 = sext i32 %214 to i64
  %217 = icmp slt i64 %indvars.iv.next232, %216
  br i1 %217, label %.preheader110, label %._crit_edge162, !llvm.loop !22

.peel.next:                                       ; preds = %200, %254
  %indvars.iv227 = phi i64 [ %indvars.iv.next228, %254 ], [ 1, %200 ]
  %218 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %172, i64 noundef %indvars.iv227)
  %219 = load i8, ptr %218, align 1, !tbaa !13
  %220 = icmp eq i8 %219, 66
  br i1 %220, label %221, label %254

221:                                              ; preds = %.peel.next
  br i1 %.not92, label %227, label %222

222:                                              ; preds = %221
  %223 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %173, i64 noundef %indvars.iv227)
  %224 = load i8, ptr %223, align 1, !tbaa !13
  %.not93 = icmp eq i8 %224, 66
  br i1 %.not93, label %227, label %225

225:                                              ; preds = %222
  %226 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %173, i64 noundef %indvars.iv227)
  store i8 35, ptr %226, align 1, !tbaa !13
  br label %227

227:                                              ; preds = %225, %222, %221
  %228 = load i32, ptr %2, align 4, !tbaa !8
  %229 = add nsw i32 %228, -1
  %230 = sext i32 %229 to i64
  %231 = icmp slt i64 %indvars.iv231, %230
  br i1 %231, label %232, label %237

232:                                              ; preds = %227
  %233 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %174, i64 noundef %indvars.iv227)
  %234 = load i8, ptr %233, align 1, !tbaa !13
  %.not94 = icmp eq i8 %234, 66
  br i1 %.not94, label %237, label %235

235:                                              ; preds = %232
  %236 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %174, i64 noundef %indvars.iv227)
  store i8 35, ptr %236, align 1, !tbaa !13
  br label %237

237:                                              ; preds = %227, %232, %235
  %238 = add nsw i64 %indvars.iv227, -1
  %239 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %172, i64 noundef %238)
  %240 = load i8, ptr %239, align 1, !tbaa !13
  %.not96 = icmp eq i8 %240, 66
  br i1 %.not96, label %243, label %241

241:                                              ; preds = %237
  %242 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %172, i64 noundef %238)
  store i8 35, ptr %242, align 1, !tbaa !13
  br label %243

243:                                              ; preds = %241, %237
  %244 = load i32, ptr %3, align 4, !tbaa !8
  %245 = add nsw i32 %244, -1
  %246 = sext i32 %245 to i64
  %247 = icmp slt i64 %indvars.iv227, %246
  br i1 %247, label %248, label %254

248:                                              ; preds = %243
  %249 = add nuw nsw i64 %indvars.iv227, 1
  %250 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %172, i64 noundef %249)
  %251 = load i8, ptr %250, align 1, !tbaa !13
  %.not97 = icmp eq i8 %251, 66
  br i1 %.not97, label %254, label %252

252:                                              ; preds = %248
  %253 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %172, i64 noundef %249)
  store i8 35, ptr %253, align 1, !tbaa !13
  br label %254

254:                                              ; preds = %.peel.next, %252, %248, %243
  %indvars.iv.next228 = add nuw nsw i64 %indvars.iv227, 1
  %255 = load i32, ptr %3, align 4, !tbaa !8
  %256 = sext i32 %255 to i64
  %257 = icmp slt i64 %indvars.iv.next228, %256
  br i1 %257, label %.peel.next, label %._crit_edge160.loopexit, !llvm.loop !23

258:                                              ; preds = %._crit_edge162
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #8
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %259 unwind label %290

259:                                              ; preds = %258
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  %260 = load i32, ptr %2, align 4, !tbaa !8
  %261 = add nsw i32 %260, -1
  store i32 %261, ptr %7, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  %262 = load i32, ptr %3, align 4, !tbaa !8
  %263 = add nsw i32 %262, -1
  store i32 %263, ptr %8, align 4, !tbaa !8
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 4 dereferenceable(8) %6)
          to label %264 unwind label %292

264:                                              ; preds = %259
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  %265 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  br i1 %265, label %.preheader114, label %.lr.ph165

.preheader114:                                    ; preds = %315, %264
  %266 = load i32, ptr %2, align 4, !tbaa !8
  %267 = icmp sgt i32 %266, 0
  br i1 %267, label %.preheader109, label %._crit_edge176

.lr.ph165:                                        ; preds = %264, %315
  %268 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  %.sroa.0.0.copyload = load i32, ptr %268, align 4
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %268, i64 4
  %.sroa.5.0.copyload = load i32, ptr %.sroa.5.0..sroa_idx, align 4
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  store i32 %.sroa.0.0.copyload, ptr %9, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  store i32 %.sroa.5.0.copyload, ptr %10, align 4, !tbaa !8
  %269 = icmp slt i32 %.sroa.0.0.copyload, 0
  br i1 %269, label %315, label %270, !llvm.loop !24

270:                                              ; preds = %.lr.ph165
  %271 = load i32, ptr %2, align 4, !tbaa !8
  %272 = icmp slt i32 %.sroa.0.0.copyload, %271
  %273 = icmp sgt i32 %.sroa.5.0.copyload, -1
  %or.cond.not108 = select i1 %272, i1 %273, i1 false
  %274 = load i32, ptr %3, align 4
  %.not87 = icmp slt i32 %.sroa.5.0.copyload, %274
  %or.cond105 = select i1 %or.cond.not108, i1 %.not87, i1 false
  br i1 %or.cond105, label %275, label %315, !llvm.loop !24

275:                                              ; preds = %270
  %276 = zext nneg i32 %.sroa.0.0.copyload to i64
  %277 = mul nuw nsw i64 %276, %204
  %278 = getelementptr inbounds i8, ptr %206, i64 %277
  %279 = zext nneg i32 %.sroa.5.0.copyload to i64
  %280 = getelementptr inbounds i8, ptr %278, i64 %279
  %281 = load i8, ptr %280, align 1, !tbaa !20, !range !25, !noundef !26
  %282 = trunc nuw i8 %281 to i1
  br i1 %282, label %315, label %283, !llvm.loop !24

283:                                              ; preds = %275
  %284 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %33, i64 %276
  %285 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %284, i64 noundef %279)
  %286 = load i8, ptr %285, align 1, !tbaa !13
  %287 = icmp eq i8 %286, 35
  br i1 %287, label %315, label %296, !llvm.loop !24

288:                                              ; preds = %._crit_edge162
  %289 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #8
  br label %368

290:                                              ; preds = %258
  %291 = landingpad { ptr, i32 }
          cleanup
  br label %367

292:                                              ; preds = %259
  %293 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %366

294:                                              ; preds = %._crit_edge176, %.invoke
  %295 = landingpad { ptr, i32 }
          cleanup
  br label %366

296:                                              ; preds = %283
  %297 = load i32, ptr %9, align 4, !tbaa !8
  %298 = sext i32 %297 to i64
  %299 = mul nsw i64 %298, %204
  %300 = getelementptr inbounds i8, ptr %206, i64 %299
  %301 = load i32, ptr %10, align 4, !tbaa !8
  %302 = sext i32 %301 to i64
  %303 = getelementptr inbounds i8, ptr %300, i64 %302
  store i8 1, ptr %303, align 1, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  %304 = add nsw i32 %297, -1
  store i32 %304, ptr %12, align 4, !tbaa !8
  call void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %10)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 4 dereferenceable(8) %11)
          to label %305 unwind label %317

305:                                              ; preds = %296
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #8
  %306 = load i32, ptr %9, align 4, !tbaa !8
  %307 = add nsw i32 %306, 1
  store i32 %307, ptr %14, align 4, !tbaa !8
  call void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %10)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 4 dereferenceable(8) %13)
          to label %308 unwind label %319

308:                                              ; preds = %305
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #8
  %309 = load i32, ptr %10, align 4, !tbaa !8
  %310 = add nsw i32 %309, -1
  store i32 %310, ptr %16, align 4, !tbaa !8
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %16)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 4 dereferenceable(8) %15)
          to label %311 unwind label %321

311:                                              ; preds = %308
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #8
  %312 = load i32, ptr %10, align 4, !tbaa !8
  %313 = add nsw i32 %312, 1
  store i32 %313, ptr %18, align 4, !tbaa !8
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %17, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %18)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 4 dereferenceable(8) %17)
          to label %314 unwind label %323

314:                                              ; preds = %311
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  br label %315

315:                                              ; preds = %.lr.ph165, %270, %275, %283, %314
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  %316 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  br i1 %316, label %.preheader114, label %.lr.ph165

317:                                              ; preds = %296
  %318 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %325

319:                                              ; preds = %305
  %320 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  br label %325

321:                                              ; preds = %308
  %322 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  br label %325

323:                                              ; preds = %311
  %324 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  br label %325

325:                                              ; preds = %323, %321, %319, %317
  %.pn = phi { ptr, i32 } [ %324, %323 ], [ %322, %321 ], [ %320, %319 ], [ %318, %317 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  br label %366

.preheader109:                                    ; preds = %.preheader114, %._crit_edge168
  %326 = phi i32 [ %354, %._crit_edge168 ], [ %266, %.preheader114 ]
  %indvars.iv237 = phi i64 [ %indvars.iv.next238, %._crit_edge168 ], [ 0, %.preheader114 ]
  %.6174 = phi i8 [ %.7, %._crit_edge168 ], [ %.077.lcssa258264, %.preheader114 ]
  %327 = mul nuw nsw i64 %indvars.iv237, %204
  %328 = getelementptr inbounds i8, ptr %206, i64 %327
  %329 = load i32, ptr %3, align 4, !tbaa !8
  %330 = icmp sgt i32 %329, 0
  br i1 %330, label %.lr.ph167, label %._crit_edge168

.lr.ph167:                                        ; preds = %.preheader109
  %331 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %33, i64 %indvars.iv237
  br label %334

._crit_edge176:                                   ; preds = %._crit_edge168, %.preheader114
  %.6.lcssa = phi i8 [ %.077.lcssa258264, %.preheader114 ], [ %.7, %._crit_edge168 ]
  %332 = trunc nuw i8 %.6.lcssa to i1
  %.str.1..str = select i1 %332, ptr @.str.1, ptr @.str
  %333 = 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..str)
          to label %.invoke unwind label %294

334:                                              ; preds = %.lr.ph167, %350
  %indvars.iv234 = phi i64 [ 0, %.lr.ph167 ], [ %indvars.iv.next235, %350 ]
  %335 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %331, i64 noundef %indvars.iv234)
  %336 = load i8, ptr %335, align 1, !tbaa !13
  %337 = icmp eq i8 %336, 71
  br i1 %337, label %338, label %342

338:                                              ; preds = %334
  %339 = getelementptr inbounds i8, ptr %328, i64 %indvars.iv234
  %340 = load i8, ptr %339, align 1, !tbaa !20, !range !25, !noundef !26
  %341 = icmp eq i8 %340, 0
  br i1 %341, label %._crit_edge168.loopexit, label %342

342:                                              ; preds = %338, %334
  %343 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %331, i64 noundef %indvars.iv234)
  %344 = load i8, ptr %343, align 1, !tbaa !13
  %345 = icmp eq i8 %344, 66
  br i1 %345, label %346, label %350

346:                                              ; preds = %342
  %347 = getelementptr inbounds i8, ptr %328, i64 %indvars.iv234
  %348 = load i8, ptr %347, align 1, !tbaa !20, !range !25, !noundef !26
  %349 = trunc nuw i8 %348 to i1
  br i1 %349, label %._crit_edge168.loopexit, label %350

350:                                              ; preds = %342, %346
  %indvars.iv.next235 = add nuw nsw i64 %indvars.iv234, 1
  %351 = load i32, ptr %3, align 4, !tbaa !8
  %352 = sext i32 %351 to i64
  %353 = icmp slt i64 %indvars.iv.next235, %352
  br i1 %353, label %334, label %._crit_edge168.loopexit, !llvm.loop !27

._crit_edge168.loopexit:                          ; preds = %338, %346, %350
  %.7.ph = phi i8 [ %.6174, %350 ], [ 0, %346 ], [ 0, %338 ]
  %.pre251 = load i32, ptr %2, align 4, !tbaa !8
  br label %._crit_edge168

._crit_edge168:                                   ; preds = %._crit_edge168.loopexit, %.preheader109
  %354 = phi i32 [ %326, %.preheader109 ], [ %.pre251, %._crit_edge168.loopexit ]
  %.7 = phi i8 [ %.6174, %.preheader109 ], [ %.7.ph, %._crit_edge168.loopexit ]
  %indvars.iv.next238 = add nuw nsw i64 %indvars.iv237, 1
  %355 = sext i32 %354 to i64
  %356 = icmp slt i64 %indvars.iv.next238, %355
  br i1 %356, label %.preheader109, label %._crit_edge176, !llvm.loop !28

.invoke:                                          ; preds = %._crit_edge176
  %357 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %333, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %358 unwind label %294

358:                                              ; preds = %.invoke
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #8
  br label %359

359:                                              ; preds = %165, %358
  br i1 %34, label %.loopexit113, label %.preheader112.preheader

.preheader112.preheader:                          ; preds = %359
  %360 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %33, i64 %31
  br label %.preheader112

.preheader112:                                    ; preds = %.preheader112.preheader, %.preheader112
  %361 = phi ptr [ %362, %.preheader112 ], [ %360, %.preheader112.preheader ]
  %362 = getelementptr inbounds i8, ptr %361, i64 -32
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %362) #8
  %363 = icmp eq ptr %362, %33
  br i1 %363, label %.loopexit113, label %.preheader112

.loopexit113:                                     ; preds = %.preheader112, %359
  call void @llvm.stackrestore.p0(ptr %32)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  %364 = load i32, ptr %1, align 4, !tbaa !8
  %365 = add nsw i32 %364, -1
  store i32 %365, ptr %1, align 4, !tbaa !8
  %.not = icmp eq i32 %364, 0
  br i1 %.not, label %._crit_edge181, label %.lr.ph180

366:                                              ; preds = %325, %294, %292
  %.pn.pn = phi { ptr, i32 } [ %.pn, %325 ], [ %295, %294 ], [ %293, %292 ]
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #8
  br label %367

367:                                              ; preds = %366, %290
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %366 ], [ %291, %290 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #8
  br label %368

368:                                              ; preds = %167, %288, %367, %52
  %.pn100 = phi { ptr, i32 } [ %53, %52 ], [ %.pn.pn.pn, %367 ], [ %289, %288 ], [ %168, %167 ]
  br i1 %34, label %.loopexit, label %.preheader.preheader

.preheader.preheader:                             ; preds = %368
  %369 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %33, i64 %31
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %370 = phi ptr [ %371, %.preheader ], [ %369, %.preheader.preheader ]
  %371 = getelementptr inbounds i8, ptr %370, i64 -32
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %371) #8
  %372 = icmp eq ptr %371, %33
  br i1 %372, label %.loopexit, label %.preheader

.loopexit:                                        ; preds = %.preheader, %368
  call void @llvm.lifetime.end.p0(i64 4, 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 } %.pn100

._crit_edge181:                                   ; preds = %.loopexit113, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  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 nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #7 align 2

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !12, !15}
!15 = !{!"llvm.loop.peeled.count", i32 1}
!16 = distinct !{!16, !12, !17}
!17 = !{!"llvm.loop.unswitch.partial.disable"}
!18 = distinct !{!18, !12, !15}
!19 = distinct !{!19, !12}
!20 = !{!21, !21, i64 0}
!21 = !{!"bool", !10, i64 0}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12, !15}
!24 = distinct !{!24, !12}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !12}


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