; LLVM IR from eyangch/competitive-programming :: USACOcontests/gold/2017.12 (barnpainting)

; 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::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.8" = type { ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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" = 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 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i8, align 1
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i32, align 4
  %24 = alloca %"class.std::stack", align 8
  %25 = alloca %"struct.std::pair", align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca %"struct.std::pair", align 4
  %29 = alloca ptr, align 8
  %30 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %32 = alloca i32, align 4
  %33 = alloca %"struct.std::pair", align 4
  %34 = alloca i32, align 4
  %35 = alloca i64, align 8
  %36 = alloca i32, align 4
  %37 = alloca ptr, align 8
  %38 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %39 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %40 = alloca i32, align 4
  %41 = alloca %"class.std::vector.0", align 8
  %42 = alloca i32, align 4
  %43 = alloca ptr, align 8
  %44 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %45 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %46 = alloca i32, align 4
  %47 = alloca ptr, align 8
  %48 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %49 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %50 = alloca i32, align 4
  %51 = alloca i32, align 4
  %52 = alloca i32, align 4
  %53 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %54 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %55 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %56 = getelementptr i8, ptr %55, i64 -24
  %57 = load i64, ptr %56, align 8
  %58 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %57
  %59 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %58, ptr noundef null)
  %60 = load ptr, ptr @stdin, align 8, !tbaa !8
  %61 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %60)
  %62 = load ptr, ptr @stdout, align 8, !tbaa !8
  %63 = call ptr @freopen(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef %62)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #9
  store i64 1000000007, ptr %2, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #9
  %64 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %65 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %64, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %66 = load i64, ptr %3, align 8, !tbaa !11
  %67 = call ptr @llvm.stacksave.p0()
  store ptr %67, ptr %5, align 8
  %68 = alloca %"class.std::vector", i64 %66, align 16
  store i64 %66, ptr %6, align 8
  %69 = icmp eq i64 %66, 0
  br i1 %69, label %76, label %70

70:                                               ; preds = %0
  %71 = getelementptr inbounds %"class.std::vector", ptr %68, i64 %66
  br label %72

72:                                               ; preds = %72, %70
  %73 = phi ptr [ %68, %70 ], [ %74, %72 ]
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %73) #9
  %74 = getelementptr inbounds %"class.std::vector", ptr %73, i64 1
  %75 = icmp eq ptr %74, %71
  br i1 %75, label %76, label %72

76:                                               ; preds = %72, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  store i32 0, ptr %7, align 4, !tbaa !13
  br label %77

77:                                               ; preds = %105, %76
  %78 = load i32, ptr %7, align 4, !tbaa !13
  %79 = sext i32 %78 to i64
  %80 = load i64, ptr %3, align 8, !tbaa !11
  %81 = sub nsw i64 %80, 1
  %82 = icmp slt i64 %79, %81
  br i1 %82, label %84, label %83

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

84:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  %85 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %86 unwind label %108

86:                                               ; preds = %84
  %87 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %85, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %88 unwind label %108

88:                                               ; preds = %86
  %89 = load i32, ptr %8, align 4, !tbaa !13
  %90 = sub nsw i32 %89, 1
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds %"class.std::vector", ptr %68, i64 %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %93 = load i32, ptr %9, align 4, !tbaa !13
  %94 = sub nsw i32 %93, 1
  %95 = sext i32 %94 to i64
  store i64 %95, ptr %12, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %92, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %96 unwind label %112

96:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  %97 = load i32, ptr %9, align 4, !tbaa !13
  %98 = sub nsw i32 %97, 1
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds %"class.std::vector", ptr %68, i64 %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %101 = load i32, ptr %8, align 4, !tbaa !13
  %102 = sub nsw i32 %101, 1
  %103 = sext i32 %102 to i64
  store i64 %103, ptr %13, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %100, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %104 unwind label %116

104:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %7, align 4, !tbaa !13
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %7, align 4, !tbaa !13
  br label %77, !llvm.loop !15

108:                                              ; preds = %86, %84
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %10, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %11, align 4
  br label %120

112:                                              ; preds = %88
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %10, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  br label %120

116:                                              ; preds = %96
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %10, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  br label %120

120:                                              ; preds = %116, %112, %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  br label %476

121:                                              ; preds = %83
  %122 = load i64, ptr %3, align 8, !tbaa !11
  %123 = alloca [3 x i8], i64 %122, align 16
  store i64 %122, ptr %14, align 8
  %124 = getelementptr inbounds [3 x i8], ptr %123, i64 0
  %125 = getelementptr inbounds [3 x i8], ptr %124, i64 0, i64 0
  %126 = load i64, ptr %3, align 8, !tbaa !11
  %127 = sub nsw i64 %126, 1
  %128 = getelementptr inbounds [3 x i8], ptr %123, i64 %127
  %129 = getelementptr inbounds [3 x i8], ptr %128, i64 0, i64 0
  %130 = getelementptr inbounds i8, ptr %129, i64 3
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #9
  store i8 1, ptr %15, align 1, !tbaa !17
  invoke void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef %125, ptr noundef %130, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %131 unwind label %138

131:                                              ; preds = %121
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  store i32 0, ptr %16, align 4, !tbaa !13
  br label %132

132:                                              ; preds = %173, %131
  %133 = load i32, ptr %16, align 4, !tbaa !13
  %134 = sext i32 %133 to i64
  %135 = load i64, ptr %4, align 8, !tbaa !11
  %136 = icmp slt i64 %134, %135
  br i1 %136, label %142, label %137

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

138:                                              ; preds = %121
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %10, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #9
  br label %476

142:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  %143 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %144 unwind label %151

144:                                              ; preds = %142
  %145 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %143, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %146 unwind label %151

146:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  store i32 0, ptr %20, align 4, !tbaa !13
  br label %147

147:                                              ; preds = %169, %146
  %148 = load i32, ptr %20, align 4, !tbaa !13
  %149 = icmp slt i32 %148, 3
  br i1 %149, label %155, label %150

150:                                              ; preds = %147
  store i32 8, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  br label %172

151:                                              ; preds = %144, %142
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %10, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  br label %476

155:                                              ; preds = %147
  %156 = load i32, ptr %20, align 4, !tbaa !13
  %157 = load i32, ptr %19, align 4, !tbaa !13
  %158 = sub nsw i32 %157, 1
  %159 = icmp ne i32 %156, %158
  br i1 %159, label %160, label %168

160:                                              ; preds = %155
  %161 = load i32, ptr %18, align 4, !tbaa !13
  %162 = sub nsw i32 %161, 1
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [3 x i8], ptr %123, i64 %163
  %165 = load i32, ptr %20, align 4, !tbaa !13
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [3 x i8], ptr %164, i64 0, i64 %166
  store i8 0, ptr %167, align 1, !tbaa !17
  br label %168

