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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@N = external dso_local global i64, align 8
@K = external dso_local global i64, align 8
@dp = external dso_local global [501 x i64], align 16
@a = external dso_local global [500 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::queue", align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca %"class.std::stack", align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca %"class.std::vector", align 8
  %20 = alloca %"class.std::vector", align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca ptr, align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca i64, align 8
  %27 = alloca ptr, align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %30 = alloca i64, align 8
  %31 = alloca ptr, align 8
  %32 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %33 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %34 = alloca i64, align 8
  %35 = alloca ptr, align 8
  %36 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %37 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %38 = alloca i64, align 8
  %39 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %40 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %41 = getelementptr i8, ptr %40, i64 -24
  %42 = load i64, ptr %41, align 8
  %43 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %42
  %44 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %43, ptr noundef null)
  %45 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 8 dereferenceable(8) @K)
  %48 = load i64, ptr @N, align 8, !tbaa !8
  %49 = getelementptr inbounds i64, ptr @dp, i64 %48
  %50 = getelementptr inbounds i64, ptr %49, i64 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 -1, ptr %2, align 4, !tbaa !11
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef @dp, ptr noundef %50, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 80, ptr %3) #7
  call void @_ZNSt5queueIxSt5dequeIxSaIxEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  store i64 0, ptr @dp, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  store i64 0, ptr %4, align 8, !tbaa !8
  invoke void @_ZNSt5queueIxSt5dequeIxSaIxEEE4pushEOx(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %51 unwind label %66

51:                                               ; preds = %0
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %52

52:                                               ; preds = %127, %51
  %53 = invoke noundef zeroext i1 @_ZNKSt5queueIxSt5dequeIxSaIxEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %54 unwind label %70

54:                                               ; preds = %52
  %55 = xor i1 %53, true
  br i1 %55, label %56, label %129

56:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5queueIxSt5dequeIxSaIxEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %58 unwind label %74

58:                                               ; preds = %56
  %59 = load i64, ptr %57, align 8, !tbaa !8
  store i64 %59, ptr %7, align 8, !tbaa !8
  invoke void @_ZNSt5queueIxSt5dequeIxSaIxEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %60 unwind label %74

60:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store i64 0, ptr %8, align 8, !tbaa !8
  br label %61

61:                                               ; preds = %120, %60
  %62 = load i64, ptr %8, align 8, !tbaa !8
  %63 = load i64, ptr @K, align 8, !tbaa !8
  %64 = icmp sle i64 %62, %63
  br i1 %64, label %78, label %65

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

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

70:                                               ; preds = %136, %134, %52
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %5, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %6, align 4
  br label %390

74:                                               ; preds = %58, %56
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %5, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %6, align 4
  br label %128

78:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %79 = load i64, ptr %7, align 8, !tbaa !8
  %80 = load i64, ptr %8, align 8, !tbaa !8
  %81 = mul nsw i64 2, %80
  %82 = add nsw i64 %79, %81
  %83 = load i64, ptr @K, align 8, !tbaa !8
  %84 = sub nsw i64 %82, %83
  store i64 %84, ptr %10, align 8, !tbaa !8
  %85 = load i64, ptr @K, align 8, !tbaa !8
  %86 = load i64, ptr %8, align 8, !tbaa !8
  %87 = sub nsw i64 %85, %86
  %88 = load i64, ptr %7, align 8, !tbaa !8
  %89 = icmp sgt i64 %87, %88
  br i1 %89, label %108, label %90

90:                                               ; preds = %78
  %91 = load i64, ptr @N, align 8, !tbaa !8
  %92 = load i64, ptr %7, align 8, !tbaa !8
  %93 = sub nsw i64 %91, %92
  %94 = load i64, ptr %8, align 8, !tbaa !8
  %95 = icmp slt i64 %93, %94
  br i1 %95, label %108, label %96

96:                                               ; preds = %90
  %97 = load i64, ptr %10, align 8, !tbaa !8
  %98 = icmp slt i64 %97, 0
  br i1 %98, label %108, label %99

99:                                               ; preds = %96
  %100 = load i64, ptr %10, align 8, !tbaa !8
  %101 = load i64, ptr @N, align 8, !tbaa !8
  %102 = icmp sgt i64 %100, %101
  br i1 %102, label %108, label %103

103:                                              ; preds = %99
  %104 = load i64, ptr %10, align 8, !tbaa !8
  %105 = getelementptr inbounds [501 x i64], ptr @dp, i64 0, i64 %104
  %106 = load i64, ptr %105, align 8, !tbaa !8
  %107 = icmp ne i64 %106, -1
  br i1 %107, label %108, label %109

108:                                              ; preds = %103, %99, %96, %90, %78
  store i32 6, ptr %9, align 4
  br label %117

109:                                              ; preds = %103
  %110 = load i64, ptr %7, align 8, !tbaa !8
  %111 = getelementptr inbounds [501 x i64], ptr @dp, i64 0, i64 %110
  %112 = load i64, ptr %111, align 8, !tbaa !8
  %113 = add nsw i64 %112, 1
  %114 = load i64, ptr %10, align 8, !tbaa !8
  %115 = getelementptr inbounds [501 x i64], ptr @dp, i64 0, i64 %114
  store i64 %113, ptr %115, align 8, !tbaa !8
  invoke void @_ZNSt5queueIxSt5dequeIxSaIxEEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %116 unwind label %123

116:                                              ; preds = %109
  store i32 0, ptr %9, align 4
  br label %117

117:                                              ; preds = %116, %108
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %118 = load i32, ptr %9, align 4
  switch i32 %118, label %396 [
    i32 0, label %119
    i32 6, label %120
  ]

119:                                              ; preds = %117
  br label %120

120:                                              ; preds = %119, %117
  %121 = load i64, ptr %8, align 8, !tbaa !8
  %122 = add nsw i64 %121, 1
  store i64 %122, ptr %8, align 8, !tbaa !8
  br label %61, !llvm.loop !13

123:                                              ; preds = %109
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %5, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %128

127:                                              ; preds = %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %52, !llvm.loop !15

128:                                              ; preds = %123, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %390

129:                                              ; preds = %54
  %130 = load i64, ptr @N, align 8, !tbaa !8
  %131 = getelementptr inbounds [501 x i64], ptr @dp, i64 0, i64 %130
  %132 = load i64, ptr %131, align 8, !tbaa !8
  %133 = icmp eq i64 %132, -1
  br i1 %133, label %134, label %139

134:                                              ; preds = %129
  %135 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
          to label %136 unwind label %70

136:                                              ; preds = %134
  %137 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %135, i8 noundef signext 10)
          to label %138 unwind label %70

