; LLVM IR from ahr9n/psolving-paradigms :: 4.dynamic-programming/07.bitmasks (CodeForces 1242C - Sum Balance)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, std::pair<const long long, int>, std::_Select1st<std::pair<const long long, int>>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, std::pair<const long long, int>, std::_Select1st<std::pair<const long long, int>>, std::less<long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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.13" = type { ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%"class.std::allocator" = type { i8 }

@k = external dso_local global i32, align 4
@each = external dso_local global i64, align 8
@X = external dso_local global [15 x %"class.std::vector"], align 16
@sz = external dso_local global %"class.std::vector", align 8
@delta = external dso_local global %"class.std::vector.0", align 8
@can = external dso_local global [32768 x i8], align 16
@dp = external dso_local global [32768 x i32], align 16
@mp = external dso_local global %"class.std::map", align 8
@ans = external dso_local global [15 x %"class.std::vector"], align 16
@way = external dso_local global [32768 x %"class.std::vector.8"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.10 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z5solvei(i32 noundef) #1

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5tracei(i32 noundef) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %21 = alloca i32, align 4
  %22 = alloca %"class.std::vector.8", align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i64, align 8
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  %29 = alloca %"class.std::vector", align 8
  %30 = alloca %"class.std::initializer_list", align 8
  %31 = alloca [3 x i32], align 4
  %32 = alloca %"class.std::allocator", align 1
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca %"class.std::vector", align 8
  %37 = alloca ptr, align 8
  %38 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %39 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %40 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %41 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %42 = getelementptr i8, ptr %41, i64 -24
  %43 = load i64, ptr %42, align 8
  %44 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %43
  %45 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %44, ptr noundef null)
  %46 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @k)
  %48 = load i32, ptr @k, align 4, !tbaa !8
  %49 = sext i32 %48 to i64
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @sz, i64 noundef %49)
  %50 = load i32, ptr @k, align 4, !tbaa !8
  %51 = sext i32 %50 to i64
  call void @_ZNSt6vectorIxSaIxEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %51)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #9
  store i64 0, ptr %2, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  store i32 0, ptr %3, align 4, !tbaa !8
  br label %52

52:                                               ; preds = %99, %0
  %53 = load i32, ptr %3, align 4, !tbaa !8
  %54 = load i32, ptr @k, align 4, !tbaa !8
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  br label %102

57:                                               ; preds = %52
  %58 = load i32, ptr %3, align 4, !tbaa !8
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @sz, i64 noundef %59) #9
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %60)
  %62 = load i32, ptr %3, align 4, !tbaa !8
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [15 x %"class.std::vector"], ptr @X, i64 0, i64 %63
  %65 = load i32, ptr %3, align 4, !tbaa !8
  %66 = sext i32 %65 to i64
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @sz, i64 noundef %66) #9
  %68 = load i32, ptr %67, align 4, !tbaa !8
  %69 = sext i32 %68 to i64
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %64, i64 noundef %69)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #9
  %70 = load i32, ptr %3, align 4, !tbaa !8
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [15 x %"class.std::vector"], ptr @X, i64 0, i64 %71
  store ptr %72, ptr %5, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  %73 = load ptr, ptr %5, align 8, !tbaa !13
  %74 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %73) #9
  %75 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %6, i32 0, i32 0
  store ptr %74, ptr %75, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  %76 = load ptr, ptr %5, align 8, !tbaa !13
  %77 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %76) #9
  %78 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %7, i32 0, i32 0
  store ptr %77, ptr %78, align 8
  br label %79

79:                                               ; preds = %96, %57
  %80 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  br i1 %80, label %82, label %81

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

82:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #9
  store ptr %83, ptr %8, align 8, !tbaa !13
  %84 = load ptr, ptr %8, align 8, !tbaa !13
  %85 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %84)
  %86 = load i32, ptr %3, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  %87 = load ptr, ptr %8, align 8, !tbaa !13
  %88 = load i32, ptr %87, align 4, !tbaa !8
  %89 = sext i32 %88 to i64
  store i64 %89, ptr %9, align 8, !tbaa !11
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIxiSt4lessIxESaISt4pairIKxiEEEixEOx(ptr noundef nonnull align 8 dereferenceable(48) @mp, ptr noundef nonnull align 8 dereferenceable(8) %9)
  store i32 %86, ptr %90, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  %91 = load ptr, ptr %8, align 8, !tbaa !13
  %92 = load i32, ptr %91, align 4, !tbaa !8
  %93 = sext i32 %92 to i64
  %94 = load i64, ptr %2, align 8, !tbaa !11
  %95 = add nsw i64 %94, %93
  store i64 %95, ptr %2, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  br label %96

96:                                               ; preds = %82
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #9
  br label %79

98:                                               ; preds = %81
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %3, align 4, !tbaa !8
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %3, align 4, !tbaa !8
  br label %52, !llvm.loop !15

102:                                              ; preds = %56
  %103 = load i64, ptr %2, align 8, !tbaa !11
  %104 = load i32, ptr @k, align 4, !tbaa !8
  %105 = sext i32 %104 to i64
  %106 = srem i64 %103, %105
  %107 = icmp ne i64 %106, 0
  br i1 %107, label %108, label %110

108:                                              ; preds = %102
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.10)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  br label %372

110:                                              ; preds = %102
  %111 = load i64, ptr %2, align 8, !tbaa !11
  %112 = load i32, ptr @k, align 4, !tbaa !8
  %113 = sext i32 %112 to i64
  %114 = sdiv i64 %111, %113
  store i64 %114, ptr @each, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  store i32 0, ptr %10, align 4, !tbaa !8
  br label %115

