; LLVM IR from eyangch/competitive-programming :: Codeforces/1345 (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.__gnu_cxx::__normal_iterator" = type { ptr }
%"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] }

@vis = external dso_local global [1000 x [1000 x i8]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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 ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca i8, align 1
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"class.std::queue", align 8
  %25 = alloca %"struct.std::pair", align 4
  %26 = alloca %"struct.std::pair", align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca %"struct.std::pair", align 4
  %30 = alloca i32, align 4
  %31 = alloca %"struct.std::pair", align 4
  %32 = alloca i32, align 4
  %33 = alloca %"struct.std::pair", align 4
  %34 = alloca i32, align 4
  %35 = alloca %"struct.std::pair", align 4
  %36 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %37 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %38 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %39 = getelementptr i8, ptr %38, i64 -24
  %40 = load i64, ptr %39, align 8
  %41 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %40
  %42 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %41, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  %43 = 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)
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %45 = load i32, ptr %2, align 4, !tbaa !8
  %46 = zext i32 %45 to i64
  %47 = call ptr @llvm.stacksave.p0()
  store ptr %47, ptr %4, align 8
  %48 = alloca %"class.std::__cxx11::basic_string", i64 %46, align 16
  store i64 %46, ptr %5, align 8
  %49 = icmp eq i64 %46, 0
  br i1 %49, label %56, label %50

50:                                               ; preds = %0
  %51 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %48, i64 %46
  br label %52

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

56:                                               ; preds = %52, %0
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #9
  store i8 1, ptr %6, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  store i32 0, ptr %7, align 4, !tbaa !8
  br label %57

57:                                               ; preds = %95, %56
  %58 = load i32, ptr %7, align 4, !tbaa !8
  %59 = load i32, ptr %2, align 4, !tbaa !8
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %57
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  br label %98

62:                                               ; preds = %57
  %63 = load i32, ptr %7, align 4, !tbaa !8
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %48, i64 %64
  %66 = 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) %65)
          to label %67 unwind label %80

67:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %68 = load i32, ptr %7, align 4, !tbaa !8
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %48, i64 %69
  store ptr %70, ptr %11, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %71 = load ptr, ptr %11, align 8, !tbaa !13
  %72 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %71) #9
  %73 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %72, ptr %73, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %74 = load ptr, ptr %11, align 8, !tbaa !13
  %75 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %74) #9
  %76 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %75, ptr %76, align 8
  br label %77

77:                                               ; preds = %92, %67
  %78 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  br i1 %78, label %84, label %79

79:                                               ; preds = %77
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  br label %94

80:                                               ; preds = %62
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %9, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  br label %478

84:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #9
  %85 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  %86 = load i8, ptr %85, align 1, !tbaa !15
  store i8 %86, ptr %14, align 1, !tbaa !15
  %87 = load i8, ptr %14, align 1, !tbaa !15
  %88 = sext i8 %87 to i32
  %89 = icmp eq i32 %88, 35
  br i1 %89, label %90, label %91

90:                                               ; preds = %84
  store i8 0, ptr %6, align 1, !tbaa !11
  br label %91

91:                                               ; preds = %90, %84
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #9
  br label %92

92:                                               ; preds = %91
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  br label %77

94:                                               ; preds = %79
  br label %95

95:                                               ; preds = %94
  %96 = load i32, ptr %7, align 4, !tbaa !8
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %7, align 4, !tbaa !8
  br label %57, !llvm.loop !16

98:                                               ; preds = %61
  %99 = load i8, ptr %6, align 1, !tbaa !11, !range !18, !noundef !19
  %100 = trunc i8 %99 to i1
  br i1 %100, label %101, label %110

101:                                              ; preds = %98
  %102 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
          to label %103 unwind label %106

103:                                              ; preds = %101
  %104 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %102, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %105 unwind label %106

105:                                              ; preds = %103
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  br label %475

106:                                              ; preds = %297, %295, %281, %276, %273, %271, %266, %261, %256, %103, %101
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %9, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %10, align 4
  br label %478

110:                                              ; preds = %98
  %111 = load i32, ptr %2, align 4, !tbaa !8
  %112 = zext i32 %111 to i64
  %113 = alloca i32, i64 %112, align 16
  store i64 %112, ptr %15, align 8
  %114 = load i32, ptr %3, align 4, !tbaa !8
  %115 = zext i32 %114 to i64
  %116 = alloca i32, i64 %115, align 16
  store i64 %115, ptr %16, align 8
  %117 = load i32, ptr %2, align 4, !tbaa !8
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds i32, ptr %113, i64 %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  store i32 0, ptr %17, align 4, !tbaa !8
  invoke void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef %113, ptr noundef %119, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %120 unwind label %130

120:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  %121 = load i32, ptr %3, align 4, !tbaa !8
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds i32, ptr %116, i64 %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  store i32 0, ptr %18, align 4, !tbaa !8
  invoke void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef %116, ptr noundef %123, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %124 unwind label %134

124:                                              ; preds = %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  store i32 0, ptr %19, align 4, !tbaa !8
  br label %125

125:                                              ; preds = %253, %124
  %126 = load i32, ptr %19, align 4, !tbaa !8
  %127 = load i32, ptr %2, align 4, !tbaa !8
  %128 = icmp slt i32 %126, %127
  br i1 %128, label %138, label %129

129:                                              ; preds = %125
  store i32 7, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  br label %256

130:                                              ; preds = %110
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %9, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  br label %478

134:                                              ; preds = %120
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %9, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  br label %478

138:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  store i32 0, ptr %20, align 4, !tbaa !8
  br label %139

139:                                              ; preds = %249, %138
  %140 = load i32, ptr %20, align 4, !tbaa !8
  %141 = load i32, ptr %3, align 4, !tbaa !8
  %142 = icmp slt i32 %140, %141
  br i1 %142, label %144, label %143

143:                                              ; preds = %139
  store i32 10, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  br label %252

144:                                              ; preds = %139
  %145 = load i32, ptr %19, align 4, !tbaa !8
  %146 = icmp eq i32 %145, 0
  br i1 %146, label %147, label %168

147:                                              ; preds = %144
  %148 = load i32, ptr %19, align 4, !tbaa !8
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %48, i64 %149
  %151 = load i32, ptr %20, align 4, !tbaa !8
  %152 = sext i32 %151 to i64
  %153 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %150, i64 noundef %152)
          to label %154 unwind label %164

154:                                              ; preds = %147
  %155 = load i8, ptr %153, align 1, !tbaa !15
  %156 = sext i8 %155 to i32
  %157 = icmp eq i32 %156, 35
  br i1 %157, label %158, label %168

158:                                              ; preds = %154
  %159 = load i32, ptr %20, align 4, !tbaa !8
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds i32, ptr %116, i64 %160
  %162 = load i32, ptr %161, align 4, !tbaa !8
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %161, align 4, !tbaa !8
  br label %168