138:                                              ; preds = %136
  store i32 0, ptr %1, align 4
  store i32 1, ptr %9, align 4
  br label %383

139:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 80, ptr %11) #7
  invoke void @_ZNSt5stackIxSt5dequeIxSaIxEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %11)
          to label %140 unwind label %151

140:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %141 = load i64, ptr @N, align 8, !tbaa !8
  store i64 %141, ptr %12, align 8, !tbaa !8
  br label %142

142:                                              ; preds = %203, %140
  %143 = load i64, ptr %12, align 8, !tbaa !8
  %144 = icmp ne i64 %143, 0
  br i1 %144, label %145, label %204

145:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 0, ptr %13, align 8, !tbaa !8
  br label %146

146:                                              ; preds = %199, %145
  %147 = load i64, ptr %13, align 8, !tbaa !8
  %148 = load i64, ptr @K, align 8, !tbaa !8
  %149 = icmp sle i64 %147, %148
  br i1 %149, label %155, label %150

150:                                              ; preds = %146
  store i32 9, ptr %9, align 4
  br label %202

151:                                              ; preds = %139
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %5, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %6, align 4
  br label %389

155:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %156 = load i64, ptr %12, align 8, !tbaa !8
  %157 = load i64, ptr %13, align 8, !tbaa !8
  %158 = mul nsw i64 2, %157
  %159 = load i64, ptr @K, align 8, !tbaa !8
  %160 = sub nsw i64 %158, %159
  %161 = sub nsw i64 %156, %160
  store i64 %161, ptr %14, align 8, !tbaa !8
  %162 = load i64, ptr @K, align 8, !tbaa !8
  %163 = load i64, ptr %13, align 8, !tbaa !8
  %164 = sub nsw i64 %162, %163
  %165 = load i64, ptr %14, align 8, !tbaa !8
  %166 = icmp sgt i64 %164, %165
  br i1 %166, label %189, label %167

167:                                              ; preds = %155
  %168 = load i64, ptr @N, align 8, !tbaa !8
  %169 = load i64, ptr %14, align 8, !tbaa !8
  %170 = sub nsw i64 %168, %169
  %171 = load i64, ptr %13, align 8, !tbaa !8
  %172 = icmp slt i64 %170, %171
  br i1 %172, label %189, label %173

173:                                              ; preds = %167
  %174 = load i64, ptr %14, align 8, !tbaa !8
  %175 = icmp slt i64 %174, 0
  br i1 %175, label %189, label %176

176:                                              ; preds = %173
  %177 = load i64, ptr %14, align 8, !tbaa !8
  %178 = load i64, ptr @N, align 8, !tbaa !8
  %179 = icmp sgt i64 %177, %178
  br i1 %179, label %189, label %180

180:                                              ; preds = %176
  %181 = load i64, ptr %14, align 8, !tbaa !8
  %182 = getelementptr inbounds [501 x i64], ptr @dp, i64 0, i64 %181
  %183 = load i64, ptr %182, align 8, !tbaa !8
  %184 = load i64, ptr %12, align 8, !tbaa !8
  %185 = getelementptr inbounds [501 x i64], ptr @dp, i64 0, i64 %184
  %186 = load i64, ptr %185, align 8, !tbaa !8
  %187 = sub nsw i64 %186, 1
  %188 = icmp ne i64 %183, %187
  br i1 %188, label %189, label %190

189:                                              ; preds = %180, %176, %173, %167, %155
  store i32 11, ptr %9, align 4
  br label %197

190:                                              ; preds = %180
  invoke void @_ZNSt5stackIxSt5dequeIxSaIxEEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(80) %11, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %191 unwind label %193

191:                                              ; preds = %190
  %192 = load i64, ptr %14, align 8, !tbaa !8
  store i64 %192, ptr %12, align 8, !tbaa !8
  store i32 9, ptr %9, align 4
  br label %197

193:                                              ; preds = %190
  %194 = landingpad { ptr, i32 }
          cleanup
  %195 = extractvalue { ptr, i32 } %194, 0
  store ptr %195, ptr %5, align 8
  %196 = extractvalue { ptr, i32 } %194, 1
  store i32 %196, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %388