115:                                              ; preds = %141, %110
  %116 = load i32, ptr %10, align 4, !tbaa !8
  %117 = load i32, ptr @k, align 4, !tbaa !8
  %118 = icmp slt i32 %116, %117
  br i1 %118, label %120, label %119

119:                                              ; preds = %115
  store i32 7, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  br label %144

120:                                              ; preds = %115
  %121 = load i32, ptr %10, align 4, !tbaa !8
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [15 x %"class.std::vector"], ptr @X, i64 0, i64 %122
  %124 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %123) #9
  %125 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %11, i32 0, i32 0
  store ptr %124, ptr %125, align 8
  %126 = load i32, ptr %10, align 4, !tbaa !8
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [15 x %"class.std::vector"], ptr @X, i64 0, i64 %127
  %129 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %128) #9
  %130 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %12, i32 0, i32 0
  store ptr %129, ptr %130, align 8
  %131 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %11, i32 0, i32 0
  %132 = load ptr, ptr %131, align 8
  %133 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %12, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8
  %135 = call noundef i64 @_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEExET0_T_S8_S7_(ptr %132, ptr %134, i64 noundef 0)
  %136 = load i64, ptr @each, align 8, !tbaa !11
  %137 = sub nsw i64 %135, %136
  %138 = load i32, ptr %10, align 4, !tbaa !8
  %139 = sext i32 %138 to i64
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %139) #9
  store i64 %137, ptr %140, align 8, !tbaa !11
  br label %141

141:                                              ; preds = %120
  %142 = load i32, ptr %10, align 4, !tbaa !8
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %10, align 4, !tbaa !8
  br label %115, !llvm.loop !17

144:                                              ; preds = %119
  %145 = load i32, ptr @k, align 4, !tbaa !8
  %146 = shl i32 1, %145
  %147 = zext i32 %146 to i64
  %148 = call ptr @llvm.stacksave.p0()
  store ptr %148, ptr %13, align 8
  %149 = alloca i64, i64 %147, align 16
  store i64 %147, ptr %14, align 8
  %150 = mul nuw i64 8, %147
  call void @llvm.memset.p0.i64(ptr align 16 %149, i8 0, i64 %150, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  store i32 0, ptr %15, align 4, !tbaa !8
  br label %151

151:                                              ; preds = %184, %144
  %152 = load i32, ptr %15, align 4, !tbaa !8
  %153 = load i32, ptr @k, align 4, !tbaa !8
  %154 = shl i32 1, %153
  %155 = icmp slt i32 %152, %154
  br i1 %155, label %157, label %156

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

157:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  store i32 0, ptr %16, align 4, !tbaa !8
  br label %158

158:                                              ; preds = %180, %157
  %159 = load i32, ptr %16, align 4, !tbaa !8
  %160 = load i32, ptr @k, align 4, !tbaa !8
  %161 = icmp slt i32 %159, %160
  br i1 %161, label %163, label %162

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

163:                                              ; preds = %158
  %164 = load i32, ptr %15, align 4, !tbaa !8
  %165 = load i32, ptr %16, align 4, !tbaa !8
  %166 = shl i32 1, %165
  %167 = and i32 %164, %166
  %168 = icmp ne i32 %167, 0
  br i1 %168, label %169, label %179

169:                                              ; preds = %163
  %170 = load i32, ptr %16, align 4, !tbaa !8
  %171 = sext i32 %170 to i64
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %171) #9
  %173 = load i64, ptr %172, align 8, !tbaa !11
  %174 = load i32, ptr %15, align 4, !tbaa !8
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds i64, ptr %149, i64 %175
  %177 = load i64, ptr %176, align 8, !tbaa !11
  %178 = add nsw i64 %177, %173
  store i64 %178, ptr %176, align 8, !tbaa !11
  br label %179

179:                                              ; preds = %169, %163
  br label %180

180:                                              ; preds = %179
  %181 = load i32, ptr %16, align 4, !tbaa !8
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %16, align 4, !tbaa !8
  br label %158, !llvm.loop !18

183:                                              ; preds = %162
  br label %184

184:                                              ; preds = %183
  %185 = load i32, ptr %15, align 4, !tbaa !8
  %186 = add nsw i32 %185, 1
  store i32 %186, ptr %15, align 4, !tbaa !8
  br label %151, !llvm.loop !19

187:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  store i32 0, ptr %17, align 4, !tbaa !8
  br label %188

188:                                              ; preds = %304, %187
  %189 = load i32, ptr %17, align 4, !tbaa !8
  %190 = load i32, ptr @k, align 4, !tbaa !8
  %191 = icmp slt i32 %189, %190
  br i1 %191, label %193, label %192

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

193:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  %194 = load i32, ptr %17, align 4, !tbaa !8
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [15 x %"class.std::vector"], ptr @X, i64 0, i64 %195
  store ptr %196, ptr %18, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %197 = load ptr, ptr %18, align 8, !tbaa !13
  %198 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %197) #9
  %199 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %19, i32 0, i32 0
  store ptr %198, ptr %199, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %200 = load ptr, ptr %18, align 8, !tbaa !13
  %201 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %200) #9
  %202 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %20, i32 0, i32 0
  store ptr %201, ptr %202, align 8
  br label %203

203:                                              ; preds = %301, %193
  %204 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #9
  br i1 %204, label %206, label %205

205:                                              ; preds = %203
  store i32 19, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %303