168:                                              ; preds = %160, %155
  br label %169

169:                                              ; preds = %168
  %170 = load i32, ptr %20, align 4, !tbaa !13
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %20, align 4, !tbaa !13
  br label %147, !llvm.loop !19

172:                                              ; preds = %150
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %16, align 4, !tbaa !13
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %16, align 4, !tbaa !13
  br label %132, !llvm.loop !20

176:                                              ; preds = %137
  %177 = load i64, ptr %3, align 8, !tbaa !11
  %178 = alloca i64, i64 %177, align 16
  store i64 %177, ptr %21, align 8
  %179 = load i64, ptr %3, align 8, !tbaa !11
  %180 = alloca %"class.std::vector.0", i64 %179, align 16
  store i64 %179, ptr %22, align 8
  %181 = icmp eq i64 %179, 0
  br i1 %181, label %188, label %182

182:                                              ; preds = %176
  %183 = getelementptr inbounds %"class.std::vector.0", ptr %180, i64 %179
  br label %184

184:                                              ; preds = %184, %182
  %185 = phi ptr [ %180, %182 ], [ %186, %184 ]
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %185) #9
  %186 = getelementptr inbounds %"class.std::vector.0", ptr %185, i64 1
  %187 = icmp eq ptr %186, %183
  br i1 %187, label %188, label %184

188:                                              ; preds = %184, %176
  %189 = load i64, ptr %3, align 8, !tbaa !11
  %190 = getelementptr inbounds i64, ptr %178, i64 %189
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  store i32 -1, ptr %23, align 4, !tbaa !13
  invoke void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef %178, ptr noundef %190, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %191 unwind label %210

191:                                              ; preds = %188
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  call void @llvm.lifetime.start.p0(i64 80, ptr %24) #9
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %24)
          to label %192 unwind label %214

192:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #9
  store i32 0, ptr %26, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  store i32 0, ptr %27, align 4, !tbaa !13
  invoke void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %25, ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %27)
          to label %193 unwind label %218

193:                                              ; preds = %192
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %24, ptr noundef nonnull align 4 dereferenceable(8) %25)
          to label %194 unwind label %218

194:                                              ; preds = %193
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  br label %195

195:                                              ; preds = %275, %273, %194
  %196 = invoke noundef zeroext i1 @_ZNKSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %24)
          to label %197 unwind label %222

197:                                              ; preds = %195
  %198 = xor i1 %196, true
  br i1 %198, label %199, label %277

199:                                              ; preds = %197
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  %200 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %24)
          to label %201 unwind label %226

201:                                              ; preds = %199
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %200, i64 8, i1 false)
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %24)
          to label %202 unwind label %226

202:                                              ; preds = %201
  %203 = getelementptr inbounds %"struct.std::pair", ptr %28, i32 0, i32 0
  %204 = load i32, ptr %203, align 4, !tbaa !21
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds i64, ptr %178, i64 %205
  %207 = load i64, ptr %206, align 8, !tbaa !11
  %208 = icmp ne i64 %207, -1
  br i1 %208, label %209, label %230

209:                                              ; preds = %202
  store i32 11, ptr %17, align 4
  br label %273, !llvm.loop !23

210:                                              ; preds = %188
  %211 = landingpad { ptr, i32 }
          cleanup
  %212 = extractvalue { ptr, i32 } %211, 0
  store ptr %212, ptr %10, align 8
  %213 = extractvalue { ptr, i32 } %211, 1
  store i32 %213, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  br label %461

214:                                              ; preds = %191
  %215 = landingpad { ptr, i32 }
          cleanup
  %216 = extractvalue { ptr, i32 } %215, 0
  store ptr %216, ptr %10, align 8
  %217 = extractvalue { ptr, i32 } %215, 1
  store i32 %217, ptr %11, align 4
  br label %453

218:                                              ; preds = %193, %192
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %10, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  br label %452

222:                                              ; preds = %447, %433, %195
  %223 = landingpad { ptr, i32 }
          cleanup
  %224 = extractvalue { ptr, i32 } %223, 0
  store ptr %224, ptr %10, align 8
  %225 = extractvalue { ptr, i32 } %223, 1
  store i32 %225, ptr %11, align 4
  br label %452

226:                                              ; preds = %230, %201, %199
  %227 = landingpad { ptr, i32 }
          cleanup
  %228 = extractvalue { ptr, i32 } %227, 0
  store ptr %228, ptr %10, align 8
  %229 = extractvalue { ptr, i32 } %227, 1
  store i32 %229, ptr %11, align 4
  br label %276

230:                                              ; preds = %202
  %231 = getelementptr inbounds %"struct.std::pair", ptr %28, i32 0, i32 1
  %232 = load i32, ptr %231, align 4, !tbaa !24
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds %"struct.std::pair", ptr %28, i32 0, i32 0
  %235 = load i32, ptr %234, align 4, !tbaa !21
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds i64, ptr %178, i64 %236
  store i64 %233, ptr %237, align 8, !tbaa !11
  %238 = getelementptr inbounds %"struct.std::pair", ptr %28, i32 0, i32 1
  %239 = load i32, ptr %238, align 4, !tbaa !24
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds %"class.std::vector.0", ptr %180, i64 %240
  %242 = getelementptr inbounds %"struct.std::pair", ptr %28, i32 0, i32 0
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %241, ptr noundef nonnull align 4 dereferenceable(4) %242)
          to label %243 unwind label %226

243:                                              ; preds = %230
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #9
  %244 = getelementptr inbounds %"struct.std::pair", ptr %28, i32 0, i32 0
  %245 = load i32, ptr %244, align 4, !tbaa !21
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds %"class.std::vector", ptr %68, i64 %246
  store ptr %247, ptr %29, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #9
  %248 = load ptr, ptr %29, align 8, !tbaa !8
  %249 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %248) #9
  %250 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %30, i32 0, i32 0
  store ptr %249, ptr %250, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #9
  %251 = load ptr, ptr %29, align 8, !tbaa !8
  %252 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %251) #9
  %253 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %31, i32 0, i32 0
  store ptr %252, ptr %253, align 8
  br label %254

254:                                              ; preds = %266, %243
  %255 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %31) #9
  br i1 %255, label %257, label %256

256:                                              ; preds = %254
  store i32 13, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  br label %272