197:                                              ; preds = %191, %189
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  %198 = load i32, ptr %9, align 4
  switch i32 %198, label %202 [
    i32 11, label %199
  ]

199:                                              ; preds = %197
  %200 = load i64, ptr %13, align 8, !tbaa !8
  %201 = add nsw i64 %200, 1
  store i64 %201, ptr %13, align 8, !tbaa !8
  br label %146, !llvm.loop !16

202:                                              ; preds = %197, %150
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %203

203:                                              ; preds = %202
  br label %142, !llvm.loop !17

204:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store i64 0, ptr %15, align 8, !tbaa !8
  br label %205

205:                                              ; preds = %365, %204
  %206 = invoke noundef zeroext i1 @_ZNKSt5stackIxSt5dequeIxSaIxEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %11)
          to label %207 unwind label %222

207:                                              ; preds = %205
  %208 = xor i1 %206, true
  br i1 %208, label %209, label %375

209:                                              ; preds = %207
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %210 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5stackIxSt5dequeIxSaIxEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %11)
          to label %211 unwind label %226

211:                                              ; preds = %209
  %212 = load i64, ptr %210, align 8, !tbaa !8
  store i64 %212, ptr %16, align 8, !tbaa !8
  invoke void @_ZNSt5stackIxSt5dequeIxSaIxEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %11)
          to label %213 unwind label %226

213:                                              ; preds = %211
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %214 = load i64, ptr %16, align 8, !tbaa !8
  store i64 %214, ptr %17, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %215 = load i64, ptr @K, align 8, !tbaa !8
  %216 = load i64, ptr %16, align 8, !tbaa !8
  %217 = sub nsw i64 %215, %216
  store i64 %217, ptr %18, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #7
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #7
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  store i64 0, ptr %21, align 8, !tbaa !8
  br label %218

218:                                              ; preds = %244, %213
  %219 = load i64, ptr %17, align 8, !tbaa !8
  %220 = icmp ne i64 %219, 0
  br i1 %220, label %230, label %221

221:                                              ; preds = %218
  store i32 14, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %247

222:                                              ; preds = %380, %377, %375, %205
  %223 = landingpad { ptr, i32 }
          cleanup
  %224 = extractvalue { ptr, i32 } %223, 0
  store ptr %224, ptr %5, align 8
  %225 = extractvalue { ptr, i32 } %223, 1
  store i32 %225, ptr %6, align 4
  br label %387

226:                                              ; preds = %211, %209
  %227 = landingpad { ptr, i32 }
          cleanup
  %228 = extractvalue { ptr, i32 } %227, 0
  store ptr %228, ptr %5, align 8
  %229 = extractvalue { ptr, i32 } %227, 1
  store i32 %229, ptr %6, align 4
  br label %374

230:                                              ; preds = %218
  %231 = load i64, ptr %21, align 8, !tbaa !8
  %232 = getelementptr inbounds [500 x i8], ptr @a, i64 0, i64 %231
  %233 = load i8, ptr %232, align 1, !tbaa !18, !range !20, !noundef !21
  %234 = trunc i8 %233 to i1
  br i1 %234, label %243, label %235

235:                                              ; preds = %230
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %236 unwind label %239

236:                                              ; preds = %235
  %237 = load i64, ptr %17, align 8, !tbaa !8
  %238 = add nsw i64 %237, -1
  store i64 %238, ptr %17, align 8, !tbaa !8
  br label %243

239:                                              ; preds = %235
  %240 = landingpad { ptr, i32 }
          cleanup
  %241 = extractvalue { ptr, i32 } %240, 0
  store ptr %241, ptr %5, align 8
  %242 = extractvalue { ptr, i32 } %240, 1
  store i32 %242, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %373

243:                                              ; preds = %236, %230
  br label %244

244:                                              ; preds = %243
  %245 = load i64, ptr %21, align 8, !tbaa !8
  %246 = add nsw i64 %245, 1
  store i64 %246, ptr %21, align 8, !tbaa !8
  br label %218, !llvm.loop !22

247:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  store i64 0, ptr %22, align 8, !tbaa !8
  br label %248

248:                                              ; preds = %266, %247
  %249 = load i64, ptr %18, align 8, !tbaa !8
  %250 = icmp ne i64 %249, 0
  br i1 %250, label %252, label %251

251:                                              ; preds = %248
  store i32 17, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %269

252:                                              ; preds = %248
  %253 = load i64, ptr %22, align 8, !tbaa !8
  %254 = getelementptr inbounds [500 x i8], ptr @a, i64 0, i64 %253
  %255 = load i8, ptr %254, align 1, !tbaa !18, !range !20, !noundef !21
  %256 = trunc i8 %255 to i1
  br i1 %256, label %257, label %265

257:                                              ; preds = %252
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %258 unwind label %261

258:                                              ; preds = %257
  %259 = load i64, ptr %18, align 8, !tbaa !8
  %260 = add nsw i64 %259, -1
  store i64 %260, ptr %18, align 8, !tbaa !8
  br label %265

261:                                              ; preds = %257
  %262 = landingpad { ptr, i32 }
          cleanup
  %263 = extractvalue { ptr, i32 } %262, 0
  store ptr %263, ptr %5, align 8
  %264 = extractvalue { ptr, i32 } %262, 1
  store i32 %264, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %373

265:                                              ; preds = %258, %252
  br label %266

