; LLVM IR from eyangch/competitive-programming :: USACOcontests/silver/2015.03 (buffet)

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

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

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

54:                                               ; preds = %0
  %55 = getelementptr inbounds %"struct.std::pair", ptr %52, i64 %50
  br label %56

56:                                               ; preds = %56, %54
  %57 = phi ptr [ %52, %54 ], [ %58, %56 ]
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 4 dereferenceable(8) %57)
  %58 = getelementptr inbounds %"struct.std::pair", ptr %57, i64 1
  %59 = icmp eq ptr %58, %55
  br i1 %59, label %60, label %56

60:                                               ; preds = %56, %0
  %61 = load i32, ptr %2, align 4, !tbaa !11
  %62 = zext i32 %61 to i64
  %63 = alloca %"class.std::vector", i64 %62, align 16
  store i64 %62, ptr %6, align 8
  %64 = icmp eq i64 %62, 0
  br i1 %64, label %71, label %65

65:                                               ; preds = %60
  %66 = getelementptr inbounds %"class.std::vector", ptr %63, i64 %62
  br label %67

67:                                               ; preds = %67, %65
  %68 = phi ptr [ %63, %65 ], [ %69, %67 ]
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %68) #8
  %69 = getelementptr inbounds %"class.std::vector", ptr %68, i64 1
  %70 = icmp eq ptr %69, %66
  br i1 %70, label %71, label %67

71:                                               ; preds = %67, %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 0, ptr %7, align 4, !tbaa !11
  br label %72

72:                                               ; preds = %126, %71
  %73 = load i32, ptr %7, align 4, !tbaa !11
  %74 = load i32, ptr %2, align 4, !tbaa !11
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %77, label %76

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

77:                                               ; preds = %72
  %78 = load i32, ptr %7, align 4, !tbaa !11
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds %"struct.std::pair", ptr %52, i64 %79
  %81 = getelementptr inbounds %"struct.std::pair", ptr %80, i32 0, i32 0
  %82 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %81)
          to label %83 unwind label %96

83:                                               ; preds = %77
  %84 = load i32, ptr %7, align 4, !tbaa !11
  %85 = load i32, ptr %7, align 4, !tbaa !11
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds %"struct.std::pair", ptr %52, i64 %86
  %88 = getelementptr inbounds %"struct.std::pair", ptr %87, i32 0, i32 1
  store i32 %84, ptr %88, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %89 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %90 unwind label %100

90:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !11
  br label %91

91:                                               ; preds = %113, %90
  %92 = load i32, ptr %12, align 4, !tbaa !11
  %93 = load i32, ptr %11, align 4, !tbaa !11
  %94 = icmp slt i32 %92, %93
  br i1 %94, label %104, label %95

95:                                               ; preds = %91
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %125

96:                                               ; preds = %77
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %9, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %10, align 4
  br label %130

100:                                              ; preds = %83
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %9, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %10, align 4
  br label %129

104:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %105 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %106 unwind label %116

106:                                              ; preds = %104
  %107 = load i32, ptr %7, align 4, !tbaa !11
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds %"class.std::vector", ptr %63, i64 %108
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %110 = load i32, ptr %13, align 4, !tbaa !11
  %111 = sub nsw i32 %110, 1
  store i32 %111, ptr %14, align 4, !tbaa !11
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %109, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %112 unwind label %120

112:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %113

113:                                              ; preds = %112
  %114 = load i32, ptr %12, align 4, !tbaa !11
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %12, align 4, !tbaa !11
  br label %91, !llvm.loop !15

116:                                              ; preds = %104
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %9, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %10, align 4
  br label %124

120:                                              ; preds = %106
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %9, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %124

124:                                              ; preds = %120, %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %129

125:                                              ; preds = %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %126

126:                                              ; preds = %125
  %127 = load i32, ptr %7, align 4, !tbaa !11
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %7, align 4, !tbaa !11
  br label %72, !llvm.loop !17

129:                                              ; preds = %124, %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %130

130:                                              ; preds = %129, %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %372

131:                                              ; preds = %76
  %132 = load i32, ptr %2, align 4, !tbaa !11
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds %"struct.std::pair", ptr %52, i64 %133
  invoke void @_ZSt4sortIPSt4pairIiiEEvT_S3_(ptr noundef %52, ptr noundef %134)
          to label %135 unwind label %144

135:                                              ; preds = %131
  %136 = load i32, ptr %2, align 4, !tbaa !11
  %137 = zext i32 %136 to i64
  %138 = alloca i32, i64 %137, align 16
  store i64 %137, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !11
  br label %139

139:                                              ; preds = %157, %135
  %140 = load i32, ptr %16, align 4, !tbaa !11
  %141 = load i32, ptr %2, align 4, !tbaa !11
  %142 = icmp slt i32 %140, %141
  br i1 %142, label %148, label %143

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

144:                                              ; preds = %131
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %9, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %10, align 4
  br label %372