257:                                              ; preds = %254
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #9
  %258 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #9
  %259 = load i64, ptr %258, align 8, !tbaa !11
  %260 = trunc i64 %259 to i32
  store i32 %260, ptr %32, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #9
  %261 = getelementptr inbounds %"struct.std::pair", ptr %28, i32 0, i32 1
  %262 = load i32, ptr %261, align 4, !tbaa !24
  %263 = add nsw i32 %262, 1
  store i32 %263, ptr %34, align 4, !tbaa !13
  invoke void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %33, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(4) %34)
          to label %264 unwind label %268

264:                                              ; preds = %257
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %24, ptr noundef nonnull align 4 dereferenceable(8) %33)
          to label %265 unwind label %268

265:                                              ; preds = %264
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #9
  br label %266

266:                                              ; preds = %265
  %267 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #9
  br label %254

268:                                              ; preds = %264, %257
  %269 = landingpad { ptr, i32 }
          cleanup
  %270 = extractvalue { ptr, i32 } %269, 0
  store ptr %270, ptr %10, align 8
  %271 = extractvalue { ptr, i32 } %269, 1
  store i32 %271, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  br label %276

272:                                              ; preds = %256
  store i32 0, ptr %17, align 4
  br label %273

273:                                              ; preds = %272, %209
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  %274 = load i32, ptr %17, align 4
  switch i32 %274, label %489 [
    i32 0, label %275
    i32 11, label %195
  ]

275:                                              ; preds = %273
  br label %195, !llvm.loop !23

276:                                              ; preds = %268, %226
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  br label %452

277:                                              ; preds = %197
  %278 = load i64, ptr %3, align 8, !tbaa !11
  %279 = alloca [3 x i64], i64 %278, align 16
  store i64 %278, ptr %35, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #9
  %280 = load i64, ptr %3, align 8, !tbaa !11
  %281 = sub nsw i64 %280, 1
  %282 = trunc i64 %281 to i32
  store i32 %282, ptr %36, align 4, !tbaa !13
  br label %283

283:                                              ; preds = %430, %277
  %284 = load i32, ptr %36, align 4, !tbaa !13
  %285 = icmp sge i32 %284, 0
  br i1 %285, label %287, label %286

286:                                              ; preds = %283
  store i32 15, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  br label %433

287:                                              ; preds = %283
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #9
  %288 = load i32, ptr %36, align 4, !tbaa !13
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds %"class.std::vector.0", ptr %180, i64 %289
  store ptr %290, ptr %37, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #9
  %291 = load ptr, ptr %37, align 8, !tbaa !8
  %292 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %291) #9
  %293 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.8", ptr %38, i32 0, i32 0
  store ptr %292, ptr %293, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #9
  %294 = load ptr, ptr %37, align 8, !tbaa !8
  %295 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %294) #9
  %296 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.8", ptr %39, i32 0, i32 0
  store ptr %295, ptr %296, align 8
  br label %297

297:                                              ; preds = %427, %287
  %298 = 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 %298, label %300, label %299

299:                                              ; preds = %297
  store i32 18, ptr %17, 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 %429

300:                                              ; preds = %297
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #9
  %301 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %38) #9
  %302 = load i32, ptr %301, align 4, !tbaa !13
  store i32 %302, ptr %40, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 24, ptr %41) #9
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %41) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #9
  store i32 0, ptr %42, align 4, !tbaa !13
  br label %303

303:                                              ; preds = %323, %300
  %304 = load i32, ptr %42, align 4, !tbaa !13
  %305 = icmp slt i32 %304, 3
  br i1 %305, label %307, label %306

306:                                              ; preds = %303
  store i32 20, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #9
  br label %326

307:                                              ; preds = %303
  %308 = load i32, ptr %40, align 4, !tbaa !13
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds [3 x i8], ptr %123, i64 %309
  %311 = load i32, ptr %42, align 4, !tbaa !13
  %312 = sext i32 %311 to i64
  %313 = getelementptr inbounds [3 x i8], ptr %310, i64 0, i64 %312
  %314 = load i8, ptr %313, align 1, !tbaa !17, !range !25, !noundef !26
  %315 = trunc i8 %314 to i1
  %316 = zext i1 %315 to i64
  %317 = load i32, ptr %40, align 4, !tbaa !13
  %318 = sext i32 %317 to i64
  %319 = getelementptr inbounds [3 x i64], ptr %279, i64 %318
  %320 = load i32, ptr %42, align 4, !tbaa !13
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds [3 x i64], ptr %319, i64 0, i64 %321
  store i64 %316, ptr %322, align 8, !tbaa !11
  br label %323

323:                                              ; preds = %307
  %324 = load i32, ptr %42, align 4, !tbaa !13
  %325 = add nsw i32 %324, 1
  store i32 %325, ptr %42, align 4, !tbaa !13
  br label %303, !llvm.loop !27

326:                                              ; preds = %306
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #9
  %327 = load i32, ptr %40, align 4, !tbaa !13
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds %"class.std::vector", ptr %68, i64 %328
  store ptr %329, ptr %43, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #9
  %330 = load ptr, ptr %43, align 8, !tbaa !8
  %331 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %330) #9
  %332 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %44, i32 0, i32 0
  store ptr %331, ptr %332, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #9
  %333 = load ptr, ptr %43, align 8, !tbaa !8
  %334 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %333) #9
  %335 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %45, i32 0, i32 0
  store ptr %334, ptr %335, align 8
  br label %336

336:                                              ; preds = %357, %326
  %337 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull align 8 dereferenceable(8) %45) #9
  br i1 %337, label %339, label %338

338:                                              ; preds = %336
  store i32 23, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #9
  br label %359

339:                                              ; preds = %336
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #9
  %340 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %44) #9
  %341 = load i64, ptr %340, align 8, !tbaa !11
  %342 = trunc i64 %341 to i32
  store i32 %342, ptr %46, align 4, !tbaa !13
  %343 = load i32, ptr %46, align 4, !tbaa !13
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds i64, ptr %178, i64 %344
  %346 = load i64, ptr %345, align 8, !tbaa !11
  %347 = load i32, ptr %36, align 4, !tbaa !13
  %348 = sext i32 %347 to i64
  %349 = icmp sgt i64 %346, %348
  br i1 %349, label %350, label %356

350:                                              ; preds = %339
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %41, ptr noundef nonnull align 4 dereferenceable(4) %46)
          to label %351 unwind label %352

351:                                              ; preds = %350
  br label %356

352:                                              ; preds = %350
  %353 = landingpad { ptr, i32 }
          cleanup
  %354 = extractvalue { ptr, i32 } %353, 0
  store ptr %354, ptr %10, align 8
  %355 = extractvalue { ptr, i32 } %353, 1
  store i32 %355, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %41) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %41) #9
  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
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  br label %452

356:                                              ; preds = %351, %339
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #9
  br label %357