266:                                              ; preds = %265
  %267 = load i64, ptr %22, align 8, !tbaa !8
  %268 = add nsw i64 %267, 1
  store i64 %268, ptr %22, align 8, !tbaa !8
  br label %248, !llvm.loop !23

269:                                              ; preds = %251
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  store ptr %19, ptr %23, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %270 = load ptr, ptr %23, align 8, !tbaa !24
  %271 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %270) #7
  %272 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %271, ptr %272, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %273 = load ptr, ptr %23, align 8, !tbaa !24
  %274 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %273) #7
  %275 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %274, ptr %275, align 8
  br label %276

276:                                              ; preds = %284, %269
  %277 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #7
  br i1 %277, label %279, label %278

278:                                              ; preds = %276
  store i32 20, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %286

279:                                              ; preds = %276
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %280 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #7
  %281 = load i64, ptr %280, align 8, !tbaa !8
  store i64 %281, ptr %26, align 8, !tbaa !8
  %282 = load i64, ptr %26, align 8, !tbaa !8
  %283 = getelementptr inbounds [500 x i8], ptr @a, i64 0, i64 %282
  store i8 1, ptr %283, align 1, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %284

284:                                              ; preds = %279
  %285 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #7
  br label %276

286:                                              ; preds = %278
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  store ptr %20, ptr %27, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %287 = load ptr, ptr %27, align 8, !tbaa !24
  %288 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %287) #7
  %289 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  store ptr %288, ptr %289, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %290 = load ptr, ptr %27, align 8, !tbaa !24
  %291 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %290) #7
  %292 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %29, i32 0, i32 0
  store ptr %291, ptr %292, align 8
  br label %293

293:                                              ; preds = %301, %286
  %294 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29) #7
  br i1 %294, label %296, label %295

295:                                              ; preds = %293
  store i32 22, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %303

296:                                              ; preds = %293
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %297 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #7
  %298 = load i64, ptr %297, align 8, !tbaa !8
  store i64 %298, ptr %30, align 8, !tbaa !8
  %299 = load i64, ptr %30, align 8, !tbaa !8
  %300 = getelementptr inbounds [500 x i8], ptr @a, i64 0, i64 %299
  store i8 0, ptr %300, align 1, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  br label %301

301:                                              ; preds = %296
  %302 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #7
  br label %293

303:                                              ; preds = %295
  %304 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 63)
          to label %305 unwind label %315

305:                                              ; preds = %303
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  store ptr %19, ptr %31, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  %306 = load ptr, ptr %31, align 8, !tbaa !24
  %307 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %306) #7
  %308 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %32, i32 0, i32 0
  store ptr %307, ptr %308, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  %309 = load ptr, ptr %31, align 8, !tbaa !24
  %310 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %309) #7
  %311 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %33, i32 0, i32 0
  store ptr %310, ptr %311, align 8
  br label %312

312:                                              ; preds = %328, %305
  %313 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %33) #7
  br i1 %313, label %319, label %314

314:                                              ; preds = %312
  store i32 24, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  br label %334

315:                                              ; preds = %361, %359, %303
  %316 = landingpad { ptr, i32 }
          cleanup
  %317 = extractvalue { ptr, i32 } %316, 0
  store ptr %317, ptr %5, align 8
  %318 = extractvalue { ptr, i32 } %316, 1
  store i32 %318, ptr %6, align 4
  br label %373

319:                                              ; preds = %312
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #7
  %320 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #7
  %321 = load i64, ptr %320, align 8, !tbaa !8
  store i64 %321, ptr %34, align 8, !tbaa !8
  %322 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 32)
          to label %323 unwind label %330

323:                                              ; preds = %319
  %324 = load i64, ptr %34, align 8, !tbaa !8
  %325 = add nsw i64 %324, 1
  %326 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %322, i64 noundef %325)
          to label %327 unwind label %330

327:                                              ; preds = %323
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  br label %328

328:                                              ; preds = %327
  %329 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #7
  br label %312

330:                                              ; preds = %323, %319
  %331 = landingpad { ptr, i32 }
          cleanup
  %332 = extractvalue { ptr, i32 } %331, 0
  store ptr %332, ptr %5, align 8
  %333 = extractvalue { ptr, i32 } %331, 1
  store i32 %333, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  br label %373

334:                                              ; preds = %314
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  store ptr %20, ptr %35, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #7
  %335 = load ptr, ptr %35, align 8, !tbaa !24
  %336 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %335) #7
  %337 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %36, i32 0, i32 0
  store ptr %336, ptr %337, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #7
  %338 = load ptr, ptr %35, align 8, !tbaa !24
  %339 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %338) #7
  %340 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %37, i32 0, i32 0
  store ptr %339, ptr %340, align 8
  br label %341

341:                                              ; preds = %353, %334
  %342 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(8) %37) #7
  br i1 %342, label %344, label %343

343:                                              ; preds = %341
  store i32 26, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  br label %359

344:                                              ; preds = %341
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  %345 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #7
  %346 = load i64, ptr %345, align 8, !tbaa !8
  store i64 %346, ptr %38, align 8, !tbaa !8
  %347 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 32)
          to label %348 unwind label %355

348:                                              ; preds = %344
  %349 = load i64, ptr %38, align 8, !tbaa !8
  %350 = add nsw i64 %349, 1
  %351 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %347, i64 noundef %350)
          to label %352 unwind label %355

352:                                              ; preds = %348
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  br label %353

353:                                              ; preds = %352
  %354 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #7
  br label %341