148:                                              ; preds = %139
  %149 = load i32, ptr %16, align 4, !tbaa !11
  %150 = load i32, ptr %16, align 4, !tbaa !11
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds %"struct.std::pair", ptr %52, i64 %151
  %153 = getelementptr inbounds %"struct.std::pair", ptr %152, i32 0, i32 1
  %154 = load i32, ptr %153, align 4, !tbaa !13
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds i32, ptr %138, i64 %155
  store i32 %149, ptr %156, align 4, !tbaa !11
  br label %157

157:                                              ; preds = %148
  %158 = load i32, ptr %16, align 4, !tbaa !11
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %16, align 4, !tbaa !11
  br label %139, !llvm.loop !18

160:                                              ; preds = %143
  %161 = load i32, ptr %2, align 4, !tbaa !11
  %162 = zext i32 %161 to i64
  %163 = alloca i64, i64 %162, align 16
  store i64 %162, ptr %17, align 8
  %164 = load i32, ptr %2, align 4, !tbaa !11
  %165 = zext i32 %164 to i64
  %166 = alloca i64, i64 %165, align 16
  store i64 %165, ptr %18, align 8
  %167 = load i32, ptr %2, align 4, !tbaa !11
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds i64, ptr %163, i64 %168
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 0, ptr %19, align 4, !tbaa !11
  invoke void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef %163, ptr noundef %169, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %170 unwind label %176

170:                                              ; preds = %160
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 0, ptr %20, align 4, !tbaa !11
  br label %171

171:                                              ; preds = %326, %170
  %172 = load i32, ptr %20, align 4, !tbaa !11
  %173 = load i32, ptr %2, align 4, !tbaa !11
  %174 = icmp slt i32 %172, %173
  br i1 %174, label %180, label %175

175:                                              ; preds = %171
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %332

176:                                              ; preds = %160
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %9, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %372

180:                                              ; preds = %171
  %181 = load i32, ptr %2, align 4, !tbaa !11
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds i64, ptr %166, i64 %182
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 2147483647, ptr %21, align 4, !tbaa !11
  invoke void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef %166, ptr noundef %183, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %184 unwind label %215

184:                                              ; preds = %180
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 80, ptr %22) #8
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %22)
          to label %185 unwind label %219

185:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %186 = load i32, ptr %20, align 4, !tbaa !11
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds %"struct.std::pair", ptr %52, i64 %187
  %189 = getelementptr inbounds %"struct.std::pair", ptr %188, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 0, ptr %24, align 4, !tbaa !11
  invoke void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %23, ptr noundef nonnull align 4 dereferenceable(4) %189, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %190 unwind label %223

190:                                              ; preds = %185
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %22, ptr noundef nonnull align 4 dereferenceable(8) %23)
          to label %191 unwind label %223

191:                                              ; preds = %190
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br label %192

192:                                              ; preds = %276, %274, %191
  %193 = invoke noundef zeroext i1 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %22)
          to label %194 unwind label %227

194:                                              ; preds = %192
  %195 = xor i1 %193, true
  br i1 %195, label %196, label %279

196:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %197 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %22)
          to label %198 unwind label %231

198:                                              ; preds = %196
  %199 = getelementptr inbounds %"struct.std::pair", ptr %197, i32 0, i32 0
  %200 = load i32, ptr %199, align 4, !tbaa !19
  store i32 %200, ptr %25, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %201 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %22)
          to label %202 unwind label %235

202:                                              ; preds = %198
  %203 = getelementptr inbounds %"struct.std::pair", ptr %201, i32 0, i32 1
  %204 = load i32, ptr %203, align 4, !tbaa !13
  store i32 %204, ptr %26, align 4, !tbaa !11
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %22)
          to label %205 unwind label %235

205:                                              ; preds = %202
  %206 = load i32, ptr %25, align 4, !tbaa !11
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds i32, ptr %138, i64 %207
  %209 = load i32, ptr %208, align 4, !tbaa !11
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds i64, ptr %166, i64 %210
  %212 = load i64, ptr %211, align 8, !tbaa !20
  %213 = icmp ne i64 %212, 2147483647
  br i1 %213, label %214, label %239

214:                                              ; preds = %205
  store i32 14, ptr %8, align 4
  br label %274, !llvm.loop !22

215:                                              ; preds = %180
  %216 = landingpad { ptr, i32 }
          cleanup
  %217 = extractvalue { ptr, i32 } %216, 0
  store ptr %217, ptr %9, align 8
  %218 = extractvalue { ptr, i32 } %216, 1
  store i32 %218, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %331

219:                                              ; preds = %184
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %9, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %10, align 4
  br label %330

223:                                              ; preds = %190, %185
  %224 = landingpad { ptr, i32 }
          cleanup
  %225 = extractvalue { ptr, i32 } %224, 0
  store ptr %225, ptr %9, align 8
  %226 = extractvalue { ptr, i32 } %224, 1
  store i32 %226, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br label %329

227:                                              ; preds = %192
  %228 = landingpad { ptr, i32 }
          cleanup
  %229 = extractvalue { ptr, i32 } %228, 0
  store ptr %229, ptr %9, align 8
  %230 = extractvalue { ptr, i32 } %228, 1
  store i32 %230, ptr %10, align 4
  br label %329