206:                                              ; preds = %203
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  %207 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #9
  %208 = load i32, ptr %207, align 4, !tbaa !8
  store i32 %208, ptr %21, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #9
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  %209 = load i32, ptr %17, align 4, !tbaa !8
  store i32 %209, ptr %23, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  store i32 0, ptr %24, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  %210 = load i32, ptr %21, align 4, !tbaa !8
  store i32 %210, ptr %25, align 4, !tbaa !8
  br label %211

211:                                              ; preds = %298, %206
  br label %212

212:                                              ; preds = %211
  %213 = load i32, ptr %23, align 4, !tbaa !8
  %214 = shl i32 1, %213
  %215 = load i32, ptr %24, align 4, !tbaa !8
  %216 = or i32 %215, %214
  store i32 %216, ptr %24, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %217 = load i32, ptr %25, align 4, !tbaa !8
  %218 = sext i32 %217 to i64
  %219 = load i32, ptr %23, align 4, !tbaa !8
  %220 = sext i32 %219 to i64
  %221 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %220) #9
  %222 = load i64, ptr %221, align 8, !tbaa !11
  %223 = sub nsw i64 %218, %222
  store i64 %223, ptr %26, align 8, !tbaa !11
  %224 = invoke noundef i64 @_ZNKSt3mapIxiSt4lessIxESaISt4pairIKxiEEE5countERS3_(ptr noundef nonnull align 8 dereferenceable(48) @mp, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %225 unwind label %267

225:                                              ; preds = %212
  %226 = icmp ne i64 %224, 0
  br i1 %226, label %227, label %294

227:                                              ; preds = %225
  call void @llvm.lifetime.start.p0(i64 24, ptr %29) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %31) #9
  %228 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIxiSt4lessIxESaISt4pairIKxiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @mp, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %229 unwind label %271

229:                                              ; preds = %227
  %230 = load i32, ptr %228, align 4, !tbaa !8
  store i32 %230, ptr %31, align 4, !tbaa !8
  %231 = getelementptr inbounds i32, ptr %31, i64 1
  %232 = load i64, ptr %26, align 8, !tbaa !11
  %233 = trunc i64 %232 to i32
  store i32 %233, ptr %231, align 4, !tbaa !8
  %234 = getelementptr inbounds i32, ptr %31, i64 2
  %235 = load i32, ptr %23, align 4, !tbaa !8
  store i32 %235, ptr %234, align 4, !tbaa !8
  %236 = getelementptr inbounds %"class.std::initializer_list", ptr %30, i32 0, i32 0
  store ptr %31, ptr %236, align 8, !tbaa !20
  %237 = getelementptr inbounds %"class.std::initializer_list", ptr %30, i32 0, i32 1
  store i64 3, ptr %237, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #9
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #9
  %238 = getelementptr inbounds { ptr, i64 }, ptr %30, i32 0, i32 0
  %239 = load ptr, ptr %238, align 8
  %240 = getelementptr inbounds { ptr, i64 }, ptr %30, i32 0, i32 1
  %241 = load i64, ptr %240, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %29, ptr %239, i64 %241, ptr noundef nonnull align 1 dereferenceable(1) %32)
          to label %242 unwind label %275

242:                                              ; preds = %229
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(24) %29)
          to label %243 unwind label %279

243:                                              ; preds = %242
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #9
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #9
  %244 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIxiSt4lessIxESaISt4pairIKxiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @mp, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %245 unwind label %267

245:                                              ; preds = %243
  %246 = load i32, ptr %244, align 4, !tbaa !8
  store i32 %246, ptr %23, align 4, !tbaa !8
  %247 = load i64, ptr %26, align 8, !tbaa !11
  %248 = trunc i64 %247 to i32
  store i32 %248, ptr %25, align 4, !tbaa !8
  %249 = load i32, ptr %23, align 4, !tbaa !8
  %250 = load i32, ptr %17, align 4, !tbaa !8
  %251 = icmp eq i32 %249, %250
  br i1 %251, label %252, label %285

252:                                              ; preds = %245
  %253 = load i32, ptr %24, align 4, !tbaa !8
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds i64, ptr %149, i64 %254
  %256 = load i64, ptr %255, align 8, !tbaa !11
  %257 = icmp eq i64 %256, 0
  %258 = load i32, ptr %24, align 4, !tbaa !8
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [32768 x i8], ptr @can, i64 0, i64 %259
  %261 = zext i1 %257 to i8
  store i8 %261, ptr %260, align 1, !tbaa !24
  %262 = load i32, ptr %24, align 4, !tbaa !8
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds [32768 x %"class.std::vector.8"], ptr @way, i64 0, i64 %263
  %265 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %264, ptr noundef nonnull align 8 dereferenceable(24) %22)
          to label %266 unwind label %267

266:                                              ; preds = %252
  store i32 22, ptr %4, align 4
  br label %296

267:                                              ; preds = %252, %243, %212
  %268 = landingpad { ptr, i32 }
          cleanup
  %269 = extractvalue { ptr, i32 } %268, 0
  store ptr %269, ptr %27, align 8
  %270 = extractvalue { ptr, i32 } %268, 1
  store i32 %270, ptr %28, align 4
  br label %299

271:                                              ; preds = %227
  %272 = landingpad { ptr, i32 }
          cleanup
  %273 = extractvalue { ptr, i32 } %272, 0
  store ptr %273, ptr %27, align 8
  %274 = extractvalue { ptr, i32 } %272, 1
  store i32 %274, ptr %28, align 4
  br label %284