357:                                              ; preds = %356
  %358 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %44) #9
  br label %336

359:                                              ; preds = %338
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #9
  store ptr %41, ptr %47, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #9
  %360 = load ptr, ptr %47, align 8, !tbaa !8
  %361 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %360) #9
  %362 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.8", ptr %48, i32 0, i32 0
  store ptr %361, ptr %362, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #9
  %363 = load ptr, ptr %47, align 8, !tbaa !8
  %364 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %363) #9
  %365 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.8", ptr %49, i32 0, i32 0
  store ptr %364, ptr %365, align 8
  br label %366

366:                                              ; preds = %424, %359
  %367 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef nonnull align 8 dereferenceable(8) %49) #9
  br i1 %367, label %369, label %368

368:                                              ; preds = %366
  store i32 25, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #9
  br label %426

369:                                              ; preds = %366
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #9
  %370 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %48) #9
  %371 = load i32, ptr %370, align 4, !tbaa !13
  store i32 %371, ptr %50, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #9
  store i32 0, ptr %51, align 4, !tbaa !13
  br label %372

372:                                              ; preds = %420, %369
  %373 = load i32, ptr %51, align 4, !tbaa !13
  %374 = icmp slt i32 %373, 3
  br i1 %374, label %376, label %375

375:                                              ; preds = %372
  store i32 27, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #9
  br label %423

376:                                              ; preds = %372
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #9
  store i32 0, ptr %52, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #9
  store i32 0, ptr %53, align 4, !tbaa !13
  br label %377

377:                                              ; preds = %398, %376
  %378 = load i32, ptr %53, align 4, !tbaa !13
  %379 = icmp slt i32 %378, 3
  br i1 %379, label %381, label %380

380:                                              ; preds = %377
  store i32 30, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #9
  br label %401

381:                                              ; preds = %377
  %382 = load i32, ptr %53, align 4, !tbaa !13
  %383 = load i32, ptr %51, align 4, !tbaa !13
  %384 = icmp eq i32 %382, %383
  br i1 %384, label %385, label %386

385:                                              ; preds = %381
  br label %398

386:                                              ; preds = %381
  %387 = load i32, ptr %50, align 4, !tbaa !13
  %388 = sext i32 %387 to i64
  %389 = getelementptr inbounds [3 x i64], ptr %279, i64 %388
  %390 = load i32, ptr %53, align 4, !tbaa !13
  %391 = sext i32 %390 to i64
  %392 = getelementptr inbounds [3 x i64], ptr %389, i64 0, i64 %391
  %393 = load i64, ptr %392, align 8, !tbaa !11
  %394 = load i32, ptr %52, align 4, !tbaa !13
  %395 = sext i32 %394 to i64
  %396 = add nsw i64 %395, %393
  %397 = trunc i64 %396 to i32
  store i32 %397, ptr %52, align 4, !tbaa !13
  br label %398

398:                                              ; preds = %386, %385
  %399 = load i32, ptr %53, align 4, !tbaa !13
  %400 = add nsw i32 %399, 1
  store i32 %400, ptr %53, align 4, !tbaa !13
  br label %377, !llvm.loop !28

401:                                              ; preds = %380
  %402 = load i32, ptr %52, align 4, !tbaa !13
  %403 = sext i32 %402 to i64
  %404 = load i32, ptr %40, align 4, !tbaa !13
  %405 = sext i32 %404 to i64
  %406 = getelementptr inbounds [3 x i64], ptr %279, i64 %405
  %407 = load i32, ptr %51, align 4, !tbaa !13
  %408 = sext i32 %407 to i64
  %409 = getelementptr inbounds [3 x i64], ptr %406, i64 0, i64 %408
  %410 = load i64, ptr %409, align 8, !tbaa !11
  %411 = mul nsw i64 %410, %403
  store i64 %411, ptr %409, align 8, !tbaa !11
  %412 = load i32, ptr %40, align 4, !tbaa !13
  %413 = sext i32 %412 to i64
  %414 = getelementptr inbounds [3 x i64], ptr %279, i64 %413
  %415 = load i32, ptr %51, align 4, !tbaa !13
  %416 = sext i32 %415 to i64
  %417 = getelementptr inbounds [3 x i64], ptr %414, i64 0, i64 %416
  %418 = load i64, ptr %417, align 8, !tbaa !11
  %419 = srem i64 %418, 1000000007
  store i64 %419, ptr %417, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #9
  br label %420

420:                                              ; preds = %401
  %421 = load i32, ptr %51, align 4, !tbaa !13
  %422 = add nsw i32 %421, 1
  store i32 %422, ptr %51, align 4, !tbaa !13
  br label %372, !llvm.loop !29

423:                                              ; preds = %375
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #9
  br label %424

424:                                              ; preds = %423
  %425 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %48) #9
  br label %366

426:                                              ; preds = %368
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %41) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %41) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #9
  br label %427

427:                                              ; preds = %426
  %428 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %38) #9
  br label %297

429:                                              ; preds = %299
  br label %430

430:                                              ; preds = %429
  %431 = load i32, ptr %36, align 4, !tbaa !13
  %432 = add nsw i32 %431, -1
  store i32 %432, ptr %36, align 4, !tbaa !13
  br label %283, !llvm.loop !30

433:                                              ; preds = %286
  %434 = getelementptr inbounds [3 x i64], ptr %279, i64 0
  %435 = getelementptr inbounds [3 x i64], ptr %434, i64 0, i64 0
  %436 = load i64, ptr %435, align 16, !tbaa !11
  %437 = getelementptr inbounds [3 x i64], ptr %279, i64 0
  %438 = getelementptr inbounds [3 x i64], ptr %437, i64 0, i64 1
  %439 = load i64, ptr %438, align 8, !tbaa !11
  %440 = add nsw i64 %436, %439
  %441 = getelementptr inbounds [3 x i64], ptr %279, i64 0
  %442 = getelementptr inbounds [3 x i64], ptr %441, i64 0, i64 2
  %443 = load i64, ptr %442, align 16, !tbaa !11
  %444 = add nsw i64 %440, %443
  %445 = srem i64 %444, 1000000007
  %446 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %445)
          to label %447 unwind label %222

447:                                              ; preds = %433
  %448 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %446, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %449 unwind label %222

449:                                              ; preds = %447
  store i32 0, ptr %1, align 4
  store i32 1, ptr %17, align 4
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %24) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr %24) #9
  %450 = getelementptr inbounds %"class.std::vector.0", ptr %180, i64 %179
  %451 = icmp eq ptr %180, %450
  br i1 %451, label %458, label %454

452:                                              ; preds = %352, %276, %222, %218
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %24) #9
  br label %453