231:                                              ; preds = %196
  %232 = landingpad { ptr, i32 }
          cleanup
  %233 = extractvalue { ptr, i32 } %232, 0
  store ptr %233, ptr %9, align 8
  %234 = extractvalue { ptr, i32 } %232, 1
  store i32 %234, ptr %10, align 4
  br label %278

235:                                              ; preds = %202, %198
  %236 = landingpad { ptr, i32 }
          cleanup
  %237 = extractvalue { ptr, i32 } %236, 0
  store ptr %237, ptr %9, align 8
  %238 = extractvalue { ptr, i32 } %236, 1
  store i32 %238, ptr %10, align 4
  br label %277

239:                                              ; preds = %205
  %240 = load i32, ptr %26, align 4, !tbaa !11
  %241 = sext i32 %240 to i64
  %242 = load i32, ptr %25, align 4, !tbaa !11
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds i32, ptr %138, i64 %243
  %245 = load i32, ptr %244, align 4, !tbaa !11
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds i64, ptr %166, i64 %246
  store i64 %241, ptr %247, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %248 = load i32, ptr %25, align 4, !tbaa !11
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds %"class.std::vector", ptr %63, i64 %249
  store ptr %250, ptr %27, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %251 = load ptr, ptr %27, align 8, !tbaa !8
  %252 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %251) #8
  %253 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  store ptr %252, ptr %253, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %254 = load ptr, ptr %27, align 8, !tbaa !8
  %255 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %254) #8
  %256 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %29, i32 0, i32 0
  store ptr %255, ptr %256, align 8
  br label %257

257:                                              ; preds = %267, %239
  %258 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29) #8
  br i1 %258, label %260, label %259

259:                                              ; preds = %257
  store i32 16, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %273

260:                                              ; preds = %257
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  %261 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #8
  %262 = load i32, ptr %261, align 4, !tbaa !11
  store i32 %262, ptr %30, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  %263 = load i32, ptr %26, align 4, !tbaa !11
  %264 = add nsw i32 %263, 1
  store i32 %264, ptr %32, align 4, !tbaa !11
  invoke void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %31, ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 4 dereferenceable(4) %32)
          to label %265 unwind label %269

265:                                              ; preds = %260
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %22, ptr noundef nonnull align 4 dereferenceable(8) %31)
          to label %266 unwind label %269

266:                                              ; preds = %265
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %267

267:                                              ; preds = %266
  %268 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #8
  br label %257

269:                                              ; preds = %265, %260
  %270 = landingpad { ptr, i32 }
          cleanup
  %271 = extractvalue { ptr, i32 } %270, 0
  store ptr %271, ptr %9, align 8
  %272 = extractvalue { ptr, i32 } %270, 1
  store i32 %272, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %277

273:                                              ; preds = %259
  store i32 0, ptr %8, align 4
  br label %274

274:                                              ; preds = %273, %214
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  %275 = load i32, ptr %8, align 4
  switch i32 %275, label %385 [
    i32 0, label %276
    i32 14, label %192
  ]

276:                                              ; preds = %274
  br label %192, !llvm.loop !22

277:                                              ; preds = %269, %235
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %278

278:                                              ; preds = %277, %231
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %329

279:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  %280 = load i32, ptr %20, align 4, !tbaa !11
  store i32 %280, ptr %33, align 4, !tbaa !11
  br label %281

281:                                              ; preds = %307, %279
  %282 = load i32, ptr %33, align 4, !tbaa !11
  %283 = icmp sge i32 %282, 0
  br i1 %283, label %285, label %284

284:                                              ; preds = %281
  store i32 18, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %314

285:                                              ; preds = %281
  %286 = load i32, ptr %20, align 4, !tbaa !11
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds i64, ptr %163, i64 %287
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %289 = load i32, ptr %33, align 4, !tbaa !11
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds i64, ptr %163, i64 %290
  %292 = load i64, ptr %291, align 8, !tbaa !20
  %293 = load i32, ptr %3, align 4, !tbaa !11
  %294 = sext i32 %293 to i64
  %295 = load i32, ptr %33, align 4, !tbaa !11
  %296 = sext i32 %295 to i64
  %297 = getelementptr inbounds i64, ptr %166, i64 %296
  %298 = load i64, ptr %297, align 8, !tbaa !20
  %299 = mul nsw i64 %294, %298
  %300 = sub nsw i64 %292, %299
  store i64 %300, ptr %34, align 8, !tbaa !20
  %301 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %288, ptr noundef nonnull align 8 dereferenceable(8) %34)
          to label %302 unwind label %310

302:                                              ; preds = %285
  %303 = load i64, ptr %301, align 8, !tbaa !20
  %304 = load i32, ptr %20, align 4, !tbaa !11
  %305 = sext i32 %304 to i64
  %306 = getelementptr inbounds i64, ptr %163, i64 %305
  store i64 %303, ptr %306, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  br label %307