164:                                              ; preds = %229, %221, %199, %191, %171, %147
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %9, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  br label %478

168:                                              ; preds = %158, %154, %144
  %169 = load i32, ptr %20, align 4, !tbaa !8
  %170 = icmp eq i32 %169, 0
  br i1 %170, label %171, label %188

171:                                              ; preds = %168
  %172 = load i32, ptr %19, align 4, !tbaa !8
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %48, i64 %173
  %175 = load i32, ptr %20, align 4, !tbaa !8
  %176 = sext i32 %175 to i64
  %177 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %174, i64 noundef %176)
          to label %178 unwind label %164

178:                                              ; preds = %171
  %179 = load i8, ptr %177, align 1, !tbaa !15
  %180 = sext i8 %179 to i32
  %181 = icmp eq i32 %180, 35
  br i1 %181, label %182, label %188

182:                                              ; preds = %178
  %183 = load i32, ptr %19, align 4, !tbaa !8
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds i32, ptr %113, i64 %184
  %186 = load i32, ptr %185, align 4, !tbaa !8
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %185, align 4, !tbaa !8
  br label %188

188:                                              ; preds = %182, %178, %168
  %189 = load i32, ptr %19, align 4, !tbaa !8
  %190 = icmp sgt i32 %189, 0
  br i1 %190, label %191, label %218

191:                                              ; preds = %188
  %192 = load i32, ptr %19, align 4, !tbaa !8
  %193 = sub nsw i32 %192, 1
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %48, i64 %194
  %196 = load i32, ptr %20, align 4, !tbaa !8
  %197 = sext i32 %196 to i64
  %198 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %195, i64 noundef %197)
          to label %199 unwind label %164

199:                                              ; preds = %191
  %200 = load i8, ptr %198, align 1, !tbaa !15
  %201 = sext i8 %200 to i32
  %202 = load i32, ptr %19, align 4, !tbaa !8
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %48, i64 %203
  %205 = load i32, ptr %20, align 4, !tbaa !8
  %206 = sext i32 %205 to i64
  %207 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %204, i64 noundef %206)
          to label %208 unwind label %164

208:                                              ; preds = %199
  %209 = load i8, ptr %207, align 1, !tbaa !15
  %210 = sext i8 %209 to i32
  %211 = icmp ne i32 %201, %210
  br i1 %211, label %212, label %218

212:                                              ; preds = %208
  %213 = load i32, ptr %20, align 4, !tbaa !8
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds i32, ptr %116, i64 %214
  %216 = load i32, ptr %215, align 4, !tbaa !8
  %217 = add nsw i32 %216, 1
  store i32 %217, ptr %215, align 4, !tbaa !8
  br label %218

218:                                              ; preds = %212, %208, %188
  %219 = load i32, ptr %20, align 4, !tbaa !8
  %220 = icmp sgt i32 %219, 0
  br i1 %220, label %221, label %248

221:                                              ; preds = %218
  %222 = load i32, ptr %19, align 4, !tbaa !8
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %48, i64 %223
  %225 = load i32, ptr %20, align 4, !tbaa !8
  %226 = sub nsw i32 %225, 1
  %227 = sext i32 %226 to i64
  %228 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %224, i64 noundef %227)
          to label %229 unwind label %164

229:                                              ; preds = %221
  %230 = load i8, ptr %228, align 1, !tbaa !15
  %231 = sext i8 %230 to i32
  %232 = load i32, ptr %19, align 4, !tbaa !8
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %48, i64 %233
  %235 = load i32, ptr %20, align 4, !tbaa !8
  %236 = sext i32 %235 to i64
  %237 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %234, i64 noundef %236)
          to label %238 unwind label %164

238:                                              ; preds = %229
  %239 = load i8, ptr %237, align 1, !tbaa !15
  %240 = sext i8 %239 to i32
  %241 = icmp ne i32 %231, %240
  br i1 %241, label %242, label %248

242:                                              ; preds = %238
  %243 = load i32, ptr %19, align 4, !tbaa !8
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds i32, ptr %113, i64 %244
  %246 = load i32, ptr %245, align 4, !tbaa !8
  %247 = add nsw i32 %246, 1
  store i32 %247, ptr %245, align 4, !tbaa !8
  br label %248

248:                                              ; preds = %242, %238, %218
  br label %249

249:                                              ; preds = %248
  %250 = load i32, ptr %20, align 4, !tbaa !8
  %251 = add nsw i32 %250, 1
  store i32 %251, ptr %20, align 4, !tbaa !8
  br label %139, !llvm.loop !20

252:                                              ; preds = %143
  br label %253

253:                                              ; preds = %252
  %254 = load i32, ptr %19, align 4, !tbaa !8
  %255 = add nsw i32 %254, 1
  store i32 %255, ptr %19, align 4, !tbaa !8
  br label %125, !llvm.loop !21

256:                                              ; preds = %129
  %257 = load i32, ptr %2, align 4, !tbaa !8
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds i32, ptr %113, i64 %258
  %260 = invoke noundef ptr @_ZSt11max_elementIPiET_S1_S1_(ptr noundef %113, ptr noundef %259)
          to label %261 unwind label %106

261:                                              ; preds = %256
  %262 = load i32, ptr %3, align 4, !tbaa !8
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds i32, ptr %116, i64 %263
  %265 = invoke noundef ptr @_ZSt11max_elementIPiET_S1_S1_(ptr noundef %116, ptr noundef %264)
          to label %266 unwind label %106

266:                                              ; preds = %261
  %267 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %260, ptr noundef nonnull align 4 dereferenceable(4) %265)
          to label %268 unwind label %106

268:                                              ; preds = %266
  %269 = load i32, ptr %267, align 4, !tbaa !8
  %270 = icmp sgt i32 %269, 2
  br i1 %270, label %271, label %276

271:                                              ; preds = %268
  %272 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
          to label %273 unwind label %106

273:                                              ; preds = %271
  %274 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %272, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %275 unwind label %106

275:                                              ; preds = %273
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  br label %475

276:                                              ; preds = %268
  %277 = load i32, ptr %2, align 4, !tbaa !8
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds i32, ptr %113, i64 %278
  %280 = invoke noundef ptr @_ZSt11min_elementIPiET_S1_S1_(ptr noundef %113, ptr noundef %279)
          to label %281 unwind label %106

281:                                              ; preds = %276
  %282 = load i32, ptr %280, align 4, !tbaa !8
  %283 = icmp eq i32 %282, 0
  %284 = zext i1 %283 to i32
  %285 = load i32, ptr %3, align 4, !tbaa !8
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds i32, ptr %116, i64 %286
  %288 = invoke noundef ptr @_ZSt11min_elementIPiET_S1_S1_(ptr noundef %116, ptr noundef %287)
          to label %289 unwind label %106