453:                                              ; preds = %452, %214
  call void @llvm.lifetime.end.p0(i64 80, ptr %24) #9
  br label %461

454:                                              ; preds = %454, %449
  %455 = phi ptr [ %450, %449 ], [ %456, %454 ]
  %456 = getelementptr inbounds %"class.std::vector.0", ptr %455, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %456) #9
  %457 = icmp eq ptr %456, %180
  br i1 %457, label %458, label %454

458:                                              ; preds = %454, %449
  %459 = getelementptr inbounds %"class.std::vector", ptr %68, i64 %66
  %460 = icmp eq ptr %68, %459
  br i1 %460, label %473, label %469

461:                                              ; preds = %453, %210
  %462 = getelementptr inbounds %"class.std::vector.0", ptr %180, i64 %179
  %463 = icmp eq ptr %180, %462
  br i1 %463, label %468, label %464

464:                                              ; preds = %464, %461
  %465 = phi ptr [ %462, %461 ], [ %466, %464 ]
  %466 = getelementptr inbounds %"class.std::vector.0", ptr %465, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %466) #9
  %467 = icmp eq ptr %466, %180
  br i1 %467, label %468, label %464

468:                                              ; preds = %464, %461
  br label %476

469:                                              ; preds = %469, %458
  %470 = phi ptr [ %459, %458 ], [ %471, %469 ]
  %471 = getelementptr inbounds %"class.std::vector", ptr %470, i64 -1
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %471) #9
  %472 = icmp eq ptr %471, %68
  br i1 %472, label %473, label %469

473:                                              ; preds = %469, %458
  %474 = load ptr, ptr %5, align 8
  call void @llvm.stackrestore.p0(ptr %474)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #9
  %475 = load i32, ptr %1, align 4
  ret i32 %475

476:                                              ; preds = %468, %151, %138, %120
  %477 = getelementptr inbounds %"class.std::vector", ptr %68, i64 %66
  %478 = icmp eq ptr %68, %477
  br i1 %478, label %483, label %479

479:                                              ; preds = %479, %476
  %480 = phi ptr [ %477, %476 ], [ %481, %479 ]
  %481 = getelementptr inbounds %"class.std::vector", ptr %480, i64 -1
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %481) #9
  %482 = icmp eq ptr %481, %68
  br i1 %482, label %483, label %479

483:                                              ; preds = %479, %476
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #9
  br label %484

484:                                              ; preds = %483
  %485 = load ptr, ptr %10, align 8
  %486 = load i32, ptr %11, align 4
  %487 = insertvalue { ptr, i32 } poison, ptr %485, 0
  %488 = insertvalue { ptr, i32 } %487, i32 %486, 1
  resume { ptr, i32 } %488

489:                                              ; preds = %273
  unreachable
}

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

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #1

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

; 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)) #4 align 2

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 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)) #6

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 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)) #8

; 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)) #2 align 2

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

; Function Attrs: 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)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 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)) #8

; 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)) #2 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)) #2 align 2

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

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !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 = !{!"int", !10, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !18, i64 0}
!18 = !{!"bool", !10, i64 0}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}
!21 = !{!22, !14, i64 0}
!22 = !{!"_ZTSSt4pairIiiE", !14, i64 0, !14, i64 4}
!23 = distinct !{!23, !16}
!24 = !{!22, !14, i64 4}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = distinct !{!27, !16}
!28 = distinct !{!28, !16}
!29 = distinct !{!29, !16}
!30 = distinct !{!30, !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::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::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.8" = type { ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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" = 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 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i8, align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::stack", align 8
  %12 = alloca %"struct.std::pair", align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::pair", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca i32, align 4
  %19 = alloca %"struct.std::pair", align 4
  %20 = alloca i32, align 4
  %21 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %23 = alloca %"class.std::vector.0", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca i32, align 4
  %27 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %29 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %30 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %31 = getelementptr i8, ptr %30, i64 -24
  %32 = load i64, ptr %31, align 8
  %33 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %32
  %34 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %33, ptr noundef null)
  %35 = load ptr, ptr @stdin, align 8, !tbaa !8
  %36 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %35)
  %37 = load ptr, ptr @stdout, align 8, !tbaa !8
  %38 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %37)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %41 = load i64, ptr %1, align 8, !tbaa !11
  %42 = call ptr @llvm.stacksave.p0()
  %43 = alloca %"class.std::vector", i64 %41, align 16
  %44 = icmp eq i64 %41, 0
  br i1 %44, label %.loopexit83, label %45

45:                                               ; preds = %0
  %46 = getelementptr inbounds %"class.std::vector", ptr %43, i64 %41
  br label %47

47:                                               ; preds = %47, %45
  %48 = phi ptr [ %43, %45 ], [ %49, %47 ]
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %48) #8
  %49 = getelementptr inbounds i8, ptr %48, i64 24
  %50 = icmp eq ptr %49, %46
  br i1 %50, label %.loopexit83, label %47

.loopexit83:                                      ; preds = %47, %0
  %invariant.gep = getelementptr i8, ptr %43, i64 -24
  %51 = load i64, ptr %1, align 8, !tbaa !11
  %52 = add nsw i64 %51, -1
  %53 = icmp sgt i64 %51, 1
  br i1 %53, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %72, %.loopexit83
  %.lcssa87 = phi i64 [ %51, %.loopexit83 ], [ %73, %72 ]
  %.lcssa = phi i64 [ %52, %.loopexit83 ], [ %74, %72 ]
  %54 = alloca [3 x i8], i64 %.lcssa87, align 16
  %55 = getelementptr inbounds [3 x i8], ptr %54, i64 %.lcssa
  %56 = getelementptr inbounds i8, ptr %55, i64 3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #8
  store i8 1, ptr %7, align 1, !tbaa !13
  invoke void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull %54, ptr noundef nonnull %56, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %83 unwind label %90