275:                                              ; preds = %229
  %276 = landingpad { ptr, i32 }
          cleanup
  %277 = extractvalue { ptr, i32 } %276, 0
  store ptr %277, ptr %27, align 8
  %278 = extractvalue { ptr, i32 } %276, 1
  store i32 %278, ptr %28, align 4
  br label %283

279:                                              ; preds = %242
  %280 = landingpad { ptr, i32 }
          cleanup
  %281 = extractvalue { ptr, i32 } %280, 0
  store ptr %281, ptr %27, align 8
  %282 = extractvalue { ptr, i32 } %280, 1
  store i32 %282, ptr %28, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #9
  br label %283

283:                                              ; preds = %279, %275
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #9
  br label %284

284:                                              ; preds = %283, %271
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #9
  br label %299

285:                                              ; preds = %245
  %286 = load i32, ptr %24, align 4, !tbaa !8
  %287 = load i32, ptr %23, align 4, !tbaa !8
  %288 = shl i32 1, %287
  %289 = and i32 %286, %288
  %290 = icmp ne i32 %289, 0
  br i1 %290, label %291, label %292

291:                                              ; preds = %285
  store i32 22, ptr %4, align 4
  br label %296

292:                                              ; preds = %285
  br label %293

293:                                              ; preds = %292
  br label %295

294:                                              ; preds = %225
  store i32 22, ptr %4, align 4
  br label %296

295:                                              ; preds = %293
  store i32 0, ptr %4, align 4
  br label %296

296:                                              ; preds = %295, %294, %291, %266
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  %297 = load i32, ptr %4, align 4
  switch i32 %297, label %382 [
    i32 0, label %298
    i32 22, label %300
  ]

298:                                              ; preds = %296
  br label %211, !llvm.loop !26

299:                                              ; preds = %284, %267
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  br label %376

300:                                              ; preds = %296
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  br label %301

301:                                              ; preds = %300
  %302 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #9
  br label %203

303:                                              ; preds = %205
  br label %304

304:                                              ; preds = %303
  %305 = load i32, ptr %17, align 4, !tbaa !8
  %306 = add nsw i32 %305, 1
  store i32 %306, ptr %17, align 4, !tbaa !8
  br label %188, !llvm.loop !27

307:                                              ; preds = %192
  call void @llvm.memset.p0.i64(ptr align 16 @dp, i8 -1, i64 131072, i1 false)
  %308 = load i32, ptr @k, align 4, !tbaa !8
  %309 = shl i32 1, %308
  %310 = sub nsw i32 %309, 1
  %311 = call noundef i32 @_Z5solvei(i32 noundef %310)
  %312 = icmp ne i32 %311, 0
  br i1 %312, label %313, label %368

313:                                              ; preds = %307
  %314 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.11)
  %315 = load i32, ptr @k, align 4, !tbaa !8
  %316 = shl i32 1, %315
  %317 = sub nsw i32 %316, 1
  call void @_Z5tracei(i32 noundef %317)
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #9
  store ptr @ans, ptr %33, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #9
  store ptr @ans, ptr %34, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #9
  store ptr getelementptr inbounds (%"class.std::vector", ptr @ans, i64 15), ptr %35, align 8, !tbaa !13
  br label %318

318:                                              ; preds = %362, %313
  %319 = load ptr, ptr %34, align 8, !tbaa !13
  %320 = load ptr, ptr %35, align 8, !tbaa !13
  %321 = icmp ne ptr %319, %320
  br i1 %321, label %323, label %322

322:                                              ; preds = %318
  store i32 23, ptr %4, align 4
  br label %366

323:                                              ; preds = %318
  call void @llvm.lifetime.start.p0(i64 24, ptr %36) #9
  %324 = load ptr, ptr %34, align 8, !tbaa !13
  call void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %36, ptr noundef nonnull align 8 dereferenceable(24) %324)
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #9
  store ptr %36, ptr %37, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #9
  %325 = load ptr, ptr %37, align 8, !tbaa !13
  %326 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %325) #9
  %327 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %38, i32 0, i32 0
  store ptr %326, ptr %327, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #9
  %328 = load ptr, ptr %37, align 8, !tbaa !13
  %329 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %328) #9
  %330 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %39, i32 0, i32 0
  store ptr %329, ptr %330, align 8
  br label %331

331:                                              ; preds = %342, %323
  %332 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull align 8 dereferenceable(8) %39) #9
  br i1 %332, label %334, label %333

333:                                              ; preds = %331
  store i32 25, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #9
  br label %348

334:                                              ; preds = %331
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #9
  %335 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %38) #9
  %336 = load i32, ptr %335, align 4, !tbaa !8
  store i32 %336, ptr %40, align 4, !tbaa !8
  %337 = load i32, ptr %40, align 4, !tbaa !8
  %338 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %337)
          to label %339 unwind label %344

339:                                              ; preds = %334
  %340 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %338, ptr noundef @.str.12)
          to label %341 unwind label %344

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

342:                                              ; preds = %341
  %343 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %38) #9
  br label %331

344:                                              ; preds = %339, %334
  %345 = landingpad { ptr, i32 }
          cleanup
  %346 = extractvalue { ptr, i32 } %345, 0
  store ptr %346, ptr %27, align 8
  %347 = extractvalue { ptr, i32 } %345, 1
  store i32 %347, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #9
  br label %365

348:                                              ; preds = %333
  %349 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.13)
          to label %350 unwind label %354

350:                                              ; preds = %348
  %351 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #9
  %352 = icmp eq i64 %351, 0
  br i1 %352, label %353, label %358