307:                                              ; preds = %302
  %308 = load i32, ptr %33, align 4, !tbaa !11
  %309 = add nsw i32 %308, -1
  store i32 %309, ptr %33, align 4, !tbaa !11
  br label %281, !llvm.loop !23

310:                                              ; preds = %285
  %311 = landingpad { ptr, i32 }
          cleanup
  %312 = extractvalue { ptr, i32 } %311, 0
  store ptr %312, ptr %9, align 8
  %313 = extractvalue { ptr, i32 } %311, 1
  store i32 %313, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %329

314:                                              ; preds = %284
  %315 = load i32, ptr %20, align 4, !tbaa !11
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds %"struct.std::pair", ptr %52, i64 %316
  %318 = getelementptr inbounds %"struct.std::pair", ptr %317, i32 0, i32 0
  %319 = load i32, ptr %318, align 8, !tbaa !19
  %320 = sext i32 %319 to i64
  %321 = load i32, ptr %20, align 4, !tbaa !11
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds i64, ptr %163, i64 %322
  %324 = load i64, ptr %323, align 8, !tbaa !20
  %325 = add nsw i64 %324, %320
  store i64 %325, ptr %323, align 8, !tbaa !20
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %22) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr %22) #8
  br label %326

326:                                              ; preds = %314
  %327 = load i32, ptr %20, align 4, !tbaa !11
  %328 = add nsw i32 %327, 1
  store i32 %328, ptr %20, align 4, !tbaa !11
  br label %171, !llvm.loop !24

329:                                              ; preds = %310, %278, %227, %223
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %22) #8
  br label %330

330:                                              ; preds = %329, %219
  call void @llvm.lifetime.end.p0(i64 80, ptr %22) #8
  br label %331

331:                                              ; preds = %330, %215
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %372

332:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #8
  store i64 0, ptr %35, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #8
  store i32 0, ptr %36, align 4, !tbaa !11
  br label %333

333:                                              ; preds = %345, %332
  %334 = load i32, ptr %36, align 4, !tbaa !11
  %335 = load i32, ptr %2, align 4, !tbaa !11
  %336 = icmp slt i32 %334, %335
  br i1 %336, label %338, label %337

337:                                              ; preds = %333
  store i32 21, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  br label %352

338:                                              ; preds = %333
  %339 = load i32, ptr %36, align 4, !tbaa !11
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds i64, ptr %163, i64 %340
  %342 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(8) %341)
          to label %343 unwind label %348

343:                                              ; preds = %338
  %344 = load i64, ptr %342, align 8, !tbaa !20
  store i64 %344, ptr %35, align 8, !tbaa !20
  br label %345

345:                                              ; preds = %343
  %346 = load i32, ptr %36, align 4, !tbaa !11
  %347 = add nsw i32 %346, 1
  store i32 %347, ptr %36, align 4, !tbaa !11
  br label %333, !llvm.loop !25

348:                                              ; preds = %338
  %349 = landingpad { ptr, i32 }
          cleanup
  %350 = extractvalue { ptr, i32 } %349, 0
  store ptr %350, ptr %9, align 8
  %351 = extractvalue { ptr, i32 } %349, 1
  store i32 %351, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  br label %364

352:                                              ; preds = %337
  %353 = load i64, ptr %35, align 8, !tbaa !20
  %354 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %353)
          to label %355 unwind label %360

355:                                              ; preds = %352
  %356 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %354, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %357 unwind label %360

357:                                              ; preds = %355
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #8
  %358 = getelementptr inbounds %"class.std::vector", ptr %63, i64 %62
  %359 = icmp eq ptr %63, %358
  br i1 %359, label %369, label %365

360:                                              ; preds = %355, %352
  %361 = landingpad { ptr, i32 }
          cleanup
  %362 = extractvalue { ptr, i32 } %361, 0
  store ptr %362, ptr %9, align 8
  %363 = extractvalue { ptr, i32 } %361, 1
  store i32 %363, ptr %10, align 4
  br label %364

364:                                              ; preds = %360, %348
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #8
  br label %372

365:                                              ; preds = %365, %357
  %366 = phi ptr [ %358, %357 ], [ %367, %365 ]
  %367 = getelementptr inbounds %"class.std::vector", ptr %366, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %367) #8
  %368 = icmp eq ptr %367, %63
  br i1 %368, label %369, label %365

369:                                              ; preds = %365, %357
  %370 = load ptr, ptr %4, align 8
  call void @llvm.stackrestore.p0(ptr %370)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %371 = load i32, ptr %1, align 4
  ret i32 %371

372:                                              ; preds = %364, %331, %176, %144, %130
  %373 = getelementptr inbounds %"class.std::vector", ptr %63, i64 %62
  %374 = icmp eq ptr %63, %373
  br i1 %374, label %379, label %375

375:                                              ; preds = %375, %372
  %376 = phi ptr [ %373, %372 ], [ %377, %375 ]
  %377 = getelementptr inbounds %"class.std::vector", ptr %376, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %377) #8
  %378 = icmp eq ptr %377, %63
  br i1 %378, label %379, label %375

379:                                              ; preds = %375, %372
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %380