.lr.ph:                                           ; preds = %.loopexit83, %72
  %indvars.iv = phi i64 [ %indvars.iv.next, %72 ], [ 0, %.loopexit83 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %57 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %58 unwind label %76

58:                                               ; preds = %.lr.ph
  %59 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %57, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %60 unwind label %76

60:                                               ; preds = %58
  %61 = load i32, ptr %3, align 4, !tbaa !15
  %62 = sext i32 %61 to i64
  %gep = getelementptr %"class.std::vector", ptr %invariant.gep, i64 %62
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %63 = load i32, ptr %4, align 4, !tbaa !15
  %64 = add nsw i32 %63, -1
  %65 = sext i32 %64 to i64
  store i64 %65, ptr %5, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %gep, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %66 unwind label %78

66:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  %67 = load i32, ptr %4, align 4, !tbaa !15
  %68 = sext i32 %67 to i64
  %gep92 = getelementptr %"class.std::vector", ptr %invariant.gep, i64 %68
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %69 = load i32, ptr %3, align 4, !tbaa !15
  %70 = add nsw i32 %69, -1
  %71 = sext i32 %70 to i64
  store i64 %71, ptr %6, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %gep92, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %72 unwind label %80

72:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %73 = load i64, ptr %1, align 8, !tbaa !11
  %74 = add nsw i64 %73, -1
  %75 = icmp sgt i64 %74, %indvars.iv.next
  br i1 %75, label %.lr.ph, label %._crit_edge, !llvm.loop !17

76:                                               ; preds = %58, %.lr.ph
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %82

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

80:                                               ; preds = %66
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %82

82:                                               ; preds = %80, %78, %76
  %.pn71 = phi { ptr, i32 } [ %81, %80 ], [ %79, %78 ], [ %77, %76 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  br label %.loopexit75

83:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #8
  %84 = load i64, ptr %2, align 8, !tbaa !11
  %85 = icmp sgt i64 %84, 0
  br i1 %85, label %.lr.ph100, label %._crit_edge101

.lr.ph100:                                        ; preds = %83
  %invariant.gep95 = getelementptr i8, ptr %54, i64 -3
  br label %92

._crit_edge101:                                   ; preds = %108, %83
  %86 = load i64, ptr %1, align 8, !tbaa !11
  %87 = alloca i64, i64 %86, align 16
  %88 = alloca %"class.std::vector.0", i64 %86, align 16
  %89 = icmp eq i64 %86, 0
  br i1 %89, label %.loopexit81, label %111

90:                                               ; preds = %._crit_edge
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #8
  br label %.loopexit75

92:                                               ; preds = %.lr.ph100, %108
  %indvars.iv132 = phi i64 [ 0, %.lr.ph100 ], [ %indvars.iv.next133, %108 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  %93 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %94 unwind label %101

94:                                               ; preds = %92
  %95 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %93, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %.preheader82 unwind label %101

.preheader82:                                     ; preds = %94
  %96 = load i32, ptr %9, align 4, !tbaa !15
  %97 = add nsw i32 %96, -1
  %98 = load i32, ptr %8, align 4
  %99 = sext i32 %98 to i64
  %.not70 = icmp eq i32 %97, 0
  br i1 %.not70, label %.thread161, label %103

.thread161:                                       ; preds = %.preheader82
  %100 = getelementptr nusw [3 x i8], ptr %invariant.gep95, i64 %99, i64 1
  store i8 0, ptr %100, align 1, !tbaa !13
  br label %.thread159

101:                                              ; preds = %94, %92
  %102 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  br label %.loopexit75

103:                                              ; preds = %.preheader82
  %104 = getelementptr nusw [3 x i8], ptr %invariant.gep95, i64 %99, i64 0
  store i8 0, ptr %104, align 1, !tbaa !13
  %.not70.1 = icmp eq i32 %97, 1
  br i1 %.not70.1, label %.thread159, label %105

105:                                              ; preds = %103
  %106 = getelementptr nusw [3 x i8], ptr %invariant.gep95, i64 %99, i64 1
  store i8 0, ptr %106, align 1, !tbaa !13
  %.not70.2 = icmp eq i32 %97, 2
  br i1 %.not70.2, label %108, label %.thread159

.thread159:                                       ; preds = %103, %.thread161, %105
  %107 = getelementptr nusw [3 x i8], ptr %invariant.gep95, i64 %99, i64 2
  store i8 0, ptr %107, align 1, !tbaa !13
  br label %108

108:                                              ; preds = %.thread159, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %109 = load i64, ptr %2, align 8, !tbaa !11
  %110 = icmp sgt i64 %109, %indvars.iv.next133
  br i1 %110, label %92, label %._crit_edge101, !llvm.loop !19

111:                                              ; preds = %._crit_edge101
  %112 = getelementptr inbounds %"class.std::vector.0", ptr %88, i64 %86
  br label %113

113:                                              ; preds = %113, %111
  %114 = phi ptr [ %88, %111 ], [ %115, %113 ]
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %114) #8
  %115 = getelementptr inbounds i8, ptr %114, i64 24
  %116 = icmp eq ptr %115, %112
  br i1 %116, label %.loopexit81.loopexit, label %113

.loopexit81.loopexit:                             ; preds = %113
  %.pre = load i64, ptr %1, align 8, !tbaa !11
  br label %.loopexit81

.loopexit81:                                      ; preds = %.loopexit81.loopexit, %._crit_edge101
  %117 = phi i64 [ %.pre, %.loopexit81.loopexit ], [ 0, %._crit_edge101 ]
  %118 = getelementptr inbounds i64, ptr %87, i64 %117
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  store i32 -1, ptr %10, align 4, !tbaa !15
  invoke void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull %87, ptr noundef nonnull %118, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %119 unwind label %131

119:                                              ; preds = %.loopexit81
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %11) #8
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %11)
          to label %120 unwind label %133

120:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  store i32 0, ptr %13, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #8
  store i32 0, ptr %14, align 4, !tbaa !15
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %11, ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %121 unwind label %135

121:                                              ; preds = %120
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  %122 = call noundef zeroext i1 @_ZNKSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %11)
  br i1 %122, label %._crit_edge107, label %.lr.ph106

.lr.ph106:                                        ; preds = %121
  %123 = getelementptr inbounds i8, ptr %15, i64 4
  br label %124

124:                                              ; preds = %.lr.ph106, %162
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #8
  %125 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %11)
  %126 = load i64, ptr %125, align 4
  store i64 %126, ptr %15, align 8
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %11)
  %127 = load i32, ptr %15, align 8, !tbaa !20
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds i64, ptr %87, i64 %128
  %130 = load i64, ptr %129, align 8, !tbaa !11
  %.not = icmp eq i64 %130, -1
  br i1 %.not, label %141, label %162, !llvm.loop !22

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

133:                                              ; preds = %119
  %134 = landingpad { ptr, i32 }
          cleanup
  br label %254

135:                                              ; preds = %120
  %136 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br label %253

137:                                              ; preds = %249, %._crit_edge125
  %138 = landingpad { ptr, i32 }
          cleanup
  br label %253

139:                                              ; preds = %141
  %140 = landingpad { ptr, i32 }
          cleanup
  br label %164

141:                                              ; preds = %124
  %142 = load i32, ptr %123, align 4, !tbaa !23
  %143 = sext i32 %142 to i64
  store i64 %143, ptr %129, align 8, !tbaa !11
  %144 = getelementptr inbounds %"class.std::vector.0", ptr %88, i64 %143
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %144, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %145 unwind label %139