355:                                              ; preds = %348, %344
  %356 = landingpad { ptr, i32 }
          cleanup
  %357 = extractvalue { ptr, i32 } %356, 0
  store ptr %357, ptr %5, align 8
  %358 = extractvalue { ptr, i32 } %356, 1
  store i32 %358, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  br label %373

359:                                              ; preds = %343
  %360 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 10)
          to label %361 unwind label %315

361:                                              ; preds = %359
  %362 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout)
          to label %363 unwind label %315

363:                                              ; preds = %361
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  %364 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %39)
          to label %365 unwind label %369

365:                                              ; preds = %363
  %366 = load i64, ptr %39, align 8, !tbaa !8
  %367 = load i64, ptr %15, align 8, !tbaa !8
  %368 = xor i64 %367, %366
  store i64 %368, ptr %15, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %205, !llvm.loop !26

369:                                              ; preds = %363
  %370 = landingpad { ptr, i32 }
          cleanup
  %371 = extractvalue { ptr, i32 } %370, 0
  store ptr %371, ptr %5, align 8
  %372 = extractvalue { ptr, i32 } %370, 1
  store i32 %372, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  br label %373

373:                                              ; preds = %369, %355, %330, %315, %261, %239
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %374

374:                                              ; preds = %373, %226
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %387

375:                                              ; preds = %207
  %376 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %377 unwind label %222

377:                                              ; preds = %375
  %378 = load i64, ptr %15, align 8, !tbaa !8
  %379 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %376, i64 noundef %378)
          to label %380 unwind label %222

380:                                              ; preds = %377
  %381 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %379, i8 noundef signext 10)
          to label %382 unwind label %222

382:                                              ; preds = %380
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @_ZNSt5stackIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %11) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %11) #7
  store i32 0, ptr %9, align 4
  br label %383

383:                                              ; preds = %382, %138
  call void @_ZNSt5queueIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %3) #7
  %384 = load i32, ptr %9, align 4
  switch i32 %384, label %396 [
    i32 0, label %385
    i32 1, label %385
  ]

385:                                              ; preds = %383, %383
  %386 = load i32, ptr %1, align 4
  ret i32 %386

387:                                              ; preds = %374, %222
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %388

388:                                              ; preds = %387, %193
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @_ZNSt5stackIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %11) #7
  br label %389

389:                                              ; preds = %388, %151
  call void @llvm.lifetime.end.p0(i64 80, ptr %11) #7
  br label %390

390:                                              ; preds = %389, %128, %70, %66
  call void @_ZNSt5queueIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %3) #7
  br label %391

391:                                              ; preds = %390
  %392 = load ptr, ptr %5, align 8
  %393 = load i32, ptr %6, align 4
  %394 = insertvalue { ptr, i32 } poison, ptr %392, 0
  %395 = insertvalue { ptr, i32 } %394, i32 %393, 1
  resume { ptr, i32 } %395