380:                                              ; preds = %379
  %381 = load ptr, ptr %9, align 8
  %382 = load i32, ptr %10, align 4
  %383 = insertvalue { ptr, i32 } poison, ptr %381, 0
  %384 = insertvalue { ptr, i32 } %383, i32 %382, 1
  resume { ptr, i32 } %384

385:                                              ; preds = %274
  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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #5 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 @_ZSt4sortIPSt4pairIiiEEvT_S3_(ptr noundef, ptr noundef) #6

; 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 @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(8)) #5 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 zeroext i1 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #2 align 2

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

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

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind willreturn }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"int", !10, i64 0}
!13 = !{!14, !12, i64 4}
!14 = !{!"_ZTSSt4pairIiiE", !12, i64 0, !12, i64 4}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = !{!14, !12, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"long long", !10, i64 0}
!22 = distinct !{!22, !16}
!23 = distinct !{!23, !16}
!24 = distinct !{!24, !16}
!25 = distinct !{!25, !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::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [10 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 [11 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 i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::queue", align 8
  %9 = alloca %"struct.std::pair", align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::pair", align 4
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %19 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %20 = getelementptr i8, ptr %19, i64 -24
  %21 = load i64, ptr %20, align 8
  %22 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %21
  %23 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %22, ptr noundef null)
  %24 = load ptr, ptr @stdin, align 8, !tbaa !8
  %25 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %24)
  %26 = load ptr, ptr @stdout, align 8, !tbaa !8
  %27 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %26)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %30 = load i32, ptr %1, align 4, !tbaa !11
  %31 = zext i32 %30 to i64
  %32 = call ptr @llvm.stacksave.p0()
  %33 = alloca %"struct.std::pair", i64 %31, align 16
  %34 = icmp eq i32 %30, 0
  br i1 %34, label %.loopexit70, label %35

35:                                               ; preds = %0
  %36 = getelementptr inbounds %"struct.std::pair", ptr %33, i64 %31
  br label %37

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

.loopexit70:                                      ; preds = %37, %0
  %41 = load i32, ptr %1, align 4, !tbaa !11
  %42 = zext i32 %41 to i64
  %43 = alloca %"class.std::vector", i64 %42, align 16
  %44 = icmp eq i32 %41, 0
  br i1 %44, label %.loopexit69.._crit_edge79_crit_edge, label %45

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

47:                                               ; preds = %47, %45
  %48 = phi ptr [ %43, %45 ], [ %49, %47 ]
  call void @_ZNSt6vectorIiSaIiEEC2Ev(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 %.loopexit69, label %47

.loopexit69:                                      ; preds = %47
  %.pre = load i32, ptr %1, align 4, !tbaa !11
  %51 = icmp sgt i32 %.pre, 0
  br i1 %51, label %.lr.ph78, label %.loopexit69.._crit_edge79_crit_edge

.loopexit69.._crit_edge79_crit_edge:              ; preds = %.loopexit70, %.loopexit69
  %52 = phi i32 [ %.pre, %.loopexit69 ], [ 0, %.loopexit70 ]
  %.pre115 = sext i32 %52 to i64
  br label %._crit_edge79

._crit_edge79:                                    ; preds = %._crit_edge, %.loopexit69.._crit_edge79_crit_edge
  %.pre-phi = phi i64 [ %.pre115, %.loopexit69.._crit_edge79_crit_edge ], [ %64, %._crit_edge ]
  %53 = getelementptr inbounds %"struct.std::pair", ptr %33, i64 %.pre-phi
  invoke void @_ZSt4sortIPSt4pairIiiEEvT_S3_(ptr noundef nonnull %33, ptr noundef nonnull %53)
          to label %85 unwind label %100

.lr.ph78:                                         ; preds = %.loopexit69, %._crit_edge
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge ], [ 0, %.loopexit69 ]
  %54 = getelementptr inbounds %"struct.std::pair", ptr %33, i64 %indvars.iv
  %55 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %54)
          to label %56 unwind label %66

56:                                               ; preds = %.lr.ph78
  %57 = getelementptr inbounds i8, ptr %54, i64 4
  %58 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %58, ptr %57, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  %59 = 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 %.preheader68 unwind label %68

.preheader68:                                     ; preds = %56
  %60 = load i32, ptr %3, align 4, !tbaa !11
  %61 = icmp sgt i32 %60, 0
  br i1 %61, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader68
  %62 = getelementptr inbounds %"class.std::vector", ptr %43, i64 %indvars.iv
  br label %70

._crit_edge:                                      ; preds = %75, %.preheader68
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %63 = load i32, ptr %1, align 4, !tbaa !11
  %64 = sext i32 %63 to i64
  %65 = icmp slt i64 %indvars.iv.next, %64
  br i1 %65, label %.lr.ph78, label %._crit_edge79, !llvm.loop !15

66:                                               ; preds = %.lr.ph78
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %210

68:                                               ; preds = %56
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %84