353:                                              ; preds = %350
  store i32 23, ptr %4, align 4
  br label %359

354:                                              ; preds = %348
  %355 = landingpad { ptr, i32 }
          cleanup
  %356 = extractvalue { ptr, i32 } %355, 0
  store ptr %356, ptr %27, align 8
  %357 = extractvalue { ptr, i32 } %355, 1
  store i32 %357, ptr %28, align 4
  br label %365

358:                                              ; preds = %350
  store i32 0, ptr %4, align 4
  br label %359

359:                                              ; preds = %358, %353
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %36) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %36) #9
  %360 = load i32, ptr %4, align 4
  switch i32 %360, label %366 [
    i32 0, label %361
  ]

361:                                              ; preds = %359
  br label %362

362:                                              ; preds = %361
  %363 = load ptr, ptr %34, align 8, !tbaa !13
  %364 = getelementptr inbounds %"class.std::vector", ptr %363, i32 1
  store ptr %364, ptr %34, align 8, !tbaa !13
  br label %318

365:                                              ; preds = %354, %344
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %36) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %36) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  br label %376

366:                                              ; preds = %359, %322
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  br label %367

367:                                              ; preds = %366
  br label %370

368:                                              ; preds = %307
  %369 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.10)
  br label %370

370:                                              ; preds = %368, %367
  %371 = load ptr, ptr %13, align 8
  call void @llvm.stackrestore.p0(ptr %371)
  store i32 0, ptr %4, align 4
  br label %372

372:                                              ; preds = %370, %108
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #9
  %373 = load i32, ptr %4, align 4
  switch i32 %373, label %382 [
    i32 0, label %374
    i32 1, label %374
  ]

374:                                              ; preds = %372, %372
  %375 = load i32, ptr %1, align 4
  ret i32 %375

376:                                              ; preds = %365, %299
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #9
  br label %377

377:                                              ; preds = %376
  %378 = load ptr, ptr %27, align 8
  %379 = load i32, ptr %28, align 4
  %380 = insertvalue { ptr, i32 } poison, ptr %378, 0
  %381 = insertvalue { ptr, i32 } %380, i32 %379, 1
  resume { ptr, i32 } %381

382:                                              ; preds = %372, %296
  unreachable
}

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(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 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIxiSt4lessIxESaISt4pairIKxiEEEixEOx(ptr noundef nonnull align 8 dereferenceable(48), 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_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 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) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEExET0_T_S8_S7_(ptr, ptr, i64 noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #8

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3mapIxiSt4lessIxESaISt4pairIKxiEEE5countERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIxiSt4lessIxESaISt4pairIKxiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

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

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

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

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

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

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

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

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


; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, std::pair<const long long, int>, std::_Select1st<std::pair<const long long, int>>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, std::pair<const long long, int>, std::_Select1st<std::pair<const long long, int>>, std::less<long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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.13" = type { ptr }
%"class.std::allocator" = type { i8 }

@k = external dso_local global i32, align 4
@each = external dso_local local_unnamed_addr global i64, align 8
@X = external dso_local global [15 x %"class.std::vector"], align 16
@sz = external dso_local global %"class.std::vector", align 8
@delta = external dso_local global %"class.std::vector.0", align 8
@can = external dso_local local_unnamed_addr global [32768 x i8], align 16
@dp = external dso_local local_unnamed_addr global [32768 x i32], align 16
@mp = external dso_local global %"class.std::map", align 8
@ans = external dso_local global [15 x %"class.std::vector"], align 16
@way = external dso_local global [32768 x %"class.std::vector.8"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.10 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z5solvei(i32 noundef) local_unnamed_addr #1

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5tracei(i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %2 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %6 = alloca %"class.std::vector.8", align 8
  %7 = alloca i64, align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca [3 x i32], align 4
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %14 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %15 = getelementptr i8, ptr %14, i64 -24
  %16 = load i64, ptr %15, align 8
  %17 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %16
  %18 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %17, ptr noundef null)
  %19 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %20 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @k)
  %21 = load i32, ptr @k, align 4, !tbaa !8
  %22 = sext i32 %21 to i64
  tail call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @sz, i64 noundef %22)
  %23 = load i32, ptr @k, align 4, !tbaa !8
  %24 = sext i32 %23 to i64
  tail call void @_ZNSt6vectorIxSaIxEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %24)
  %25 = load i32, ptr @k, align 4, !tbaa !8
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %.lr.ph122, label %.._crit_edge123_crit_edge

.._crit_edge123_crit_edge:                        ; preds = %0
  %.pre171 = sext i32 %25 to i64
  br label %._crit_edge123

._crit_edge123:                                   ; preds = %._crit_edge, %.._crit_edge123_crit_edge
  %.pre-phi = phi i64 [ %.pre171, %.._crit_edge123_crit_edge ], [ %41, %._crit_edge ]
  %.061.lcssa = phi i64 [ 0, %.._crit_edge123_crit_edge ], [ %.1.lcssa, %._crit_edge ]
  %27 = phi i32 [ %25, %.._crit_edge123_crit_edge ], [ %40, %._crit_edge ]
  %28 = srem i64 %.061.lcssa, %.pre-phi
  %29 = sdiv i64 %.061.lcssa, %.pre-phi
  %.not = icmp eq i64 %28, 0
  br i1 %.not, label %55, label %53