396:                                              ; preds = %383, %117
  unreachable
}

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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

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

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

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

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

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


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@N = external dso_local global i64, align 8
@K = external dso_local global i64, align 8
@dp = external dso_local global [501 x i64], align 16
@a = external dso_local local_unnamed_addr global [500 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::queue", align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::stack", align 8
  %6 = alloca i64, align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca i64, align 8
  %20 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %21 = getelementptr i8, ptr %20, i64 -24
  %22 = load i64, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %22
  %24 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %23, ptr noundef null)
  %25 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %26 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %27 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(8) @K)
  %28 = load i64, ptr @N, align 8, !tbaa !8
  %29 = getelementptr inbounds i64, ptr @dp, i64 %28
  %30 = getelementptr inbounds i8, ptr %29, i64 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  store i32 -1, ptr %1, align 4, !tbaa !11
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @dp, ptr noundef nonnull %30, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %2) #8
  call void @_ZNSt5queueIxSt5dequeIxSaIxEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  store i64 0, ptr @dp, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  store i64 0, ptr %3, align 8, !tbaa !8
  invoke void @_ZNSt5queueIxSt5dequeIxSaIxEEE4pushEOx(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %31 unwind label %38

31:                                               ; preds = %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  %32 = call noundef zeroext i1 @_ZNKSt5queueIxSt5dequeIxSaIxEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  br i1 %32, label %._crit_edge, label %.lr.ph95

.loopexit86:                                      ; preds = %62, %.lr.ph95
  %33 = call noundef zeroext i1 @_ZNKSt5queueIxSt5dequeIxSaIxEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  br i1 %33, label %._crit_edge, label %.lr.ph95, !llvm.loop !13

.lr.ph95:                                         ; preds = %31, %.loopexit86
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5queueIxSt5dequeIxSaIxEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %35 = load i64, ptr %34, align 8, !tbaa !8
  call void @_ZNSt5queueIxSt5dequeIxSaIxEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %36 = load i64, ptr @K, align 8, !tbaa !8
  %.not7693 = icmp slt i64 %36, 0
  br i1 %.not7693, label %.loopexit86, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph95
  %37 = getelementptr inbounds [501 x i64], ptr @dp, i64 0, i64 %35
  br label %42

38:                                               ; preds = %0
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %203

40:                                               ; preds = %73, %71
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %203

42:                                               ; preds = %.lr.ph, %62
  %43 = phi i64 [ %36, %.lr.ph ], [ %63, %62 ]
  %.05094 = phi i64 [ 0, %.lr.ph ], [ %64, %62 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %44 = shl nuw nsw i64 %.05094, 1
  %45 = add nsw i64 %44, %35
  %46 = sub i64 %45, %43
  store i64 %46, ptr %4, align 8, !tbaa !8
  %47 = sub nsw i64 %43, %.05094
  %48 = icmp sgt i64 %47, %35
  br i1 %48, label %62, label %49

49:                                               ; preds = %42
  %50 = load i64, ptr @N, align 8, !tbaa !8
  %51 = sub nsw i64 %50, %35
  %52 = icmp slt i64 %51, %.05094
  %53 = icmp slt i64 %46, 0
  %54 = icmp sgt i64 %46, %50
  %55 = or i1 %53, %54
  %or.cond80 = select i1 %52, i1 true, i1 %55
  br i1 %or.cond80, label %62, label %56

56:                                               ; preds = %49
  %57 = getelementptr inbounds [501 x i64], ptr @dp, i64 0, i64 %46
  %58 = load i64, ptr %57, align 8, !tbaa !8
  %.not77 = icmp eq i64 %58, -1
  br i1 %.not77, label %59, label %62

59:                                               ; preds = %56
  %60 = load i64, ptr %37, align 8, !tbaa !8
  %61 = add nsw i64 %60, 1
  store i64 %61, ptr %57, align 8, !tbaa !8
  invoke void @_ZNSt5queueIxSt5dequeIxSaIxEEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %._crit_edge137 unwind label %65

._crit_edge137:                                   ; preds = %59
  %.pre = load i64, ptr @K, align 8, !tbaa !8
  br label %62

62:                                               ; preds = %._crit_edge137, %42, %49, %56
  %63 = phi i64 [ %.pre, %._crit_edge137 ], [ %43, %42 ], [ %43, %49 ], [ %43, %56 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  %64 = add nuw nsw i64 %.05094, 1
  %.not76.not = icmp slt i64 %.05094, %63
  br i1 %.not76.not, label %42, label %.loopexit86, !llvm.loop !15

65:                                               ; preds = %59
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %203

._crit_edge:                                      ; preds = %.loopexit86, %31
  %67 = load i64, ptr @N, align 8, !tbaa !8
  %68 = getelementptr inbounds [501 x i64], ptr @dp, i64 0, i64 %67
  %69 = load i64, ptr %68, align 8, !tbaa !8
  %70 = icmp eq i64 %69, -1
  br i1 %70, label %71, label %75

71:                                               ; preds = %._crit_edge
  %72 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
          to label %73 unwind label %40

73:                                               ; preds = %71
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %72, i8 noundef signext 10)
          to label %200 unwind label %40

75:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #8
  invoke void @_ZNSt5stackIxSt5dequeIxSaIxEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %76 unwind label %84

76:                                               ; preds = %75
  %77 = load i64, ptr @N, align 8, !tbaa !8
  %.not101 = icmp eq i64 %77, 0
  br i1 %.not101, label %.preheader, label %.lr.ph104

.lr.ph104:                                        ; preds = %76
  %78 = load i64, ptr @K, align 8, !tbaa !8
  %79 = icmp sgt i64 %78, -1
  call void @llvm.assume(i1 %79)
  br label %.lr.ph104.split

.preheader:                                       ; preds = %.loopexit, %76
  %80 = call noundef zeroext i1 @_ZNKSt5stackIxSt5dequeIxSaIxEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  br i1 %80, label %._crit_edge131, label %.lr.ph130

.lr.ph104.splitthread-pre-split:                  ; preds = %.loopexit
  %.pr = load i64, ptr @K, align 8, !tbaa !8
  br label %.lr.ph104.split

.lr.ph104.split:                                  ; preds = %.lr.ph104, %.lr.ph104.splitthread-pre-split
  %81 = phi i64 [ %.pr, %.lr.ph104.splitthread-pre-split ], [ %78, %.lr.ph104 ]
  %.052102 = phi i64 [ %.355, %.lr.ph104.splitthread-pre-split ], [ %77, %.lr.ph104 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %.not7197 = icmp slt i64 %81, 0
  br i1 %.not7197, label %.loopexit, label %.lr.ph100

.lr.ph100:                                        ; preds = %.lr.ph104.split
  %82 = load i64, ptr @N, align 8
  %83 = getelementptr inbounds [501 x i64], ptr @dp, i64 0, i64 %.052102
  br label %86

84:                                               ; preds = %75
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %202

86:                                               ; preds = %.lr.ph100, %104
  %storemerge7098 = phi i64 [ 0, %.lr.ph100 ], [ %105, %104 ]
  %87 = shl nuw nsw i64 %storemerge7098, 1
  %.neg = sub nsw i64 %81, %87
  %88 = add i64 %.neg, %.052102
  %89 = sub nsw i64 %81, %storemerge7098
  %90 = icmp sgt i64 %89, %88
  br i1 %90, label %104, label %91

91:                                               ; preds = %86
  %92 = sub nsw i64 %82, %88
  %93 = icmp slt i64 %92, %storemerge7098
  %94 = icmp slt i64 %88, 0
  %or.cond3 = or i1 %94, %93
  %95 = icmp sgt i64 %88, %82
  %or.cond81 = or i1 %95, %or.cond3
  br i1 %or.cond81, label %104, label %96

96:                                               ; preds = %91
  %97 = getelementptr inbounds [501 x i64], ptr @dp, i64 0, i64 %88
  %98 = load i64, ptr %97, align 8, !tbaa !8
  %99 = load i64, ptr %83, align 8, !tbaa !8
  %100 = add nsw i64 %99, -1
  %.not72 = icmp eq i64 %98, %100
  br i1 %.not72, label %101, label %104

101:                                              ; preds = %96
  store i64 %storemerge7098, ptr %6, align 8, !tbaa !8
  invoke void @_ZNSt5stackIxSt5dequeIxSaIxEEE4pushERKx(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %.loopexit unwind label %102

102:                                              ; preds = %101
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %201

104:                                              ; preds = %96, %91, %86
  %105 = add nuw i64 %storemerge7098, 1
  %exitcond.not = icmp eq i64 %storemerge7098, %81
  br i1 %exitcond.not, label %.loopexit, label %86, !llvm.loop !16

.loopexit:                                        ; preds = %104, %.lr.ph104.split, %101
  %.355 = phi i64 [ %88, %101 ], [ %.052102, %.lr.ph104.split ], [ %.052102, %104 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  %.not = icmp eq i64 %.355, 0
  br i1 %.not, label %.preheader, label %.lr.ph104.splitthread-pre-split, !llvm.loop !17

.lr.ph130:                                        ; preds = %.preheader, %187
  %.056129 = phi i64 [ %189, %187 ], [ 0, %.preheader ]
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5stackIxSt5dequeIxSaIxEEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  %107 = load i64, ptr %106, align 8, !tbaa !8
  call void @_ZNSt5stackIxSt5dequeIxSaIxEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  %108 = load i64, ptr @K, align 8, !tbaa !8
  %109 = sub nsw i64 %108, %107
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #8
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #8
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  store i64 0, ptr %9, align 8, !tbaa !8
  %.not65105 = icmp eq i64 %107, 0
  br i1 %.not65105, label %._crit_edge110, label %.lr.ph109

._crit_edge110:                                   ; preds = %120, %.lr.ph130
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  store i64 0, ptr %10, align 8, !tbaa !8
  %.not67111 = icmp eq i64 %109, 0
  br i1 %.not67111, label %._crit_edge116, label %.lr.ph115

110:                                              ; preds = %197, %195, %._crit_edge131
  %111 = landingpad { ptr, i32 }
          cleanup
  br label %201

.lr.ph109:                                        ; preds = %.lr.ph130, %120
  %.057107 = phi i64 [ %.158, %120 ], [ %107, %.lr.ph130 ]
  %storemerge106 = phi i64 [ %122, %120 ], [ 0, %.lr.ph130 ]
  %112 = getelementptr inbounds [500 x i8], ptr @a, i64 0, i64 %storemerge106
  %113 = load i8, ptr %112, align 1, !tbaa !19, !range !21, !noundef !22
  %114 = trunc nuw i8 %113 to i1
  br i1 %114, label %120, label %115

115:                                              ; preds = %.lr.ph109
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %116 unwind label %118

116:                                              ; preds = %115
  %117 = add nsw i64 %.057107, -1
  %.pre138 = load i64, ptr %9, align 8, !tbaa !8
  br label %120

118:                                              ; preds = %115
  %119 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %193

120:                                              ; preds = %.lr.ph109, %116
  %121 = phi i64 [ %storemerge106, %.lr.ph109 ], [ %.pre138, %116 ]
  %.158 = phi i64 [ %.057107, %.lr.ph109 ], [ %117, %116 ]
  %122 = add nsw i64 %121, 1
  store i64 %122, ptr %9, align 8, !tbaa !8
  %.not65 = icmp eq i64 %.158, 0
  br i1 %.not65, label %._crit_edge110, label %.lr.ph109, !llvm.loop !23

._crit_edge116:                                   ; preds = %134, %._crit_edge110
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  %123 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  store ptr %123, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %124 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  store ptr %124, ptr %12, align 8
  %125 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  br i1 %125, label %.lr.ph118, label %._crit_edge119

.lr.ph115:                                        ; preds = %._crit_edge110, %134
  %.059113 = phi i64 [ %.160, %134 ], [ %109, %._crit_edge110 ]
  %storemerge66112 = phi i64 [ %136, %134 ], [ 0, %._crit_edge110 ]
  %126 = getelementptr inbounds [500 x i8], ptr @a, i64 0, i64 %storemerge66112
  %127 = load i8, ptr %126, align 1, !tbaa !19, !range !21, !noundef !22
  %128 = trunc nuw i8 %127 to i1
  br i1 %128, label %129, label %134

129:                                              ; preds = %.lr.ph115
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %130 unwind label %132

130:                                              ; preds = %129
  %131 = add nsw i64 %.059113, -1
  %.pre139 = load i64, ptr %10, align 8, !tbaa !8
  br label %134

132:                                              ; preds = %129
  %133 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  br label %193

134:                                              ; preds = %.lr.ph115, %130
  %135 = phi i64 [ %.pre139, %130 ], [ %storemerge66112, %.lr.ph115 ]
  %.160 = phi i64 [ %131, %130 ], [ %.059113, %.lr.ph115 ]
  %136 = add nsw i64 %135, 1
  store i64 %136, ptr %10, align 8, !tbaa !8
  %.not67 = icmp eq i64 %.160, 0
  br i1 %.not67, label %._crit_edge116, label %.lr.ph115, !llvm.loop !24

._crit_edge119:                                   ; preds = %.lr.ph118, %._crit_edge116
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #8
  %137 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  store ptr %137, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  %138 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  store ptr %138, ptr %14, align 8
  %139 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  br i1 %139, label %.lr.ph121, label %._crit_edge122

.lr.ph118:                                        ; preds = %._crit_edge116, %.lr.ph118
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %141 = load i64, ptr %140, align 8, !tbaa !8
  %142 = getelementptr inbounds [500 x i8], ptr @a, i64 0, i64 %141
  store i8 1, ptr %142, align 1, !tbaa !19
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %144 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  br i1 %144, label %.lr.ph118, label %._crit_edge119

._crit_edge122:                                   ; preds = %.lr.ph121, %._crit_edge119
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  %145 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 63)
          to label %151 unwind label %158

.lr.ph121:                                        ; preds = %._crit_edge119, %.lr.ph121
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  %147 = load i64, ptr %146, align 8, !tbaa !8
  %148 = getelementptr inbounds [500 x i8], ptr @a, i64 0, i64 %147
  store i8 0, ptr %148, align 1, !tbaa !19
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  %150 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  br i1 %150, label %.lr.ph121, label %._crit_edge122

151:                                              ; preds = %._crit_edge122
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #8
  %152 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  store ptr %152, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  %153 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  store ptr %153, ptr %16, align 8
  %154 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  br i1 %154, label %.lr.ph124, label %._crit_edge125

._crit_edge125:                                   ; preds = %166, %151
  call void @llvm.lifetime.end.p0(i64 8, 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
  %155 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  store ptr %155, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #8
  %156 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  store ptr %156, ptr %18, align 8
  %157 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  br i1 %157, label %.lr.ph127, label %._crit_edge128

158:                                              ; preds = %183, %._crit_edge128, %._crit_edge122
  %159 = landingpad { ptr, i32 }
          cleanup
  br label %193

.lr.ph124:                                        ; preds = %151, %166
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  %161 = load i64, ptr %160, align 8, !tbaa !8
  %162 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 32)
          to label %163 unwind label %169

163:                                              ; preds = %.lr.ph124
  %164 = add nsw i64 %161, 1
  %165 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %162, i64 noundef %164)
          to label %166 unwind label %169

166:                                              ; preds = %163
  %167 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  %168 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  br i1 %168, label %.lr.ph124, label %._crit_edge125

169:                                              ; preds = %163, %.lr.ph124
  %170 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  br label %193

._crit_edge128:                                   ; preds = %178, %._crit_edge125
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  %171 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 10)
          to label %183 unwind label %158

.lr.ph127:                                        ; preds = %._crit_edge125, %178
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  %173 = load i64, ptr %172, align 8, !tbaa !8
  %174 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 32)
          to label %175 unwind label %181

175:                                              ; preds = %.lr.ph127
  %176 = add nsw i64 %173, 1
  %177 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %174, i64 noundef %176)
          to label %178 unwind label %181