145:                                              ; preds = %141
  %146 = load i32, ptr %15, align 8, !tbaa !20
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds %"class.std::vector", ptr %43, i64 %147
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  %149 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %148) #8
  store ptr %149, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #8
  %150 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %148) #8
  store ptr %150, ptr %17, align 8
  %151 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  br i1 %151, label %.lr.ph103, label %._crit_edge104

._crit_edge104:                                   ; preds = %157, %145
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  br label %162

.lr.ph103:                                        ; preds = %145, %157
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #8
  %152 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  %153 = load i64, ptr %152, align 8, !tbaa !11
  %154 = trunc i64 %153 to i32
  store i32 %154, ptr %18, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #8
  %155 = load i32, ptr %123, align 4, !tbaa !23
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %20, align 4, !tbaa !15
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %20)
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %11, ptr noundef nonnull align 4 dereferenceable(8) %19)
          to label %157 unwind label %160

157:                                              ; preds = %.lr.ph103
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #8
  %158 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  %159 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  br i1 %159, label %.lr.ph103, label %._crit_edge104

160:                                              ; preds = %.lr.ph103
  %161 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  br label %164

162:                                              ; preds = %124, %._crit_edge104
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  %163 = call noundef zeroext i1 @_ZNKSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %11)
  br i1 %163, label %._crit_edge107, label %124

164:                                              ; preds = %160, %139
  %.pn = phi { ptr, i32 } [ %161, %160 ], [ %140, %139 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  br label %253

._crit_edge107:                                   ; preds = %162, %121
  %165 = load i64, ptr %1, align 8, !tbaa !11
  %166 = alloca [3 x i64], i64 %165, align 16
  %167 = trunc i64 %165 to i32
  %.057121 = add i32 %167, -1
  %168 = icmp sgt i32 %.057121, -1
  br i1 %168, label %.lr.ph124.preheader, label %._crit_edge125

.lr.ph124.preheader:                              ; preds = %._crit_edge107
  %169 = zext nneg i32 %.057121 to i64
  br label %.lr.ph124

._crit_edge125.loopexit:                          ; preds = %._crit_edge120
  %.pre151 = load i64, ptr %166, align 16, !tbaa !11
  %.phi.trans.insert = getelementptr inbounds i8, ptr %166, i64 8
  %.pre152 = load i64, ptr %.phi.trans.insert, align 8, !tbaa !11
  %.phi.trans.insert153 = getelementptr inbounds i8, ptr %166, i64 16
  %.pre154 = load i64, ptr %.phi.trans.insert153, align 16, !tbaa !11
  %170 = add nsw i64 %.pre152, %.pre151
  %171 = add nsw i64 %170, %.pre154
  %172 = srem i64 %171, 1000000007
  br label %._crit_edge125

._crit_edge125:                                   ; preds = %._crit_edge125.loopexit, %._crit_edge107
  %173 = phi i64 [ %172, %._crit_edge125.loopexit ], [ 0, %._crit_edge107 ]
  %174 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %173)
          to label %249 unwind label %137

.lr.ph124:                                        ; preds = %.lr.ph124.preheader, %._crit_edge120
  %indvars.iv146 = phi i64 [ %169, %.lr.ph124.preheader ], [ %indvars.iv.next147, %._crit_edge120 ]
  %175 = getelementptr inbounds %"class.std::vector.0", ptr %88, i64 %indvars.iv146
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #8
  %176 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %175) #8
  store ptr %176, ptr %21, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #8
  %177 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %175) #8
  store ptr %177, ptr %22, align 8
  %178 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #8
  br i1 %178, label %.lr.ph119, label %._crit_edge120

._crit_edge120:                                   ; preds = %._crit_edge117, %.lr.ph124
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #8
  %indvars.iv.next147 = add nsw i64 %indvars.iv146, -1
  %179 = icmp sgt i64 %indvars.iv146, 0
  br i1 %179, label %.lr.ph124, label %._crit_edge125.loopexit, !llvm.loop !24

.lr.ph119:                                        ; preds = %.lr.ph124, %._crit_edge117
  %180 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #8
  %181 = load i32, ptr %180, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %23) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [3 x i8], ptr %54, i64 %182, i64 0
  %184 = load i8, ptr %183, align 1, !tbaa !13, !range !25, !noundef !26
  %185 = zext nneg i8 %184 to i64
  %186 = getelementptr inbounds [3 x i64], ptr %166, i64 %182, i64 0
  store i64 %185, ptr %186, align 8, !tbaa !11
  %187 = getelementptr inbounds [3 x i8], ptr %54, i64 %182, i64 1
  %188 = load i8, ptr %187, align 1, !tbaa !13, !range !25, !noundef !26
  %189 = zext nneg i8 %188 to i64
  %190 = getelementptr inbounds [3 x i64], ptr %166, i64 %182, i64 1
  store i64 %189, ptr %190, align 8, !tbaa !11
  %191 = getelementptr inbounds [3 x i8], ptr %54, i64 %182, i64 2
  %192 = load i8, ptr %191, align 1, !tbaa !13, !range !25, !noundef !26
  %193 = zext nneg i8 %192 to i64
  %194 = getelementptr inbounds [3 x i64], ptr %166, i64 %182, i64 2
  store i64 %193, ptr %194, align 8, !tbaa !11
  %195 = getelementptr inbounds %"class.std::vector", ptr %43, i64 %182
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #8
  %196 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %195) #8
  store ptr %196, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #8
  %197 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %195) #8
  store ptr %197, ptr %25, align 8
  %198 = 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) #8
  br i1 %198, label %.lr.ph110, label %._crit_edge111

._crit_edge111:                                   ; preds = %212, %.lr.ph119
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #8
  %199 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  store ptr %199, ptr %27, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #8
  %200 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  store ptr %200, ptr %28, align 8
  %201 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #8
  br i1 %201, label %.lr.ph116.preheader, label %._crit_edge117

.lr.ph110:                                        ; preds = %.lr.ph119, %212
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #8
  %202 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %203 = load i64, ptr %202, align 8, !tbaa !11
  %204 = trunc i64 %203 to i32
  store i32 %204, ptr %26, align 4, !tbaa !15
  %sext = shl i64 %203, 32
  %205 = ashr exact i64 %sext, 29
  %206 = getelementptr inbounds i8, ptr %87, i64 %205
  %207 = load i64, ptr %206, align 8, !tbaa !11
  %208 = icmp sgt i64 %207, %indvars.iv146
  br i1 %208, label %209, label %212

209:                                              ; preds = %.lr.ph110
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %212 unwind label %210

210:                                              ; preds = %209
  %211 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #8
  br label %253