289:                                              ; preds = %281
  %290 = load i32, ptr %288, align 4, !tbaa !8
  %291 = icmp eq i32 %290, 0
  %292 = zext i1 %291 to i32
  %293 = xor i32 %284, %292
  %294 = icmp ne i32 %293, 0
  br i1 %294, label %295, label %300

295:                                              ; preds = %289
  %296 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
          to label %297 unwind label %106

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

299:                                              ; preds = %297
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  br label %475

300:                                              ; preds = %289
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  store i32 0, ptr %21, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  store i32 0, ptr %22, align 4, !tbaa !8
  br label %301

301:                                              ; preds = %461, %300
  %302 = load i32, ptr %22, align 4, !tbaa !8
  %303 = load i32, ptr %2, align 4, !tbaa !8
  %304 = icmp slt i32 %302, %303
  br i1 %304, label %306, label %305

305:                                              ; preds = %301
  store i32 13, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  br label %464

306:                                              ; preds = %301
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  store i32 0, ptr %23, align 4, !tbaa !8
  br label %307

307:                                              ; preds = %454, %306
  %308 = load i32, ptr %23, align 4, !tbaa !8
  %309 = load i32, ptr %3, align 4, !tbaa !8
  %310 = icmp slt i32 %308, %309
  br i1 %310, label %312, label %311

311:                                              ; preds = %307
  store i32 16, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  br label %460

312:                                              ; preds = %307
  %313 = load i32, ptr %22, align 4, !tbaa !8
  %314 = sext i32 %313 to i64
  %315 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vis, i64 0, i64 %314
  %316 = load i32, ptr %23, align 4, !tbaa !8
  %317 = sext i32 %316 to i64
  %318 = getelementptr inbounds [1000 x i8], ptr %315, i64 0, i64 %317
  %319 = load i8, ptr %318, align 1, !tbaa !11, !range !18, !noundef !19
  %320 = trunc i8 %319 to i1
  br i1 %320, label %332, label %321

321:                                              ; preds = %312
  %322 = load i32, ptr %22, align 4, !tbaa !8
  %323 = sext i32 %322 to i64
  %324 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %48, i64 %323
  %325 = load i32, ptr %23, align 4, !tbaa !8
  %326 = sext i32 %325 to i64
  %327 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %324, i64 noundef %326)
          to label %328 unwind label %333

328:                                              ; preds = %321
  %329 = load i8, ptr %327, align 1, !tbaa !15
  %330 = sext i8 %329 to i32
  %331 = icmp eq i32 %330, 46
  br i1 %331, label %332, label %337

332:                                              ; preds = %328, %312
  br label %454

333:                                              ; preds = %321
  %334 = landingpad { ptr, i32 }
          cleanup
  %335 = extractvalue { ptr, i32 } %334, 0
  store ptr %335, ptr %9, align 8
  %336 = extractvalue { ptr, i32 } %334, 1
  store i32 %336, ptr %10, align 4
  br label %459

337:                                              ; preds = %328
  %338 = load i32, ptr %21, align 4, !tbaa !8
  %339 = add nsw i32 %338, 1
  store i32 %339, ptr %21, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 80, ptr %24) #9
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %24)
          to label %340 unwind label %389

340:                                              ; preds = %337
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  invoke void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %25, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %341 unwind label %393

341:                                              ; preds = %340
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %24, ptr noundef nonnull align 4 dereferenceable(8) %25)
          to label %342 unwind label %393

342:                                              ; preds = %341
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  br label %343

343:                                              ; preds = %434, %432, %342
  %344 = invoke noundef zeroext i1 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %24)
          to label %345 unwind label %397

345:                                              ; preds = %343
  %346 = xor i1 %344, true
  br i1 %346, label %347, label %453

347:                                              ; preds = %345
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %348 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %24)
          to label %349 unwind label %401

349:                                              ; preds = %347
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %348, i64 8, i1 false)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %24)
          to label %350 unwind label %401

350:                                              ; preds = %349
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  %351 = getelementptr inbounds %"struct.std::pair", ptr %26, i32 0, i32 0
  %352 = load i32, ptr %351, align 4, !tbaa !22
  store i32 %352, ptr %27, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #9
  %353 = getelementptr inbounds %"struct.std::pair", ptr %26, i32 0, i32 1
  %354 = load i32, ptr %353, align 4, !tbaa !24
  store i32 %354, ptr %28, align 4, !tbaa !8
  %355 = load i32, ptr %27, align 4, !tbaa !8
  %356 = icmp slt i32 %355, 0
  br i1 %356, label %388, label %357

357:                                              ; preds = %350
  %358 = load i32, ptr %27, align 4, !tbaa !8
  %359 = load i32, ptr %2, align 4, !tbaa !8
  %360 = icmp sge i32 %358, %359
  br i1 %360, label %388, label %361

361:                                              ; preds = %357
  %362 = load i32, ptr %28, align 4, !tbaa !8
  %363 = icmp slt i32 %362, 0
  br i1 %363, label %388, label %364

364:                                              ; preds = %361
  %365 = load i32, ptr %28, align 4, !tbaa !8
  %366 = load i32, ptr %3, align 4, !tbaa !8
  %367 = icmp sge i32 %365, %366
  br i1 %367, label %388, label %368

368:                                              ; preds = %364
  %369 = load i32, ptr %27, align 4, !tbaa !8
  %370 = sext i32 %369 to i64
  %371 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vis, i64 0, i64 %370
  %372 = load i32, ptr %28, align 4, !tbaa !8
  %373 = sext i32 %372 to i64
  %374 = getelementptr inbounds [1000 x i8], ptr %371, i64 0, i64 %373
  %375 = load i8, ptr %374, align 1, !tbaa !11, !range !18, !noundef !19
  %376 = trunc i8 %375 to i1
  br i1 %376, label %388, label %377

377:                                              ; preds = %368
  %378 = load i32, ptr %27, align 4, !tbaa !8
  %379 = sext i32 %378 to i64
  %380 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %48, i64 %379
  %381 = load i32, ptr %28, align 4, !tbaa !8
  %382 = sext i32 %381 to i64
  %383 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %380, i64 noundef %382)
          to label %384 unwind label %405

384:                                              ; preds = %377
  %385 = load i8, ptr %383, align 1, !tbaa !15
  %386 = sext i8 %385 to i32
  %387 = icmp eq i32 %386, 46
  br i1 %387, label %388, label %409

388:                                              ; preds = %384, %368, %364, %361, %357, %350
  store i32 19, ptr %8, align 4
  br label %432, !llvm.loop !25