70:                                               ; preds = %.lr.ph, %75
  %.04975 = phi i32 [ 0, %.lr.ph ], [ %76, %75 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %71 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %72 unwind label %79

72:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  %73 = load i32, ptr %4, align 4, !tbaa !11
  %74 = add nsw i32 %73, -1
  store i32 %74, ptr %5, align 4, !tbaa !11
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %62, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %75 unwind label %81

75:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %76 = add nuw nsw i32 %.04975, 1
  %77 = load i32, ptr %3, align 4, !tbaa !11
  %78 = icmp slt i32 %76, %77
  br i1 %78, label %70, label %._crit_edge, !llvm.loop !17

79:                                               ; preds = %70
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %83

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

83:                                               ; preds = %81, %79
  %.pn60 = phi { ptr, i32 } [ %82, %81 ], [ %80, %79 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  br label %84

84:                                               ; preds = %83, %68
  %.pn60.pn = phi { ptr, i32 } [ %.pn60, %83 ], [ %69, %68 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  br label %210

85:                                               ; preds = %._crit_edge79
  %86 = load i32, ptr %1, align 4, !tbaa !11
  %87 = zext i32 %86 to i64
  %88 = alloca i32, i64 %87, align 16
  %89 = icmp sgt i32 %86, 0
  br i1 %89, label %.lr.ph82.preheader, label %._crit_edge83

.lr.ph82.preheader:                               ; preds = %85
  %xtraiter = and i64 %87, 3
  %90 = icmp ult i32 %86, 4
  br i1 %90, label %._crit_edge83.loopexit.unr-lcssa, label %.lr.ph82.preheader.new

.lr.ph82.preheader.new:                           ; preds = %.lr.ph82.preheader
  %unroll_iter = and i64 %87, 2147483644
  br label %.lr.ph82

._crit_edge83.loopexit.unr-lcssa:                 ; preds = %.lr.ph82, %.lr.ph82.preheader
  %indvars.iv102.unr = phi i64 [ 0, %.lr.ph82.preheader ], [ %indvars.iv.next103.3, %.lr.ph82 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge83, label %.lr.ph82.epil

.lr.ph82.epil:                                    ; preds = %._crit_edge83.loopexit.unr-lcssa, %.lr.ph82.epil
  %indvars.iv102.epil = phi i64 [ %indvars.iv.next103.epil, %.lr.ph82.epil ], [ %indvars.iv102.unr, %._crit_edge83.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph82.epil ], [ 0, %._crit_edge83.loopexit.unr-lcssa ]
  %91 = getelementptr inbounds %"struct.std::pair", ptr %33, i64 %indvars.iv102.epil, i32 1
  %92 = load i32, ptr %91, align 4, !tbaa !13
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds i32, ptr %88, i64 %93
  %95 = trunc nuw nsw i64 %indvars.iv102.epil to i32
  store i32 %95, ptr %94, align 4, !tbaa !11
  %indvars.iv.next103.epil = add nuw nsw i64 %indvars.iv102.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge83, label %.lr.ph82.epil, !llvm.loop !18

._crit_edge83:                                    ; preds = %._crit_edge83.loopexit.unr-lcssa, %.lr.ph82.epil, %85
  %96 = alloca i64, i64 %87, align 16
  %97 = alloca i64, i64 %87, align 16
  %98 = sext i32 %86 to i64
  %99 = getelementptr inbounds i64, ptr %96, i64 %98
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  store i32 0, ptr %6, align 4, !tbaa !11
  invoke void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull %96, ptr noundef nonnull %99, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %122 unwind label %126

100:                                              ; preds = %._crit_edge79
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %210

.lr.ph82:                                         ; preds = %.lr.ph82, %.lr.ph82.preheader.new
  %indvars.iv102 = phi i64 [ 0, %.lr.ph82.preheader.new ], [ %indvars.iv.next103.3, %.lr.ph82 ]
  %niter = phi i64 [ 0, %.lr.ph82.preheader.new ], [ %niter.next.3, %.lr.ph82 ]
  %102 = getelementptr inbounds %"struct.std::pair", ptr %33, i64 %indvars.iv102, i32 1
  %103 = load i32, ptr %102, align 4, !tbaa !13
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds i32, ptr %88, i64 %104
  %106 = trunc nuw nsw i64 %indvars.iv102 to i32
  store i32 %106, ptr %105, align 4, !tbaa !11
  %indvars.iv.next103 = or disjoint i64 %indvars.iv102, 1
  %107 = getelementptr inbounds %"struct.std::pair", ptr %33, i64 %indvars.iv.next103, i32 1
  %108 = load i32, ptr %107, align 4, !tbaa !13
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds i32, ptr %88, i64 %109
  %111 = trunc nuw nsw i64 %indvars.iv.next103 to i32
  store i32 %111, ptr %110, align 4, !tbaa !11
  %indvars.iv.next103.1 = or disjoint i64 %indvars.iv102, 2
  %112 = getelementptr inbounds %"struct.std::pair", ptr %33, i64 %indvars.iv.next103.1, i32 1
  %113 = load i32, ptr %112, align 4, !tbaa !13
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds i32, ptr %88, i64 %114
  %116 = trunc nuw nsw i64 %indvars.iv.next103.1 to i32
  store i32 %116, ptr %115, align 4, !tbaa !11
  %indvars.iv.next103.2 = or disjoint i64 %indvars.iv102, 3
  %117 = getelementptr inbounds %"struct.std::pair", ptr %33, i64 %indvars.iv.next103.2, i32 1
  %118 = load i32, ptr %117, align 4, !tbaa !13
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i32, ptr %88, i64 %119
  %121 = trunc nuw nsw i64 %indvars.iv.next103.2 to i32
  store i32 %121, ptr %120, align 4, !tbaa !11
  %indvars.iv.next103.3 = add nuw nsw i64 %indvars.iv102, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge83.loopexit.unr-lcssa, label %.lr.ph82, !llvm.loop !20

122:                                              ; preds = %._crit_edge83
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  %123 = load i32, ptr %1, align 4, !tbaa !11
  %124 = icmp sgt i32 %123, 0
  br i1 %124, label %.lr.ph94, label %._crit_edge95.thread

._crit_edge95.thread:                             ; preds = %122
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #8
  store i64 0, ptr %17, align 8, !tbaa !21
  br label %._crit_edge99

._crit_edge95:                                    ; preds = %._crit_edge91
  %125 = icmp sgt i32 %176, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #8
  store i64 0, ptr %17, align 8, !tbaa !21
  br i1 %125, label %.lr.ph98, label %._crit_edge99

126:                                              ; preds = %._crit_edge83
  %127 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  br label %210

.lr.ph94:                                         ; preds = %122, %._crit_edge91
  %indvars.iv105 = phi i64 [ %indvars.iv.next106, %._crit_edge91 ], [ 0, %122 ]
  %128 = phi i32 [ %176, %._crit_edge91 ], [ %123, %122 ]
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds i64, ptr %97, i64 %129
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  store i32 2147483647, ptr %7, align 4, !tbaa !11
  invoke void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull %97, ptr noundef nonnull %130, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %131 unwind label %149

131:                                              ; preds = %.lr.ph94
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %8) #8
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %8)
          to label %132 unwind label %151

132:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %133 = getelementptr inbounds %"struct.std::pair", ptr %33, i64 %indvars.iv105
  %134 = getelementptr inbounds i8, ptr %133, i64 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  store i32 0, ptr %10, align 4, !tbaa !11
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %134, ptr noundef nonnull align 4 dereferenceable(4) %10)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %8, ptr noundef nonnull align 4 dereferenceable(8) %9)
          to label %135 unwind label %153

135:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  %136 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %8)
  br i1 %136, label %.lr.ph90, label %.lr.ph88

.lr.ph90:                                         ; preds = %170, %135
  %137 = getelementptr inbounds i64, ptr %96, i64 %indvars.iv105
  br label %179

.lr.ph88:                                         ; preds = %135, %170
  %138 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %8)
  %139 = load i32, ptr %138, align 4, !tbaa !23
  %140 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %8)
  %141 = getelementptr inbounds i8, ptr %140, i64 4
  %142 = load i32, ptr %141, align 4, !tbaa !13
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %8)
  %143 = sext i32 %139 to i64
  %144 = getelementptr inbounds i32, ptr %88, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !11
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds i64, ptr %97, i64 %146
  %148 = load i64, ptr %147, align 8, !tbaa !21
  %.not = icmp eq i64 %148, 2147483647
  br i1 %.not, label %155, label %170, !llvm.loop !24

149:                                              ; preds = %.lr.ph94
  %150 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  br label %210

151:                                              ; preds = %131
  %152 = landingpad { ptr, i32 }
          cleanup
  br label %192

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

155:                                              ; preds = %.lr.ph88
  %156 = sext i32 %142 to i64
  store i64 %156, ptr %147, align 8, !tbaa !21
  %157 = getelementptr inbounds %"class.std::vector", ptr %43, i64 %143
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  %158 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %157) #8
  store ptr %158, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %159 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %157) #8
  store ptr %159, ptr %12, align 8
  %160 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  br i1 %160, label %.lr.ph85, label %._crit_edge86

.lr.ph85:                                         ; preds = %155
  %161 = add nsw i32 %142, 1
  br label %162

._crit_edge86:                                    ; preds = %165, %155
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %170

162:                                              ; preds = %.lr.ph85, %165
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  %163 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %164 = load i32, ptr %163, align 4, !tbaa !11
  store i32 %164, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #8
  store i32 %161, ptr %15, align 4, !tbaa !11
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %15)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %8, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %165 unwind label %168

165:                                              ; preds = %162
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  %166 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %167 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  br i1 %167, label %162, label %._crit_edge86

168:                                              ; preds = %162
  %169 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 8, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %191

170:                                              ; preds = %.lr.ph88, %._crit_edge86
  %171 = call noundef zeroext i1 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %8)
  br i1 %171, label %.lr.ph90, label %.lr.ph88