.lr.ph122:                                        ; preds = %0, %._crit_edge
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge ], [ 0, %0 ]
  %.061120 = phi i64 [ %.1.lcssa, %._crit_edge ], [ 0, %0 ]
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @sz, i64 noundef %indvars.iv) #9
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %30)
  %32 = getelementptr inbounds [15 x %"class.std::vector"], ptr @X, i64 0, i64 %indvars.iv
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @sz, i64 noundef %indvars.iv) #9
  %34 = load i32, ptr %33, align 4, !tbaa !8
  %35 = sext i32 %34 to i64
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %35)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #9
  %36 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #9
  store ptr %36, ptr %1, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #9
  %37 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #9
  store ptr %37, ptr %2, align 8
  %38 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #9
  br i1 %38, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.lr.ph122
  %39 = trunc nuw nsw i64 %indvars.iv to i32
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph122
  %.1.lcssa = phi i64 [ %.061120, %.lr.ph122 ], [ %50, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %40 = load i32, ptr @k, align 4, !tbaa !8
  %41 = sext i32 %40 to i64
  %42 = icmp slt i64 %indvars.iv.next, %41
  br i1 %42, label %.lr.ph122, label %._crit_edge123, !llvm.loop !11

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %.1118 = phi i64 [ %50, %.lr.ph ], [ %.061120, %.lr.ph.preheader ]
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #9
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %43)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  %45 = load i32, ptr %43, align 4, !tbaa !8
  %46 = sext i32 %45 to i64
  store i64 %46, ptr %3, align 8, !tbaa !13
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIxiSt4lessIxESaISt4pairIKxiEEEixEOx(ptr noundef nonnull align 8 dereferenceable(48) @mp, ptr noundef nonnull align 8 dereferenceable(8) %3)
  store i32 %39, ptr %47, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  %48 = load i32, ptr %43, align 4, !tbaa !8
  %49 = sext i32 %48 to i64
  %50 = add nsw i64 %.1118, %49
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #9
  %52 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #9
  br i1 %52, label %.lr.ph, label %._crit_edge

53:                                               ; preds = %._crit_edge123
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.10)
  br label %189

55:                                               ; preds = %._crit_edge123
  store i64 %29, ptr @each, align 8, !tbaa !13
  %56 = icmp sgt i32 %27, 0
  br i1 %56, label %.lr.ph128, label %._crit_edge129

._crit_edge129:                                   ; preds = %.lr.ph128, %55
  %.lcssa116 = phi i32 [ %27, %55 ], [ %71, %.lr.ph128 ]
  %57 = shl nuw i32 1, %.lcssa116
  %58 = zext i32 %57 to i64
  %59 = call ptr @llvm.stacksave.p0()
  %60 = alloca i64, i64 %58, align 16
  %61 = shl nuw nsw i64 %58, 3
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %60, i8 0, i64 %61, i1 false)
  %62 = load i32, ptr @k, align 4, !tbaa !8
  %.not146 = icmp eq i32 %62, 31
  br i1 %.not146, label %.lr.ph139, label %.preheader105.lr.ph

.preheader105.lr.ph:                              ; preds = %._crit_edge129
  %63 = icmp sgt i32 %62, 0
  br i1 %63, label %.preheader105, label %._crit_edge140

.lr.ph128:                                        ; preds = %55, %.lr.ph128
  %indvars.iv159 = phi i64 [ %indvars.iv.next160, %.lr.ph128 ], [ 0, %55 ]
  %64 = getelementptr inbounds [15 x %"class.std::vector"], ptr @X, i64 0, i64 %indvars.iv159
  %65 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %64) #9
  %66 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %64) #9
  %67 = call noundef i64 @_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEExET0_T_S8_S7_(ptr %65, ptr %66, i64 noundef 0)
  %68 = load i64, ptr @each, align 8, !tbaa !13
  %69 = sub nsw i64 %67, %68
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %indvars.iv159) #9
  store i64 %69, ptr %70, align 8, !tbaa !13
  %indvars.iv.next160 = add nuw nsw i64 %indvars.iv159, 1
  %71 = load i32, ptr @k, align 4, !tbaa !8
  %72 = sext i32 %71 to i64
  %73 = icmp slt i64 %indvars.iv.next160, %72
  br i1 %73, label %.lr.ph128, label %._crit_edge129, !llvm.loop !15

.preheader105:                                    ; preds = %.preheader105.lr.ph, %._crit_edge133
  %74 = phi i32 [ %81, %._crit_edge133 ], [ %62, %.preheader105.lr.ph ]
  %indvars.iv165 = phi i64 [ %indvars.iv.next166, %._crit_edge133 ], [ 0, %.preheader105.lr.ph ]
  %75 = icmp sgt i32 %74, 0
  br i1 %75, label %.lr.ph132, label %._crit_edge133

.lr.ph132:                                        ; preds = %.preheader105
  %76 = getelementptr inbounds i64, ptr %60, i64 %indvars.iv165
  %77 = trunc nuw nsw i64 %indvars.iv165 to i32
  br label %85

.preheader:                                       ; preds = %._crit_edge133
  %78 = icmp sgt i32 %81, 0
  br i1 %78, label %.lr.ph139, label %._crit_edge140

.lr.ph139:                                        ; preds = %._crit_edge129, %.preheader
  %79 = getelementptr inbounds i8, ptr %9, i64 4
  %80 = getelementptr inbounds i8, ptr %9, i64 8
  br label %103

._crit_edge133:                                   ; preds = %96, %.preheader105
  %81 = phi i32 [ %74, %.preheader105 ], [ %97, %96 ]
  %indvars.iv.next166 = add nuw nsw i64 %indvars.iv165, 1
  %82 = shl nuw i32 1, %81
  %83 = sext i32 %82 to i64
  %84 = icmp slt i64 %indvars.iv.next166, %83
  br i1 %84, label %.preheader105, label %.preheader, !llvm.loop !16