389:                                              ; preds = %337
  %390 = landingpad { ptr, i32 }
          cleanup
  %391 = extractvalue { ptr, i32 } %390, 0
  store ptr %391, ptr %9, align 8
  %392 = extractvalue { ptr, i32 } %390, 1
  store i32 %392, ptr %10, align 4
  br label %458

393:                                              ; preds = %341, %340
  %394 = landingpad { ptr, i32 }
          cleanup
  %395 = extractvalue { ptr, i32 } %394, 0
  store ptr %395, ptr %9, align 8
  %396 = extractvalue { ptr, i32 } %394, 1
  store i32 %396, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  br label %457

397:                                              ; preds = %343
  %398 = landingpad { ptr, i32 }
          cleanup
  %399 = extractvalue { ptr, i32 } %398, 0
  store ptr %399, ptr %9, align 8
  %400 = extractvalue { ptr, i32 } %398, 1
  store i32 %400, ptr %10, align 4
  br label %457

401:                                              ; preds = %349, %347
  %402 = landingpad { ptr, i32 }
          cleanup
  %403 = extractvalue { ptr, i32 } %402, 0
  store ptr %403, ptr %9, align 8
  %404 = extractvalue { ptr, i32 } %402, 1
  store i32 %404, ptr %10, align 4
  br label %452

405:                                              ; preds = %377
  %406 = landingpad { ptr, i32 }
          cleanup
  %407 = extractvalue { ptr, i32 } %406, 0
  store ptr %407, ptr %9, align 8
  %408 = extractvalue { ptr, i32 } %406, 1
  store i32 %408, ptr %10, align 4
  br label %451

409:                                              ; preds = %384
  %410 = load i32, ptr %27, align 4, !tbaa !8
  %411 = sext i32 %410 to i64
  %412 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vis, i64 0, i64 %411
  %413 = load i32, ptr %28, align 4, !tbaa !8
  %414 = sext i32 %413 to i64
  %415 = getelementptr inbounds [1000 x i8], ptr %412, i64 0, i64 %414
  store i8 1, ptr %415, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #9
  %416 = load i32, ptr %27, align 4, !tbaa !8
  %417 = add nsw i32 %416, 1
  store i32 %417, ptr %30, align 4, !tbaa !8
  invoke void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 4 dereferenceable(4) %28)
          to label %418 unwind label %435

418:                                              ; preds = %409
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %24, ptr noundef nonnull align 4 dereferenceable(8) %29)
          to label %419 unwind label %435

419:                                              ; preds = %418
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #9
  %420 = load i32, ptr %27, align 4, !tbaa !8
  %421 = sub nsw i32 %420, 1
  store i32 %421, ptr %32, align 4, !tbaa !8
  invoke void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %31, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(4) %28)
          to label %422 unwind label %439

422:                                              ; preds = %419
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %24, ptr noundef nonnull align 4 dereferenceable(8) %31)
          to label %423 unwind label %439

423:                                              ; preds = %422
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #9
  %424 = load i32, ptr %28, align 4, !tbaa !8
  %425 = add nsw i32 %424, 1
  store i32 %425, ptr %34, align 4, !tbaa !8
  invoke void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %33, ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef nonnull align 4 dereferenceable(4) %34)
          to label %426 unwind label %443

426:                                              ; preds = %423
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %24, ptr noundef nonnull align 4 dereferenceable(8) %33)
          to label %427 unwind label %443

427:                                              ; preds = %426
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #9
  %428 = load i32, ptr %28, align 4, !tbaa !8
  %429 = sub nsw i32 %428, 1
  store i32 %429, ptr %36, align 4, !tbaa !8
  invoke void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %35, ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef nonnull align 4 dereferenceable(4) %36)
          to label %430 unwind label %447

430:                                              ; preds = %427
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %24, ptr noundef nonnull align 4 dereferenceable(8) %35)
          to label %431 unwind label %447

431:                                              ; preds = %430
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #9
  store i32 0, ptr %8, align 4
  br label %432

432:                                              ; preds = %431, %388
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  %433 = load i32, ptr %8, align 4
  switch i32 %433, label %498 [
    i32 0, label %434
    i32 19, label %343
  ]

434:                                              ; preds = %432
  br label %343, !llvm.loop !25

435:                                              ; preds = %418, %409
  %436 = landingpad { ptr, i32 }
          cleanup
  %437 = extractvalue { ptr, i32 } %436, 0
  store ptr %437, ptr %9, align 8
  %438 = extractvalue { ptr, i32 } %436, 1
  store i32 %438, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  br label %451

439:                                              ; preds = %422, %419
  %440 = landingpad { ptr, i32 }
          cleanup
  %441 = extractvalue { ptr, i32 } %440, 0
  store ptr %441, ptr %9, align 8
  %442 = extractvalue { ptr, i32 } %440, 1
  store i32 %442, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  br label %451

443:                                              ; preds = %426, %423
  %444 = landingpad { ptr, i32 }
          cleanup
  %445 = extractvalue { ptr, i32 } %444, 0
  store ptr %445, ptr %9, align 8
  %446 = extractvalue { ptr, i32 } %444, 1
  store i32 %446, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  br label %451

447:                                              ; preds = %430, %427
  %448 = landingpad { ptr, i32 }
          cleanup
  %449 = extractvalue { ptr, i32 } %448, 0
  store ptr %449, ptr %9, align 8
  %450 = extractvalue { ptr, i32 } %448, 1
  store i32 %450, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #9
  br label %451

451:                                              ; preds = %447, %443, %439, %435, %405
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  br label %452

452:                                              ; preds = %451, %401
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  br label %457

453:                                              ; preds = %345
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %24) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr %24) #9
  br label %454

454:                                              ; preds = %453, %332
  %455 = load i32, ptr %23, align 4, !tbaa !8
  %456 = add nsw i32 %455, 1
  store i32 %456, ptr %23, align 4, !tbaa !8
  br label %307, !llvm.loop !26

457:                                              ; preds = %452, %397, %393
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %24) #9
  br label %458

458:                                              ; preds = %457, %389
  call void @llvm.lifetime.end.p0(i64 80, ptr %24) #9
  br label %459

459:                                              ; preds = %458, %333
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  br label %474

460:                                              ; preds = %311
  br label %461

461:                                              ; preds = %460
  %462 = load i32, ptr %22, align 4, !tbaa !8
  %463 = add nsw i32 %462, 1
  store i32 %463, ptr %22, align 4, !tbaa !8
  br label %301, !llvm.loop !27

464:                                              ; preds = %305
  %465 = load i32, ptr %21, align 4, !tbaa !8
  %466 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %465)
          to label %467 unwind label %470

467:                                              ; preds = %464
  %468 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %466, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %469 unwind label %470

469:                                              ; preds = %467
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  br label %475