212:                                              ; preds = %209, %.lr.ph110
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #8
  %213 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %214 = 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) #8
  br i1 %214, label %.lr.ph110, label %._crit_edge111

._crit_edge117:                                   ; preds = %.lr.ph116.preheader, %._crit_edge111
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %23) #8
  %215 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #8
  %216 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #8
  br i1 %216, label %.lr.ph119, label %._crit_edge120

.lr.ph116.preheader:                              ; preds = %._crit_edge111, %.lr.ph116.preheader
  %217 = phi i64 [ %246, %.lr.ph116.preheader ], [ %193, %._crit_edge111 ]
  %218 = phi i64 [ %238, %.lr.ph116.preheader ], [ %189, %._crit_edge111 ]
  %219 = phi i64 [ %230, %.lr.ph116.preheader ], [ %185, %._crit_edge111 ]
  %220 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #8
  %221 = load i32, ptr %220, align 4, !tbaa !15
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [3 x i64], ptr %166, i64 %222, i64 1
  %224 = load i64, ptr %223, align 8, !tbaa !11
  %225 = getelementptr inbounds [3 x i64], ptr %166, i64 %222, i64 2
  %226 = load i64, ptr %225, align 8, !tbaa !11
  %227 = add i64 %224, %226
  %sext155 = shl i64 %227, 32
  %228 = ashr exact i64 %sext155, 32
  %229 = mul nsw i64 %219, %228
  %230 = srem i64 %229, 1000000007
  store i64 %230, ptr %186, align 8, !tbaa !11
  %231 = getelementptr inbounds [3 x i64], ptr %166, i64 %222, i64 0
  %232 = load i64, ptr %231, align 8, !tbaa !11
  %233 = getelementptr inbounds [3 x i64], ptr %166, i64 %222, i64 2
  %234 = load i64, ptr %233, align 8, !tbaa !11
  %235 = add i64 %232, %234
  %sext156 = shl i64 %235, 32
  %236 = ashr exact i64 %sext156, 32
  %237 = mul nsw i64 %218, %236
  %238 = srem i64 %237, 1000000007
  store i64 %238, ptr %190, align 8, !tbaa !11
  %239 = getelementptr inbounds [3 x i64], ptr %166, i64 %222, i64 0
  %240 = load i64, ptr %239, align 8, !tbaa !11
  %241 = getelementptr inbounds [3 x i64], ptr %166, i64 %222, i64 1
  %242 = load i64, ptr %241, align 8, !tbaa !11
  %243 = add i64 %240, %242
  %sext157 = shl i64 %243, 32
  %244 = ashr exact i64 %sext157, 32
  %245 = mul nsw i64 %217, %244
  %246 = srem i64 %245, 1000000007
  store i64 %246, ptr %194, align 8, !tbaa !11
  %247 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #8
  %248 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #8
  br i1 %248, label %.lr.ph116.preheader, label %._crit_edge117

249:                                              ; preds = %._crit_edge125
  %250 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %174, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %251 unwind label %137

251:                                              ; preds = %249
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %11) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %11) #8
  br i1 %89, label %.loopexit79, label %.preheader78.preheader

.preheader78.preheader:                           ; preds = %251
  %252 = getelementptr inbounds %"class.std::vector.0", ptr %88, i64 %86
  br label %.preheader78

253:                                              ; preds = %210, %164, %137, %135
  %.pn.pn = phi { ptr, i32 } [ %.pn, %164 ], [ %211, %210 ], [ %138, %137 ], [ %136, %135 ]
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %11) #8
  br label %254

254:                                              ; preds = %253, %133
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %253 ], [ %134, %133 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %11) #8
  br label %259

.preheader78:                                     ; preds = %.preheader78.preheader, %.preheader78
  %255 = phi ptr [ %256, %.preheader78 ], [ %252, %.preheader78.preheader ]
  %256 = getelementptr inbounds i8, ptr %255, i64 -24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %256) #8
  %257 = icmp eq ptr %256, %88
  br i1 %257, label %.loopexit79, label %.preheader78

.loopexit79:                                      ; preds = %.preheader78, %251
  br i1 %44, label %.loopexit77, label %.preheader76.preheader

.preheader76.preheader:                           ; preds = %.loopexit79
  %258 = getelementptr inbounds %"class.std::vector", ptr %43, i64 %41
  br label %.preheader76

259:                                              ; preds = %254, %131
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %254 ], [ %132, %131 ]
  br i1 %89, label %.loopexit75, label %.preheader74.preheader

.preheader74.preheader:                           ; preds = %259
  %260 = getelementptr inbounds %"class.std::vector.0", ptr %88, i64 %86
  br label %.preheader74

.preheader74:                                     ; preds = %.preheader74.preheader, %.preheader74
  %261 = phi ptr [ %262, %.preheader74 ], [ %260, %.preheader74.preheader ]
  %262 = getelementptr inbounds i8, ptr %261, i64 -24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %262) #8
  %263 = icmp eq ptr %262, %88
  br i1 %263, label %.loopexit75, label %.preheader74

.preheader76:                                     ; preds = %.preheader76.preheader, %.preheader76
  %264 = phi ptr [ %265, %.preheader76 ], [ %258, %.preheader76.preheader ]
  %265 = getelementptr inbounds i8, ptr %264, i64 -24
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %265) #8
  %266 = icmp eq ptr %265, %43
  br i1 %266, label %.loopexit77, label %.preheader76

.loopexit77:                                      ; preds = %.preheader76, %.loopexit79
  call void @llvm.stackrestore.p0(ptr %42)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  ret i32 0

.loopexit75:                                      ; preds = %.preheader74, %259, %101, %90, %82
  %.pn71.pn = phi { ptr, i32 } [ %.pn71, %82 ], [ %102, %101 ], [ %.pn.pn.pn.pn, %259 ], [ %91, %90 ], [ %.pn.pn.pn.pn, %.preheader74 ]
  br i1 %44, label %.loopexit, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.loopexit75
  %267 = getelementptr inbounds %"class.std::vector", ptr %43, i64 %41
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %268 = phi ptr [ %269, %.preheader ], [ %267, %.preheader.preheader ]
  %269 = getelementptr inbounds i8, ptr %268, i64 -24
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %269) #8
  %270 = icmp eq ptr %269, %43
  br i1 %270, label %.loopexit, label %.preheader

.loopexit:                                        ; preds = %.preheader, %.loopexit75
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn71.pn
}

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

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr 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) #3

; 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 #4 align 2

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 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 #6

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 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 #7

; 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 #2 align 2

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

; Function Attrs: 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 #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 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 #7

; 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 #2 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 #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 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 #4 align 2

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

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

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

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

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

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

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

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


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