._crit_edge91:                                    ; preds = %179
  %172 = load i32, ptr %133, align 8, !tbaa !23
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds i64, ptr %96, i64 %indvars.iv105
  %175 = add nsw i64 %189, %173
  store i64 %175, ptr %174, align 8, !tbaa !21
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %8) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %8) #8
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %176 = load i32, ptr %1, align 4, !tbaa !11
  %177 = sext i32 %176 to i64
  %178 = icmp slt i64 %indvars.iv.next106, %177
  br i1 %178, label %.lr.ph94, label %._crit_edge95, !llvm.loop !25

179:                                              ; preds = %.lr.ph90, %179
  %indvars.iv107 = phi i64 [ %indvars.iv105, %.lr.ph90 ], [ %indvars.iv.next108, %179 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  %180 = getelementptr inbounds i64, ptr %96, i64 %indvars.iv107
  %181 = load i64, ptr %180, align 8, !tbaa !21
  %182 = load i32, ptr %2, align 4, !tbaa !11
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds i64, ptr %97, i64 %indvars.iv107
  %185 = load i64, ptr %184, align 8, !tbaa !21
  %186 = mul nsw i64 %185, %183
  %187 = sub nsw i64 %181, %186
  store i64 %187, ptr %16, align 8, !tbaa !21
  %188 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %137, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %189 = load i64, ptr %188, align 8, !tbaa !21
  store i64 %189, ptr %137, align 8, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  %indvars.iv.next108 = add nsw i64 %indvars.iv107, -1
  %190 = icmp sgt i64 %indvars.iv107, 0
  br i1 %190, label %179, label %._crit_edge91, !llvm.loop !26

191:                                              ; preds = %168, %153
  %.pn = phi { ptr, i32 } [ %169, %168 ], [ %154, %153 ]
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %8) #8
  br label %192

192:                                              ; preds = %191, %151
  %.pn.pn = phi { ptr, i32 } [ %.pn, %191 ], [ %152, %151 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %8) #8
  br label %210

._crit_edge99:                                    ; preds = %.lr.ph98, %._crit_edge95.thread, %._crit_edge95
  %193 = phi i64 [ 0, %._crit_edge95 ], [ 0, %._crit_edge95.thread ], [ %197, %.lr.ph98 ]
  %194 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %193)
          to label %201 unwind label %205

.lr.ph98:                                         ; preds = %._crit_edge95, %.lr.ph98
  %indvars.iv111 = phi i64 [ %indvars.iv.next112, %.lr.ph98 ], [ 0, %._crit_edge95 ]
  %195 = getelementptr inbounds i64, ptr %96, i64 %indvars.iv111
  %196 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %195)
  %197 = load i64, ptr %196, align 8, !tbaa !21
  store i64 %197, ptr %17, align 8, !tbaa !21
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %198 = load i32, ptr %1, align 4, !tbaa !11
  %199 = sext i32 %198 to i64
  %200 = icmp slt i64 %indvars.iv.next112, %199
  br i1 %200, label %.lr.ph98, label %._crit_edge99, !llvm.loop !27

201:                                              ; preds = %._crit_edge99
  %202 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %194, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %203 unwind label %205

203:                                              ; preds = %201
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  br i1 %44, label %.loopexit66, label %.preheader65.preheader

.preheader65.preheader:                           ; preds = %203
  %204 = getelementptr inbounds %"class.std::vector", ptr %43, i64 %42
  br label %.preheader65

205:                                              ; preds = %201, %._crit_edge99
  %206 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  br label %210

.preheader65:                                     ; preds = %.preheader65.preheader, %.preheader65
  %207 = phi ptr [ %208, %.preheader65 ], [ %204, %.preheader65.preheader ]
  %208 = getelementptr inbounds i8, ptr %207, i64 -24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %208) #8
  %209 = icmp eq ptr %208, %43
  br i1 %209, label %.loopexit66, label %.preheader65

.loopexit66:                                      ; preds = %.preheader65, %203
  call void @llvm.stackrestore.p0(ptr %32)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0

210:                                              ; preds = %149, %192, %66, %84, %205, %126, %100
  %.pn60.pn.pn.pn = phi { ptr, i32 } [ %206, %205 ], [ %127, %126 ], [ %101, %100 ], [ %.pn60.pn, %84 ], [ %67, %66 ], [ %.pn.pn, %192 ], [ %150, %149 ]
  br i1 %44, label %.loopexit, label %.preheader.preheader

.preheader.preheader:                             ; preds = %210
  %211 = getelementptr inbounds %"class.std::vector", ptr %43, i64 %42
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %212 = phi ptr [ %213, %.preheader ], [ %211, %.preheader.preheader ]
  %213 = getelementptr inbounds i8, ptr %212, i64 -24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %213) #8
  %214 = icmp eq ptr %213, %43
  br i1 %214, label %.loopexit, label %.preheader

.loopexit:                                        ; preds = %.preheader, %210
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn60.pn.pn.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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 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 @_ZSt4sortIPSt4pairIiiEEvT_S3_(ptr noundef, ptr noundef) local_unnamed_addr #6

; 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 @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5 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 zeroext i1 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #2 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #5 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 #5 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(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) #4

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


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