470:                                              ; preds = %467, %464
  %471 = landingpad { ptr, i32 }
          cleanup
  %472 = extractvalue { ptr, i32 } %471, 0
  store ptr %472, ptr %9, align 8
  %473 = extractvalue { ptr, i32 } %471, 1
  store i32 %473, ptr %10, align 4
  br label %474

474:                                              ; preds = %470, %459
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  br label %478

475:                                              ; preds = %469, %299, %275, %105
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #9
  %476 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %48, i64 %46
  %477 = icmp eq ptr %48, %476
  br i1 %477, label %485, label %481

478:                                              ; preds = %474, %164, %134, %130, %106, %80
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #9
  %479 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %48, i64 %46
  %480 = icmp eq ptr %48, %479
  br i1 %480, label %492, label %488

481:                                              ; preds = %481, %475
  %482 = phi ptr [ %476, %475 ], [ %483, %481 ]
  %483 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %482, i64 -1
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %483) #9
  %484 = icmp eq ptr %483, %48
  br i1 %484, label %485, label %481

485:                                              ; preds = %481, %475
  %486 = load ptr, ptr %4, align 8
  call void @llvm.stackrestore.p0(ptr %486)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  %487 = load i32, ptr %1, align 4
  ret i32 %487

488:                                              ; preds = %488, %478
  %489 = phi ptr [ %479, %478 ], [ %490, %488 ]
  %490 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %489, i64 -1
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %490) #9
  %491 = icmp eq ptr %490, %48
  br i1 %491, label %492, label %488

492:                                              ; preds = %488, %478
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  br label %493

493:                                              ; preds = %492
  %494 = load ptr, ptr %9, align 8
  %495 = load i32, ptr %10, align 4
  %496 = insertvalue { ptr, i32 } poison, ptr %494, 0
  %497 = insertvalue { ptr, i32 } %496, i32 %495, 1
  resume { ptr, i32 } %497

498:                                              ; preds = %432
  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: mustprogress nounwind uwtable
declare ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #7

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11max_elementIPiET_S1_S1_(ptr noundef, ptr noundef) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11min_elementIPiET_S1_S1_(ptr noundef, ptr noundef) #7

; 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 @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_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 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) #8

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


; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%"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] }

@vis = external dso_local local_unnamed_addr global [1000 x [1000 x i8]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::queue", align 8
  %10 = alloca %"struct.std::pair", align 4
  %11 = alloca i32, 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 = alloca %"struct.std::pair", align 4
  %20 = alloca i32, align 4
  %21 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %22 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %24
  %26 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %25, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %27 = 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)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %29 = load i32, ptr %1, align 4, !tbaa !8
  %30 = zext i32 %29 to i64
  %31 = call ptr @llvm.stacksave.p0()
  %32 = alloca %"class.std::__cxx11::basic_string", i64 %30, align 16
  %33 = icmp eq i32 %29, 0
  br i1 %33, label %.loopexit77, label %34

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

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

.loopexit77:                                      ; preds = %36, %0
  %40 = load i32, ptr %1, align 4, !tbaa !8
  %41 = icmp sgt i32 %40, 0
  br i1 %41, label %.lr.ph97, label %.invoke157

._crit_edge98:                                    ; preds = %._crit_edge
  br i1 %.1.lcssa, label %.invoke157, label %60

.lr.ph97:                                         ; preds = %.loopexit77, %._crit_edge
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge ], [ 0, %.loopexit77 ]
  %.03895 = phi i1 [ %.1.lcssa, %._crit_edge ], [ true, %.loopexit77 ]
  %42 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %32, i64 %indvars.iv
  %43 = 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) %42)
          to label %44 unwind label %51

44:                                               ; preds = %.lr.ph97
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %45 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %42) #8
  store ptr %45, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %46 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %42) #8
  store ptr %46, ptr %4, align 8
  %47 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  br i1 %47, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %44
  %.1.lcssa = phi i1 [ %.03895, %44 ], [ %spec.select, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %48 = load i32, ptr %1, align 4, !tbaa !8
  %49 = sext i32 %48 to i64
  %50 = icmp slt i64 %indvars.iv.next, %49
  br i1 %50, label %.lr.ph97, label %._crit_edge98, !llvm.loop !11

51:                                               ; preds = %.lr.ph97
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %285

.lr.ph:                                           ; preds = %44, %.lr.ph
  %.193 = phi i1 [ %spec.select, %.lr.ph ], [ %.03895, %44 ]
  %53 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  %54 = load i8, ptr %53, align 1, !tbaa !13
  %55 = icmp ne i8 %54, 35
  %spec.select = select i1 %55, i1 %.193, i1 false
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  %57 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  br i1 %57, label %.lr.ph, label %._crit_edge

58:                                               ; preds = %.invoke157, %.invoke, %177, %172, %163, %._crit_edge105
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %285

60:                                               ; preds = %._crit_edge98
  %61 = zext i32 %48 to i64
  %62 = alloca i32, i64 %61, align 16
  %63 = load i32, ptr %2, align 4, !tbaa !8
  %64 = zext i32 %63 to i64
  %65 = alloca i32, i64 %64, align 16
  %66 = sext i32 %48 to i64
  %67 = getelementptr inbounds i32, ptr %62, i64 %66
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  store i32 0, ptr %5, align 4, !tbaa !8
  invoke void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull %62, ptr noundef nonnull %67, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %68 unwind label %134

68:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  %69 = load i32, ptr %2, align 4, !tbaa !8
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds i32, ptr %65, i64 %70
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  store i32 0, ptr %6, align 4, !tbaa !8
  invoke void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull %65, ptr noundef nonnull %71, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %72 unwind label %136

72:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  %73 = load i32, ptr %1, align 4, !tbaa !8
  %74 = icmp sgt i32 %73, 0
  %75 = load i32, ptr %2, align 4
  %76 = icmp sgt i32 %75, 0
  %or.cond = select i1 %74, i1 %76, i1 false
  br i1 %or.cond, label %.preheader76, label %._crit_edge105

.preheader76:                                     ; preds = %72, %._crit_edge103
  %77 = phi i32 [ %138, %._crit_edge103 ], [ %75, %72 ]
  %indvars.iv136 = phi i64 [ %indvars.iv.next137, %._crit_edge103 ], [ 0, %72 ]
  %78 = icmp sgt i32 %77, 0
  br i1 %78, label %.lr.ph102, label %._crit_edge103

.lr.ph102:                                        ; preds = %.preheader76
  %79 = icmp eq i64 %indvars.iv136, 0
  %80 = getelementptr %"class.std::__cxx11::basic_string", ptr %32, i64 %indvars.iv136
  %81 = getelementptr inbounds i32, ptr %62, i64 %indvars.iv136
  %82 = getelementptr i8, ptr %80, i64 -32
  br i1 %79, label %.lr.ph102.split.us.preheader, label %.lr.ph102.split.preheader

.lr.ph102.split.preheader:                        ; preds = %.lr.ph102
  %83 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %80, i64 noundef 0)
  %84 = load i8, ptr %83, align 1, !tbaa !13
  %85 = icmp eq i8 %84, 35
  br i1 %85, label %86, label %89