178:                                              ; preds = %175
  %179 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  %180 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  br i1 %180, label %.lr.ph127, label %._crit_edge128

181:                                              ; preds = %175, %.lr.ph127
  %182 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  br label %193

183:                                              ; preds = %._crit_edge128
  %184 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout)
          to label %185 unwind label %158

185:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #8
  %186 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %187 unwind label %191

187:                                              ; preds = %185
  %188 = load i64, ptr %19, align 8, !tbaa !8
  %189 = xor i64 %188, %.056129
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  %190 = call noundef zeroext i1 @_ZNKSt5stackIxSt5dequeIxSaIxEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  br i1 %190, label %._crit_edge131, label %.lr.ph130, !llvm.loop !25

191:                                              ; preds = %185
  %192 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  br label %193

193:                                              ; preds = %191, %181, %169, %158, %132, %118
  %.pn = phi { ptr, i32 } [ %119, %118 ], [ %133, %132 ], [ %170, %169 ], [ %182, %181 ], [ %192, %191 ], [ %159, %158 ]
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  br label %201

._crit_edge131:                                   ; preds = %187, %.preheader
  %.056.lcssa = phi i64 [ 0, %.preheader ], [ %189, %187 ]
  %194 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %195 unwind label %110

195:                                              ; preds = %._crit_edge131
  %196 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %194, i64 noundef %.056.lcssa)
          to label %197 unwind label %110

197:                                              ; preds = %195
  %198 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %196, i8 noundef signext 10)
          to label %199 unwind label %110

199:                                              ; preds = %197
  call void @_ZNSt5stackIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #8
  br label %200

200:                                              ; preds = %73, %199
  call void @_ZNSt5queueIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %2) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %2) #8
  ret i32 0

201:                                              ; preds = %110, %193, %102
  %.pn73 = phi { ptr, i32 } [ %103, %102 ], [ %.pn, %193 ], [ %111, %110 ]
  call void @_ZNSt5stackIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #8
  br label %202

202:                                              ; preds = %201, %84
  %.pn73.pn = phi { ptr, i32 } [ %.pn73, %201 ], [ %85, %84 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #8
  br label %203

203:                                              ; preds = %202, %65, %40, %38
  %.pn78 = phi { ptr, i32 } [ %66, %65 ], [ %41, %40 ], [ %.pn73.pn, %202 ], [ %39, %38 ]
  call void @_ZNSt5queueIxSt5dequeIxSaIxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %2) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %2) #8
  resume { ptr, i32 } %.pn78
}

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

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

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

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

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write)
declare void @llvm.assume(i1 noundef) #7

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


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