85:                                               ; preds = %.lr.ph132, %96
  %86 = phi i32 [ %74, %.lr.ph132 ], [ %97, %96 ]
  %87 = phi i32 [ %74, %.lr.ph132 ], [ %98, %96 ]
  %indvars.iv162 = phi i64 [ 0, %.lr.ph132 ], [ %indvars.iv.next163, %96 ]
  %88 = trunc nuw nsw i64 %indvars.iv162 to i32
  %89 = shl nuw i32 1, %88
  %90 = and i32 %89, %77
  %.not98 = icmp eq i32 %90, 0
  br i1 %.not98, label %96, label %91

91:                                               ; preds = %85
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %indvars.iv162) #9
  %93 = load i64, ptr %92, align 8, !tbaa !13
  %94 = load i64, ptr %76, align 8, !tbaa !13
  %95 = add nsw i64 %94, %93
  store i64 %95, ptr %76, align 8, !tbaa !13
  %.pre = load i32, ptr @k, align 4, !tbaa !8
  br label %96

96:                                               ; preds = %85, %91
  %97 = phi i32 [ %86, %85 ], [ %.pre, %91 ]
  %98 = phi i32 [ %87, %85 ], [ %.pre, %91 ]
  %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 1
  %99 = sext i32 %98 to i64
  %100 = icmp slt i64 %indvars.iv.next163, %99
  br i1 %100, label %85, label %._crit_edge133, !llvm.loop !18

._crit_edge140:                                   ; preds = %._crit_edge137, %.preheader105.lr.ph, %.preheader
  %.lcssa = phi i32 [ %81, %.preheader ], [ %62, %.preheader105.lr.ph ], [ %109, %._crit_edge137 ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(131072) @dp, i8 -1, i64 131072, i1 false)
  %notmask = shl nsw i32 -1, %.lcssa
  %101 = xor i32 %notmask, -1
  %102 = call noundef i32 @_Z5solvei(i32 noundef %101)
  %.not85 = icmp eq i32 %102, 0
  br i1 %.not85, label %187, label %163

103:                                              ; preds = %.lr.ph139, %._crit_edge137
  %indvars.iv168 = phi i64 [ 0, %.lr.ph139 ], [ %indvars.iv.next169, %._crit_edge137 ]
  %104 = getelementptr inbounds [15 x %"class.std::vector"], ptr @X, i64 0, i64 %indvars.iv168
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  %105 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %104) #9
  store ptr %105, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  %106 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %104) #9
  store ptr %106, ptr %5, align 8
  %107 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #9
  br i1 %107, label %.lr.ph136.preheader, label %._crit_edge137

.lr.ph136.preheader:                              ; preds = %103
  %108 = trunc nuw nsw i64 %indvars.iv168 to i32
  br label %.lr.ph136

._crit_edge137:                                   ; preds = %.loopexit104, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  %indvars.iv.next169 = add nuw nsw i64 %indvars.iv168, 1
  %109 = load i32, ptr @k, align 4, !tbaa !8
  %110 = sext i32 %109 to i64
  %111 = icmp slt i64 %indvars.iv.next169, %110
  br i1 %111, label %103, label %._crit_edge140, !llvm.loop !19

.lr.ph136:                                        ; preds = %.lr.ph136.preheader, %.loopexit104
  %112 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #9
  %113 = load i32, ptr %112, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #9
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  br label %114

114:                                              ; preds = %159, %.lr.ph136
  %.078 = phi i32 [ %108, %.lr.ph136 ], [ %134, %159 ]
  %.077 = phi i32 [ 0, %.lr.ph136 ], [ %116, %159 ]
  %.075 = phi i32 [ %113, %.lr.ph136 ], [ %136, %159 ]
  %115 = shl nuw i32 1, %.078
  %116 = or i32 %.077, %115
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %117 = sext i32 %.075 to i64
  %118 = sext i32 %.078 to i64
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @delta, i64 noundef %118) #9
  %120 = load i64, ptr %119, align 8, !tbaa !13
  %121 = sub nsw i64 %117, %120
  store i64 %121, ptr %7, align 8, !tbaa !13
  %122 = invoke noundef i64 @_ZNKSt3mapIxiSt4lessIxESaISt4pairIKxiEEE5countERS3_(ptr noundef nonnull align 8 dereferenceable(48) @mp, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %123 unwind label %.loopexit103

123:                                              ; preds = %114
  %.not90 = icmp eq i64 %122, 0
  br i1 %.not90, label %.loopexit104, label %124

124:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #9
  %125 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIxiSt4lessIxESaISt4pairIKxiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @mp, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %126 unwind label %148

126:                                              ; preds = %124
  %127 = load i32, ptr %125, align 4, !tbaa !8
  store i32 %127, ptr %9, align 4, !tbaa !8
  %128 = load i64, ptr %7, align 8, !tbaa !13
  %129 = trunc i64 %128 to i32
  store i32 %129, ptr %79, align 4, !tbaa !8
  store i32 %.078, ptr %80, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #9
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr nonnull %9, i64 3, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %130 unwind label %150

130:                                              ; preds = %126
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %131 unwind label %152

131:                                              ; preds = %130
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #9
  %132 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIxiSt4lessIxESaISt4pairIKxiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) @mp, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %133 unwind label %.loopexit103