86:                                               ; preds = %.lr.ph102.split.preheader
  %87 = load i32, ptr %81, align 4, !tbaa !8
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %81, align 4, !tbaa !8
  br label %89

89:                                               ; preds = %86, %.lr.ph102.split.preheader
  %90 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %82, i64 noundef 0)
  %91 = load i8, ptr %90, align 1, !tbaa !13
  %92 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %80, i64 noundef 0)
  %93 = load i8, ptr %92, align 1, !tbaa !13
  %.not65.peel = icmp eq i8 %91, %93
  br i1 %.not65.peel, label %._crit_edge140, label %94

94:                                               ; preds = %89
  %95 = load i32, ptr %65, align 16, !tbaa !8
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %65, align 16, !tbaa !8
  br label %._crit_edge140

._crit_edge140:                                   ; preds = %94, %89
  %.pre = load i32, ptr %2, align 4, !tbaa !8
  %97 = icmp sgt i32 %.pre, 1
  br i1 %97, label %.lr.ph102.split.peel.next, label %._crit_edge103

.lr.ph102.split.us.preheader:                     ; preds = %.lr.ph102
  %98 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %32, i64 noundef 0)
  %99 = load i8, ptr %98, align 1, !tbaa !13
  %100 = icmp eq i8 %99, 35
  br i1 %100, label %101, label %104

101:                                              ; preds = %.lr.ph102.split.us.preheader
  %102 = load i32, ptr %65, align 16, !tbaa !8
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %65, align 16, !tbaa !8
  br label %104

104:                                              ; preds = %.lr.ph102.split.us.preheader, %101
  %105 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %80, i64 noundef 0)
  %106 = load i8, ptr %105, align 1, !tbaa !13
  %107 = icmp eq i8 %106, 35
  br i1 %107, label %108, label %._crit_edge144

108:                                              ; preds = %104
  %109 = load i32, ptr %81, align 4, !tbaa !8
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %81, align 4, !tbaa !8
  br label %._crit_edge144

._crit_edge144:                                   ; preds = %108, %104
  %.pre145 = load i32, ptr %2, align 4, !tbaa !8
  %111 = icmp sgt i32 %.pre145, 1
  br i1 %111, label %.lr.ph102.split.us, label %._crit_edge103

.lr.ph102.split.us:                               ; preds = %._crit_edge144, %127
  %indvars.iv132 = phi i64 [ %indvars.iv.next133, %127 ], [ 1, %._crit_edge144 ]
  %112 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %32, i64 noundef %indvars.iv132)
  %113 = load i8, ptr %112, align 1, !tbaa !13
  %114 = icmp eq i8 %113, 35
  br i1 %114, label %115, label %.critedge

115:                                              ; preds = %.lr.ph102.split.us
  %116 = getelementptr inbounds i32, ptr %65, i64 %indvars.iv132
  %117 = load i32, ptr %116, align 4, !tbaa !8
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %116, align 4, !tbaa !8
  br label %.critedge

.critedge:                                        ; preds = %.lr.ph102.split.us, %115
  %119 = add nsw i64 %indvars.iv132, -1
  %120 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %80, i64 noundef %119)
  %121 = load i8, ptr %120, align 1, !tbaa !13
  %122 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %80, i64 noundef %indvars.iv132)
  %123 = load i8, ptr %122, align 1, !tbaa !13
  %.not67.us = icmp eq i8 %121, %123
  br i1 %.not67.us, label %127, label %124

124:                                              ; preds = %.critedge
  %125 = load i32, ptr %81, align 4, !tbaa !8
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %81, align 4, !tbaa !8
  br label %127

127:                                              ; preds = %124, %.critedge
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %128 = load i32, ptr %2, align 4, !tbaa !8
  %129 = sext i32 %128 to i64
  %130 = icmp slt i64 %indvars.iv.next133, %129
  br i1 %130, label %.lr.ph102.split.us, label %._crit_edge103, !llvm.loop !14

._crit_edge105:                                   ; preds = %._crit_edge103, %72
  %.lcssa = phi i32 [ %73, %72 ], [ %139, %._crit_edge103 ]
  %131 = sext i32 %.lcssa to i64
  %132 = getelementptr inbounds i32, ptr %62, i64 %131
  %133 = invoke noundef ptr @_ZSt11max_elementIPiET_S1_S1_(ptr noundef nonnull %62, ptr noundef nonnull %132)
          to label %163 unwind label %58

134:                                              ; preds = %60
  %135 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  br label %285

136:                                              ; preds = %68
  %137 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  br label %285

._crit_edge103:                                   ; preds = %159, %127, %._crit_edge140, %._crit_edge144, %.preheader76
  %138 = phi i32 [ %77, %.preheader76 ], [ %.pre145, %._crit_edge144 ], [ %.pre, %._crit_edge140 ], [ %128, %127 ], [ %160, %159 ]
  %indvars.iv.next137 = add nuw nsw i64 %indvars.iv136, 1
  %139 = load i32, ptr %1, align 4, !tbaa !8
  %140 = sext i32 %139 to i64
  %141 = icmp slt i64 %indvars.iv.next137, %140
  br i1 %141, label %.preheader76, label %._crit_edge105, !llvm.loop !16

.lr.ph102.split.peel.next:                        ; preds = %._crit_edge140, %159
  %indvars.iv128 = phi i64 [ %indvars.iv.next129, %159 ], [ 1, %._crit_edge140 ]
  %142 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %82, i64 noundef %indvars.iv128)
  %143 = load i8, ptr %142, align 1, !tbaa !13
  %144 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %80, i64 noundef %indvars.iv128)
  %145 = load i8, ptr %144, align 1, !tbaa !13
  %.not65 = icmp eq i8 %143, %145
  br i1 %.not65, label %150, label %146

146:                                              ; preds = %.lr.ph102.split.peel.next
  %147 = getelementptr inbounds i32, ptr %65, i64 %indvars.iv128
  %148 = load i32, ptr %147, align 4, !tbaa !8
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %147, align 4, !tbaa !8
  br label %150

150:                                              ; preds = %.lr.ph102.split.peel.next, %146
  %151 = add nsw i64 %indvars.iv128, -1
  %152 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %80, i64 noundef %151)
  %153 = load i8, ptr %152, align 1, !tbaa !13
  %154 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %80, i64 noundef %indvars.iv128)
  %155 = load i8, ptr %154, align 1, !tbaa !13
  %.not67 = icmp eq i8 %153, %155
  br i1 %.not67, label %159, label %156

156:                                              ; preds = %150
  %157 = load i32, ptr %81, align 4, !tbaa !8
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %81, align 4, !tbaa !8
  br label %159

159:                                              ; preds = %150, %156
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %160 = load i32, ptr %2, align 4, !tbaa !8
  %161 = sext i32 %160 to i64
  %162 = icmp slt i64 %indvars.iv.next129, %161
  br i1 %162, label %.lr.ph102.split.peel.next, label %._crit_edge103, !llvm.loop !18

163:                                              ; preds = %._crit_edge105
  %164 = load i32, ptr %2, align 4, !tbaa !8
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds i32, ptr %65, i64 %165
  %167 = invoke noundef ptr @_ZSt11max_elementIPiET_S1_S1_(ptr noundef nonnull %65, ptr noundef nonnull %166)
          to label %168 unwind label %58

168:                                              ; preds = %163
  %169 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %133, ptr noundef nonnull align 4 dereferenceable(4) %167)
  %170 = load i32, ptr %169, align 4, !tbaa !8
  %171 = icmp sgt i32 %170, 2
  br i1 %171, label %.invoke157, label %172

172:                                              ; preds = %168
  %173 = load i32, ptr %1, align 4, !tbaa !8
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds i32, ptr %62, i64 %174
  %176 = invoke noundef ptr @_ZSt11min_elementIPiET_S1_S1_(ptr noundef nonnull %62, ptr noundef nonnull %175)
          to label %177 unwind label %58

177:                                              ; preds = %172
  %178 = load i32, ptr %176, align 4, !tbaa !8
  %179 = load i32, ptr %2, align 4, !tbaa !8
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds i32, ptr %65, i64 %180
  %182 = invoke noundef ptr @_ZSt11min_elementIPiET_S1_S1_(ptr noundef nonnull %65, ptr noundef nonnull %181)
          to label %183 unwind label %58

183:                                              ; preds = %177
  %184 = icmp eq i32 %178, 0
  %185 = load i32, ptr %182, align 4, !tbaa !8
  %186 = icmp eq i32 %185, 0
  %187 = xor i1 %184, %186
  br i1 %187, label %.invoke157, label %191

.invoke157:                                       ; preds = %._crit_edge98, %.loopexit77, %183, %168
  %188 = phi i32 [ -1, %168 ], [ -1, %183 ], [ 0, %.loopexit77 ], [ 0, %._crit_edge98 ]
  %189 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %188)
          to label %.invoke unwind label %58

.invoke:                                          ; preds = %.invoke157
  %190 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %189, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %283 unwind label %58

191:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  store i32 0, ptr %7, align 4, !tbaa !8
  %192 = load i32, ptr %1, align 4, !tbaa !8
  %193 = icmp sgt i32 %192, 0
  %194 = load i32, ptr %2, align 4
  %195 = icmp sgt i32 %194, 0
  %or.cond168 = select i1 %193, i1 %195, i1 false
  br i1 %or.cond168, label %.lr.ph118.split, label %._crit_edge119

._crit_edge119:                                   ; preds = %._crit_edge114, %191
  %.039.lcssa = phi i32 [ 0, %191 ], [ %.140.lcssa, %._crit_edge114 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  %196 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.039.lcssa)
          to label %279 unwind label %281

.lr.ph118.split:                                  ; preds = %191, %._crit_edge114
  %197 = phi i32 [ %201, %._crit_edge114 ], [ %192, %191 ]
  %198 = phi i32 [ %204, %._crit_edge114 ], [ 0, %191 ]
  %199 = phi i32 [ %203, %._crit_edge114 ], [ %194, %191 ]
  %.039116 = phi i32 [ %.140.lcssa, %._crit_edge114 ], [ 0, %191 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  store i32 0, ptr %8, align 4, !tbaa !8
  %200 = icmp sgt i32 %199, 0
  br i1 %200, label %.lr.ph113, label %._crit_edge114

._crit_edge114.loopexit:                          ; preds = %272
  %.pre147 = load i32, ptr %7, align 4, !tbaa !8
  %.pre148 = load i32, ptr %1, align 4, !tbaa !8
  br label %._crit_edge114

._crit_edge114:                                   ; preds = %._crit_edge114.loopexit, %.lr.ph118.split
  %201 = phi i32 [ %197, %.lr.ph118.split ], [ %.pre148, %._crit_edge114.loopexit ]
  %202 = phi i32 [ %198, %.lr.ph118.split ], [ %.pre147, %._crit_edge114.loopexit ]
  %203 = phi i32 [ %199, %.lr.ph118.split ], [ %275, %._crit_edge114.loopexit ]
  %.140.lcssa = phi i32 [ %.039116, %.lr.ph118.split ], [ %.241, %._crit_edge114.loopexit ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  %204 = add nsw i32 %202, 1
  store i32 %204, ptr %7, align 4, !tbaa !8
  %205 = icmp slt i32 %204, %201
  br i1 %205, label %.lr.ph118.split, label %._crit_edge119, !llvm.loop !19

.lr.ph113:                                        ; preds = %.lr.ph118.split, %272
  %.140111 = phi i32 [ %.241, %272 ], [ %.039116, %.lr.ph118.split ]
  %storemerge59110 = phi i32 [ %274, %272 ], [ 0, %.lr.ph118.split ]
  %206 = load i32, ptr %7, align 4, !tbaa !8
  %207 = sext i32 %206 to i64
  %208 = sext i32 %storemerge59110 to i64
  %209 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vis, i64 0, i64 %207, i64 %208
  %210 = load i8, ptr %209, align 1, !tbaa !20, !range !22, !noundef !23
  %211 = trunc nuw i8 %210 to i1
  br i1 %211, label %272, label %212

212:                                              ; preds = %.lr.ph113
  %213 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %32, i64 %207
  %214 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %213, i64 noundef %208)
  %215 = load i8, ptr %214, align 1, !tbaa !13
  %216 = icmp eq i8 %215, 46
  br i1 %216, label %272, label %217

217:                                              ; preds = %212
  %218 = add nsw i32 %.140111, 1
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %9) #8
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %9)
          to label %219 unwind label %240

219:                                              ; preds = %217
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %10, 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) %9, ptr noundef nonnull align 4 dereferenceable(8) %10)
          to label %220 unwind label %242

220:                                              ; preds = %219
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  %221 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %9)
  br i1 %221, label %._crit_edge109, label %.lr.ph108

.lr.ph108:                                        ; preds = %220, %261
  %222 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %9)
  %.sroa.0.0.copyload = load i32, ptr %222, align 4
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %222, 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) %9)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  store i32 %.sroa.0.0.copyload, ptr %11, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  store i32 %.sroa.5.0.copyload, ptr %12, align 4, !tbaa !8
  %223 = icmp slt i32 %.sroa.0.0.copyload, 0
  br i1 %223, label %261, label %224, !llvm.loop !24