133:                                              ; preds = %131
  %134 = load i32, ptr %132, align 4, !tbaa !8
  %135 = load i64, ptr %7, align 8, !tbaa !13
  %136 = trunc i64 %135 to i32
  %137 = zext i32 %134 to i64
  %138 = icmp eq i64 %indvars.iv168, %137
  br i1 %138, label %139, label %156

139:                                              ; preds = %133
  %140 = sext i32 %116 to i64
  %141 = getelementptr inbounds i64, ptr %60, i64 %140
  %142 = load i64, ptr %141, align 8, !tbaa !13
  %143 = icmp eq i64 %142, 0
  %144 = getelementptr inbounds [32768 x i8], ptr @can, i64 0, i64 %140
  %145 = zext i1 %143 to i8
  store i8 %145, ptr %144, align 1, !tbaa !20
  %146 = getelementptr inbounds [32768 x %"class.std::vector.8"], ptr @way, i64 0, i64 %140
  %147 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %146, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %.loopexit104 unwind label %.loopexit.split-lp

.loopexit103:                                     ; preds = %114, %131
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %160

.loopexit.split-lp:                               ; preds = %139
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %160

148:                                              ; preds = %124
  %149 = landingpad { ptr, i32 }
          cleanup
  br label %155

150:                                              ; preds = %126
  %151 = landingpad { ptr, i32 }
          cleanup
  br label %154

152:                                              ; preds = %130
  %153 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  br label %154

154:                                              ; preds = %152, %150
  %.pn91 = phi { ptr, i32 } [ %153, %152 ], [ %151, %150 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #9
  br label %155

155:                                              ; preds = %154, %148
  %.pn91.pn = phi { ptr, i32 } [ %.pn91, %154 ], [ %149, %148 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #9
  br label %160

156:                                              ; preds = %133
  %157 = shl nuw i32 1, %134
  %158 = and i32 %157, %116
  %.not94 = icmp eq i32 %158, 0
  br i1 %.not94, label %159, label %.loopexit104

159:                                              ; preds = %156
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  br label %114

160:                                              ; preds = %.loopexit103, %.loopexit.split-lp, %155
  %.pn95 = phi { ptr, i32 } [ %.pn91.pn, %155 ], [ %lpad.loopexit, %.loopexit103 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  br label %190

.loopexit104:                                     ; preds = %156, %123, %139
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #9
  %161 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #9
  %162 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #9
  br i1 %162, label %.lr.ph136, label %._crit_edge137

163:                                              ; preds = %._crit_edge140
  %164 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.11)
  %165 = load i32, ptr @k, align 4, !tbaa !8
  %notmask86 = shl nsw i32 -1, %165
  %166 = xor i32 %notmask86, -1
  call void @_Z5tracei(i32 noundef %166)
  br label %167

167:                                              ; preds = %182, %163
  %.063.idx145 = phi i64 [ 0, %163 ], [ %.063.add, %182 ]
  %.063.ptr = getelementptr inbounds i8, ptr @ans, i64 %.063.idx145
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #9
  call void @_ZNSt6vectorIiSaIiEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %.063.ptr)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #9
  %168 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  store ptr %168, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #9
  %169 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  store ptr %169, ptr %13, align 8
  %170 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  br i1 %170, label %.lr.ph143, label %._crit_edge144

._crit_edge144:                                   ; preds = %177, %167
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  %171 = 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.13)
          to label %182 unwind label %184

.lr.ph143:                                        ; preds = %167, %177
  %172 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  %173 = load i32, ptr %172, align 4, !tbaa !8
  %174 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %173)
          to label %175 unwind label %180

175:                                              ; preds = %.lr.ph143
  %176 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %174, ptr noundef nonnull @.str.12)
          to label %177 unwind label %180

177:                                              ; preds = %175
  %178 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  %179 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  br i1 %179, label %.lr.ph143, label %._crit_edge144

180:                                              ; preds = %175, %.lr.ph143
  %181 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  br label %186

182:                                              ; preds = %._crit_edge144
  %183 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  %.not88 = icmp eq i64 %183, 0
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #9
  %.063.add = add nuw nsw i64 %.063.idx145, 24
  %.not87 = icmp eq i64 %.063.add, 360
  %or.cond = select i1 %.not88, i1 true, i1 %.not87
  br i1 %or.cond, label %.loopexit, label %167

184:                                              ; preds = %._crit_edge144
  %185 = landingpad { ptr, i32 }
          cleanup
  br label %186

186:                                              ; preds = %184, %180
  %.pn = phi { ptr, i32 } [ %181, %180 ], [ %185, %184 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #9
  br label %190

187:                                              ; preds = %._crit_edge140
  %188 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.10)
  br label %.loopexit

.loopexit:                                        ; preds = %182, %187
  call void @llvm.stackrestore.p0(ptr %59)
  br label %189

189:                                              ; preds = %.loopexit, %53
  ret i32 0

190:                                              ; preds = %186, %160
  %.pn95.pn = phi { ptr, i32 } [ %.pn95, %160 ], [ %.pn, %186 ]
  resume { ptr, i32 } %.pn95.pn
}

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(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 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIxiSt4lessIxESaISt4pairIKxiEEEixEOx(ptr noundef nonnull align 8 dereferenceable(48), 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_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 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 #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEExET0_T_S8_S7_(ptr, ptr, i64 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #8

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3mapIxiSt4lessIxESaISt4pairIKxiEEE5countERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIxiSt4lessIxESaISt4pairIKxiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

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

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

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

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

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

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

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

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

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

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


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