224:                                              ; preds = %.lr.ph108
  %225 = load i32, ptr %1, align 4, !tbaa !8
  %226 = icmp slt i32 %.sroa.0.0.copyload, %225
  %227 = icmp sgt i32 %.sroa.5.0.copyload, -1
  %or.cond.not73 = select i1 %226, i1 %227, i1 false
  %228 = load i32, ptr %2, align 4
  %.not = icmp slt i32 %.sroa.5.0.copyload, %228
  %or.cond70 = select i1 %or.cond.not73, i1 %.not, i1 false
  br i1 %or.cond70, label %229, label %261, !llvm.loop !24

229:                                              ; preds = %224
  %230 = zext nneg i32 %.sroa.0.0.copyload to i64
  %231 = zext nneg i32 %.sroa.5.0.copyload to i64
  %232 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vis, i64 0, i64 %230, i64 %231
  %233 = load i8, ptr %232, align 1, !tbaa !20, !range !22, !noundef !23
  %234 = trunc nuw i8 %233 to i1
  br i1 %234, label %261, label %235, !llvm.loop !24

235:                                              ; preds = %229
  %236 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %32, i64 %230
  %237 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %236, i64 noundef %231)
  %238 = load i8, ptr %237, align 1, !tbaa !13
  %239 = icmp eq i8 %238, 46
  br i1 %239, label %261, label %244, !llvm.loop !24

240:                                              ; preds = %217
  %241 = landingpad { ptr, i32 }
          cleanup
  br label %278

242:                                              ; preds = %219
  %243 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  br label %277

244:                                              ; preds = %235
  %245 = load i32, ptr %11, align 4, !tbaa !8
  %246 = sext i32 %245 to i64
  %247 = load i32, ptr %12, align 4, !tbaa !8
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vis, i64 0, i64 %246, i64 %248
  store i8 1, ptr %249, align 1, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #8
  %250 = add nsw i32 %245, 1
  store i32 %250, 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) %12)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %9, ptr noundef nonnull align 4 dereferenceable(8) %13)
          to label %251 unwind label %263

251:                                              ; preds = %244
  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
  %252 = load i32, ptr %11, align 4, !tbaa !8
  %253 = add nsw i32 %252, -1
  store i32 %253, ptr %16, align 4, !tbaa !8
  call void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_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) %16, ptr noundef nonnull align 4 dereferenceable(4) %12)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %9, ptr noundef nonnull align 4 dereferenceable(8) %15)
          to label %254 unwind label %265

254:                                              ; preds = %251
  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
  %255 = load i32, ptr %12, align 4, !tbaa !8
  %256 = add nsw i32 %255, 1
  store i32 %256, 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) %11, ptr noundef nonnull align 4 dereferenceable(4) %18)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %9, ptr noundef nonnull align 4 dereferenceable(8) %17)
          to label %257 unwind label %267

257:                                              ; preds = %254
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #8
  %258 = load i32, ptr %12, align 4, !tbaa !8
  %259 = add nsw i32 %258, -1
  store i32 %259, ptr %20, align 4, !tbaa !8
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %20)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %9, ptr noundef nonnull align 4 dereferenceable(8) %19)
          to label %260 unwind label %269

260:                                              ; preds = %257
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  br label %261

261:                                              ; preds = %.lr.ph108, %224, %229, %235, %260
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  %262 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %9)
  br i1 %262, label %._crit_edge109, label %.lr.ph108

263:                                              ; preds = %244
  %264 = 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 %271

265:                                              ; preds = %251
  %266 = 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 %271

267:                                              ; preds = %254
  %268 = 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 %271

269:                                              ; preds = %257
  %270 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  br label %271

271:                                              ; preds = %269, %267, %265, %263
  %.pn = phi { ptr, i32 } [ %270, %269 ], [ %268, %267 ], [ %266, %265 ], [ %264, %263 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  br label %277

._crit_edge109:                                   ; preds = %261, %220
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %9) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %9) #8
  br label %272

272:                                              ; preds = %.lr.ph113, %212, %._crit_edge109
  %.241 = phi i32 [ %.140111, %.lr.ph113 ], [ %.140111, %212 ], [ %218, %._crit_edge109 ]
  %273 = load i32, ptr %8, align 4, !tbaa !8
  %274 = add nsw i32 %273, 1
  store i32 %274, ptr %8, align 4, !tbaa !8
  %275 = load i32, ptr %2, align 4, !tbaa !8
  %276 = icmp slt i32 %274, %275
  br i1 %276, label %.lr.ph113, label %._crit_edge114.loopexit, !llvm.loop !25

277:                                              ; preds = %271, %242
  %.pn.pn = phi { ptr, i32 } [ %.pn, %271 ], [ %243, %242 ]
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %9) #8
  br label %278

278:                                              ; preds = %277, %240
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %277 ], [ %241, %240 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  br label %285

279:                                              ; preds = %._crit_edge119
  %280 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %196, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %283 unwind label %281

281:                                              ; preds = %279, %._crit_edge119
  %282 = landingpad { ptr, i32 }
          cleanup
  br label %285

283:                                              ; preds = %.invoke, %279
  br i1 %33, label %.loopexit75, label %.preheader74.preheader

.preheader74.preheader:                           ; preds = %283
  %284 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %32, i64 %30
  br label %.preheader74

285:                                              ; preds = %278, %281, %136, %134, %58, %51
  %.pn68 = phi { ptr, i32 } [ %52, %51 ], [ %59, %58 ], [ %137, %136 ], [ %135, %134 ], [ %.pn.pn.pn, %278 ], [ %282, %281 ]
  br i1 %33, label %.loopexit, label %.preheader.preheader

.preheader.preheader:                             ; preds = %285
  %286 = getelementptr inbounds %"class.std::__cxx11::basic_string", ptr %32, i64 %30
  br label %.preheader

.preheader74:                                     ; preds = %.preheader74.preheader, %.preheader74
  %287 = phi ptr [ %288, %.preheader74 ], [ %284, %.preheader74.preheader ]
  %288 = getelementptr inbounds i8, ptr %287, i64 -32
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %288) #8
  %289 = icmp eq ptr %288, %32
  br i1 %289, label %.loopexit75, label %.preheader74

.loopexit75:                                      ; preds = %.preheader74, %283
  call void @llvm.stackrestore.p0(ptr %31)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0

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

.loopexit:                                        ; preds = %.preheader, %285
  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 } %.pn68
}

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 nounwind uwtable
declare ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #7

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11max_elementIPiET_S1_S1_(ptr noundef, ptr noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11min_elementIPiET_S1_S1_(ptr noundef, ptr noundef) local_unnamed_addr #7

; 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 @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_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 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 #5 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 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, !17}
!20 = !{!21, !21, i64 0}
!21 = !{!"bool", !10, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}


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