; LLVM IR from eyangch/competitive-programming :: USACOcontests/silver/2020.02 (clocktree)

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

47:                                               ; preds = %57, %0
  %48 = load i32, ptr %5, align 4, !tbaa !11
  %49 = load i32, ptr %2, align 4, !tbaa !11
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  br label %60

52:                                               ; preds = %47
  %53 = load i32, ptr %5, align 4, !tbaa !11
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds i32, ptr %46, i64 %54
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %55)
  br label %57

57:                                               ; preds = %52
  %58 = load i32, ptr %5, align 4, !tbaa !11
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %5, align 4, !tbaa !11
  br label %47, !llvm.loop !13

60:                                               ; preds = %51
  %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) #9
  %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) #9
  store i32 0, ptr %7, align 4, !tbaa !11
  br label %72

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

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

78:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  %79 = 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 %80 unwind label %100

80:                                               ; preds = %78
  %81 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %79, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %82 unwind label %100

82:                                               ; preds = %80
  %83 = load i32, ptr %8, align 4, !tbaa !11
  %84 = sub nsw i32 %83, 1
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds %"class.std::vector", ptr %63, i64 %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  %87 = load i32, ptr %9, align 4, !tbaa !11
  %88 = sub nsw i32 %87, 1
  store i32 %88, ptr %12, align 4, !tbaa !11
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %86, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %89 unwind label %104

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

96:                                               ; preds = %89
  call void @llvm.lifetime.end.p0(i64 4, 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 %97

97:                                               ; preds = %96
  %98 = load i32, ptr %7, align 4, !tbaa !11
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %7, align 4, !tbaa !11
  br label %72, !llvm.loop !15

100:                                              ; preds = %80, %78
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %10, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %11, align 4
  br label %112

104:                                              ; preds = %82
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %10, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  br label %112

108:                                              ; preds = %89
  %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
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %112

112:                                              ; preds = %108, %104, %100
  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 %283

113:                                              ; preds = %77
  call void @llvm.lifetime.start.p0(i64 80, ptr %14) #9
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
          to label %114 unwind label %143

114:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %115 = getelementptr inbounds [2 x i32], ptr %16, i64 0, i64 1
  store i32 0, ptr %115, align 4, !tbaa !11
  %116 = getelementptr inbounds [2 x i32], ptr %16, i64 0, i64 0
  store i32 0, ptr %116, align 4, !tbaa !11
  %117 = getelementptr inbounds [2 x i32], ptr %15, i64 0, i64 1
  store i32 0, ptr %117, align 4, !tbaa !11
  %118 = getelementptr inbounds [2 x i32], ptr %15, i64 0, i64 0
  store i32 0, ptr %118, align 4, !tbaa !11
  %119 = load i32, ptr %2, align 4, !tbaa !11
  %120 = zext i32 %119 to i64
  %121 = alloca i8, i64 %120, align 16
  store i64 %120, ptr %17, align 8
  %122 = load i32, ptr %2, align 4, !tbaa !11
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds i8, ptr %121, i64 %123
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #9
  store i8 0, ptr %18, align 1, !tbaa !16
  invoke void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef %121, ptr noundef %124, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %125 unwind label %147

125:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  store i32 0, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  store i32 0, ptr %21, align 4, !tbaa !11
  invoke void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %126 unwind label %151

126:                                              ; preds = %125
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %14, ptr noundef nonnull align 4 dereferenceable(8) %19)
          to label %127 unwind label %151

127:                                              ; preds = %126
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br label %128

128:                                              ; preds = %217, %215, %127
  %129 = invoke noundef zeroext i1 @_ZNKSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
          to label %130 unwind label %155

130:                                              ; preds = %128
  %131 = xor i1 %129, true
  br i1 %131, label %132, label %219

132:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  %133 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
          to label %134 unwind label %159

134:                                              ; preds = %132
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %133, i64 8, i1 false)
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %14)
          to label %135 unwind label %159

135:                                              ; preds = %134
  %136 = getelementptr inbounds %"struct.std::pair", ptr %22, i32 0, i32 0
  %137 = load i32, ptr %136, align 4, !tbaa !18
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds i8, ptr %121, i64 %138
  %140 = load i8, ptr %139, align 1, !tbaa !16, !range !20, !noundef !21
  %141 = trunc i8 %140 to i1
  br i1 %141, label %142, label %163

142:                                              ; preds = %135
  store i32 8, ptr %23, align 4
  br label %215, !llvm.loop !22

143:                                              ; preds = %113
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %10, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %11, align 4
  br label %275

147:                                              ; preds = %114
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %10, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #9
  br label %274

151:                                              ; preds = %126, %125
  %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 %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br label %274

155:                                              ; preds = %128
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %10, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %11, align 4
  br label %274

159:                                              ; preds = %134, %132
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %10, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %11, align 4
  br label %218

163:                                              ; preds = %135
  %164 = getelementptr inbounds %"struct.std::pair", ptr %22, i32 0, i32 0
  %165 = load i32, ptr %164, align 4, !tbaa !18
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds i8, ptr %121, i64 %166
  store i8 1, ptr %167, align 1, !tbaa !16
  %168 = getelementptr inbounds %"struct.std::pair", ptr %22, i32 0, i32 0
  %169 = load i32, ptr %168, align 4, !tbaa !18
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds i32, ptr %46, i64 %170
  %172 = load i32, ptr %171, align 4, !tbaa !11
  %173 = getelementptr inbounds %"struct.std::pair", ptr %22, i32 0, i32 1
  %174 = load i32, ptr %173, align 4, !tbaa !23
  %175 = srem i32 %174, 2
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [2 x i32], ptr %15, i64 0, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !11
  %179 = add nsw i32 %178, %172
  store i32 %179, ptr %177, align 4, !tbaa !11
  %180 = getelementptr inbounds %"struct.std::pair", ptr %22, i32 0, i32 1
  %181 = load i32, ptr %180, align 4, !tbaa !23
  %182 = srem i32 %181, 2
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [2 x i32], ptr %16, i64 0, i64 %183
  %185 = load i32, ptr %184, align 4, !tbaa !11
  %186 = add nsw i32 %185, 1
  store i32 %186, ptr %184, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  %187 = getelementptr inbounds %"struct.std::pair", ptr %22, i32 0, i32 0
  %188 = load i32, ptr %187, align 4, !tbaa !18
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds %"class.std::vector", ptr %63, i64 %189
  store ptr %190, ptr %24, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  %191 = load ptr, ptr %24, align 8, !tbaa !8
  %192 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %191) #9
  %193 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %192, ptr %193, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %194 = load ptr, ptr %24, align 8, !tbaa !8
  %195 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %194) #9
  %196 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %195, ptr %196, align 8
  br label %197

197:                                              ; preds = %208, %163
  %198 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #9
  br i1 %198, label %200, label %199

199:                                              ; preds = %197
  store i32 10, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  br label %214

200:                                              ; preds = %197
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  %201 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #9
  %202 = load i32, ptr %201, align 4, !tbaa !11
  store i32 %202, ptr %27, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #9
  %203 = getelementptr inbounds %"struct.std::pair", ptr %22, i32 0, i32 1
  %204 = load i32, ptr %203, align 4, !tbaa !23
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %29, align 4, !tbaa !11
  invoke void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %28, ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef nonnull align 4 dereferenceable(4) %29)
          to label %206 unwind label %210

206:                                              ; preds = %200
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %14, ptr noundef nonnull align 4 dereferenceable(8) %28)
          to label %207 unwind label %210

207:                                              ; preds = %206
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  br label %208

208:                                              ; preds = %207
  %209 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #9
  br label %197

210:                                              ; preds = %206, %200
  %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 %29) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  br label %218

214:                                              ; preds = %199
  store i32 0, ptr %23, align 4
  br label %215

215:                                              ; preds = %214, %142
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  %216 = load i32, ptr %23, align 4
  switch i32 %216, label %296 [
    i32 0, label %217
    i32 8, label %128
  ]

217:                                              ; preds = %215
  br label %128, !llvm.loop !22

218:                                              ; preds = %210, %159
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  br label %274

219:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #9
  store i32 0, ptr %30, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #9
  store i32 0, ptr %31, align 4, !tbaa !11
  br label %220

220:                                              ; preds = %259, %219
  %221 = load i32, ptr %31, align 4, !tbaa !11
  %222 = icmp slt i32 %221, 2
  br i1 %222, label %224, label %223

223:                                              ; preds = %220
  store i32 12, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #9
  br label %262

224:                                              ; preds = %220
  %225 = load i32, ptr %31, align 4, !tbaa !11
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [2 x i32], ptr %15, i64 0, i64 %226
  %228 = load i32, ptr %227, align 4, !tbaa !11
  %229 = load i32, ptr %31, align 4, !tbaa !11
  %230 = sub nsw i32 1, %229
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds [2 x i32], ptr %15, i64 0, i64 %231
  %233 = load i32, ptr %232, align 4, !tbaa !11
  %234 = sub nsw i32 %228, %233
  %235 = srem i32 %234, 12
  %236 = icmp eq i32 %235, 0
  br i1 %236, label %251, label %237

237:                                              ; preds = %224
  %238 = load i32, ptr %31, align 4, !tbaa !11
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [2 x i32], ptr %15, i64 0, i64 %239
  %241 = load i32, ptr %240, align 4, !tbaa !11
  %242 = load i32, ptr %31, align 4, !tbaa !11
  %243 = sub nsw i32 1, %242
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [2 x i32], ptr %15, i64 0, i64 %244
  %246 = load i32, ptr %245, align 4, !tbaa !11
  %247 = sub nsw i32 %241, %246
  %248 = sub nsw i32 %247, 1
  %249 = srem i32 %248, 12
  %250 = icmp eq i32 %249, 0
  br i1 %250, label %251, label %258

251:                                              ; preds = %237, %224
  %252 = load i32, ptr %31, align 4, !tbaa !11
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds [2 x i32], ptr %16, i64 0, i64 %253
  %255 = load i32, ptr %254, align 4, !tbaa !11
  %256 = load i32, ptr %30, align 4, !tbaa !11
  %257 = add nsw i32 %256, %255
  store i32 %257, ptr %30, align 4, !tbaa !11
  br label %258

258:                                              ; preds = %251, %237
  br label %259

259:                                              ; preds = %258
  %260 = load i32, ptr %31, align 4, !tbaa !11
  %261 = add nsw i32 %260, 1
  store i32 %261, ptr %31, align 4, !tbaa !11
  br label %220, !llvm.loop !24

262:                                              ; preds = %223
  %263 = load i32, ptr %30, align 4, !tbaa !11
  %264 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %263)
          to label %265 unwind label %270

265:                                              ; preds = %262
  %266 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %264, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %267 unwind label %270

267:                                              ; preds = %265
  store i32 0, ptr %1, align 4
  store i32 1, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %14) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr %14) #9
  %268 = getelementptr inbounds %"class.std::vector", ptr %63, i64 %62
  %269 = icmp eq ptr %63, %268
  br i1 %269, label %280, label %276

270:                                              ; preds = %265, %262
  %271 = landingpad { ptr, i32 }
          cleanup
  %272 = extractvalue { ptr, i32 } %271, 0
  store ptr %272, ptr %10, align 8
  %273 = extractvalue { ptr, i32 } %271, 1
  store i32 %273, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  br label %274

274:                                              ; preds = %270, %218, %155, %151, %147
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %14) #9
  br label %275

275:                                              ; preds = %274, %143
  call void @llvm.lifetime.end.p0(i64 80, ptr %14) #9
  br label %283

276:                                              ; preds = %276, %267
  %277 = phi ptr [ %268, %267 ], [ %278, %276 ]
  %278 = getelementptr inbounds %"class.std::vector", ptr %277, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %278) #9
  %279 = icmp eq ptr %278, %63
  br i1 %279, label %280, label %276

280:                                              ; preds = %276, %267
  %281 = load ptr, ptr %3, align 8
  call void @llvm.stackrestore.p0(ptr %281)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  %282 = load i32, ptr %1, align 4
  ret i32 %282

283:                                              ; preds = %275, %112
  %284 = getelementptr inbounds %"class.std::vector", ptr %63, i64 %62
  %285 = icmp eq ptr %63, %284
  br i1 %285, label %290, label %286

286:                                              ; preds = %286, %283
  %287 = phi ptr [ %284, %283 ], [ %288, %286 ]
  %288 = getelementptr inbounds %"class.std::vector", ptr %287, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %288) #9
  %289 = icmp eq ptr %288, %63
  br i1 %289, label %290, label %286

290:                                              ; preds = %286, %283
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  br label %291

291:                                              ; preds = %290
  %292 = load ptr, ptr %10, align 8
  %293 = load i32, ptr %11, align 4
  %294 = insertvalue { ptr, i32 } poison, ptr %292, 0
  %295 = insertvalue { ptr, i32 } %294, i32 %293, 1
  resume { ptr, i32 } %295

296:                                              ; preds = %215
  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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

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

; 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 uwtable
declare dso_local void @_ZNSt5stackISt4pairIiiESt5dequeIS1_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 @_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 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 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_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #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: 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 @_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 = { 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 = !{!"int", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !10, i64 0}
!18 = !{!19, !12, i64 0}
!19 = !{!"_ZTSSt4pairIiiE", !12, i64 0, !12, i64 4}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = distinct !{!22, !14}
!23 = !{!19, !12, i64 4}
!24 = distinct !{!24, !14}


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::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.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 [13 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 [14 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 %"class.std::stack", align 8
  %7 = alloca [2 x i32], align 4
  %8 = alloca [2 x i32], align 4
  %9 = alloca i8, align 1
  %10 = alloca %"struct.std::pair", align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::pair", align 4
  %17 = alloca i32, align 4
  %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
  %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 = load i32, ptr %1, align 4, !tbaa !11
  %30 = zext i32 %29 to i64
  %31 = call ptr @llvm.stacksave.p0()
  %32 = alloca i32, i64 %30, align 16
  %33 = load i32, ptr %1, align 4, !tbaa !11
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.lcssa = phi i32 [ %33, %0 ], [ %40, %.lr.ph ]
  %35 = zext i32 %.lcssa to i64
  %36 = alloca %"class.std::vector", i64 %35, align 16
  %37 = icmp eq i32 %.lcssa, 0
  br i1 %37, label %._crit_edge52, label %43

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %38 = getelementptr inbounds i32, ptr %32, i64 %indvars.iv
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %38)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %40 = load i32, ptr %1, align 4, !tbaa !11
  %41 = sext i32 %40 to i64
  %42 = icmp slt i64 %indvars.iv.next, %41
  br i1 %42, label %.lr.ph, label %._crit_edge, !llvm.loop !13

43:                                               ; preds = %._crit_edge
  %44 = getelementptr inbounds %"class.std::vector", ptr %36, i64 %35
  br label %45

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

.loopexit45:                                      ; preds = %45
  %.pre = load i32, ptr %1, align 4, !tbaa !11
  %invariant.gep = getelementptr i8, ptr %36, i64 -24
  %49 = icmp sgt i32 %.pre, 1
  br i1 %49, label %.lr.ph51, label %._crit_edge52

._crit_edge52:                                    ; preds = %63, %._crit_edge, %.loopexit45
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %6) #8
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
          to label %75 unwind label %96

.lr.ph51:                                         ; preds = %.loopexit45, %63
  %.02649 = phi i32 [ %64, %63 ], [ 0, %.loopexit45 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  %50 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %51 unwind label %68

51:                                               ; preds = %.lr.ph51
  %52 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %53 unwind label %68

53:                                               ; preds = %51
  %54 = load i32, ptr %2, align 4, !tbaa !11
  %55 = sext i32 %54 to i64
  %gep = getelementptr %"class.std::vector", ptr %invariant.gep, i64 %55
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %56 = load i32, ptr %3, align 4, !tbaa !11
  %57 = add nsw i32 %56, -1
  store i32 %57, ptr %4, align 4, !tbaa !11
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %gep, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %58 unwind label %70

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

63:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  %64 = add nuw nsw i32 %.02649, 1
  %65 = load i32, ptr %1, align 4, !tbaa !11
  %66 = add nsw i32 %65, -1
  %67 = icmp slt i32 %64, %66
  br i1 %67, label %.lr.ph51, label %._crit_edge52, !llvm.loop !15

68:                                               ; preds = %51, %.lr.ph51
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %74

70:                                               ; preds = %53
  %71 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  br label %74

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

74:                                               ; preds = %72, %70, %68
  %.pn39 = phi { ptr, i32 } [ %73, %72 ], [ %71, %70 ], [ %69, %68 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  br label %158

75:                                               ; preds = %._crit_edge52
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %76 = getelementptr inbounds i8, ptr %8, i64 4
  store i32 0, ptr %76, align 4, !tbaa !11
  store i32 0, ptr %8, align 4, !tbaa !11
  %77 = getelementptr inbounds i8, ptr %7, i64 4
  store i32 0, ptr %77, align 4, !tbaa !11
  store i32 0, ptr %7, align 4, !tbaa !11
  %78 = load i32, ptr %1, align 4, !tbaa !11
  %79 = zext i32 %78 to i64
  %80 = alloca i8, i64 %79, align 16
  %81 = sext i32 %78 to i64
  %82 = getelementptr inbounds i8, ptr %80, i64 %81
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #8
  store i8 0, ptr %9, align 1, !tbaa !16
  invoke void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull %80, ptr noundef nonnull %82, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %83 unwind label %98

83:                                               ; preds = %75
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  store i32 0, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  store i32 0, ptr %12, align 4, !tbaa !11
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %6, ptr noundef nonnull align 4 dereferenceable(8) %10)
          to label %84 unwind label %100

84:                                               ; preds = %83
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  %85 = call noundef zeroext i1 @_ZNKSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  br i1 %85, label %.preheader44, label %.lr.ph57

.preheader44.loopexit:                            ; preds = %126
  %.pre65 = load i32, ptr %7, align 4, !tbaa !11
  %.pre66 = load i32, ptr %77, align 4, !tbaa !11
  br label %.preheader44

.preheader44:                                     ; preds = %.preheader44.loopexit, %84
  %86 = phi i32 [ %.pre66, %.preheader44.loopexit ], [ 0, %84 ]
  %87 = phi i32 [ %.pre65, %.preheader44.loopexit ], [ 0, %84 ]
  %88 = sub nsw i32 %87, %86
  %89 = srem i32 %88, 12
  %90 = icmp eq i32 %89, 0
  br i1 %90, label %132, label %128

.lr.ph57:                                         ; preds = %84, %126
  %91 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  %.sroa.0.0.copyload = load i32, ptr %91, align 4
  %.sroa.8.0..sroa_idx = getelementptr inbounds i8, ptr %91, i64 4
  %.sroa.8.0.copyload = load i32, ptr %.sroa.8.0..sroa_idx, align 4
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  %92 = sext i32 %.sroa.0.0.copyload to i64
  %93 = getelementptr inbounds i8, ptr %80, i64 %92
  %94 = load i8, ptr %93, align 1, !tbaa !16, !range !18, !noundef !19
  %95 = trunc nuw i8 %94 to i1
  br i1 %95, label %126, label %102, !llvm.loop !20

96:                                               ; preds = %._crit_edge52
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %154

98:                                               ; preds = %75
  %99 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #8
  br label %153

100:                                              ; preds = %83
  %101 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  br label %153

102:                                              ; preds = %.lr.ph57
  store i8 1, ptr %93, align 1, !tbaa !16
  %103 = getelementptr inbounds i32, ptr %32, i64 %92
  %104 = load i32, ptr %103, align 4, !tbaa !11
  %105 = srem i32 %.sroa.8.0.copyload, 2
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [2 x i32], ptr %7, i64 0, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !11
  %109 = add nsw i32 %108, %104
  store i32 %109, ptr %107, align 4, !tbaa !11
  %110 = getelementptr inbounds [2 x i32], ptr %8, i64 0, i64 %106
  %111 = load i32, ptr %110, align 4, !tbaa !11
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %110, align 4, !tbaa !11
  %113 = getelementptr inbounds %"class.std::vector", ptr %36, i64 %92
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #8
  %114 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %113) #8
  store ptr %114, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  %115 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %113) #8
  store ptr %115, ptr %14, align 8
  %116 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  br i1 %116, label %.lr.ph54, label %._crit_edge55

.lr.ph54:                                         ; preds = %102
  %117 = add nsw i32 %.sroa.8.0.copyload, 1
  br label %118

._crit_edge55:                                    ; preds = %121, %102
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  br label %126

118:                                              ; preds = %.lr.ph54, %121
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #8
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  %120 = load i32, ptr %119, align 4, !tbaa !11
  store i32 %120, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #8
  store i32 %117, ptr %17, align 4, !tbaa !11
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %17)
  invoke void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %6, ptr noundef nonnull align 4 dereferenceable(8) %16)
          to label %121 unwind label %124

121:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  %123 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  br i1 %123, label %118, label %._crit_edge55

124:                                              ; preds = %118
  %125 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  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 8, ptr nonnull %13) #8
  br label %153

126:                                              ; preds = %.lr.ph57, %._crit_edge55
  %127 = call noundef zeroext i1 @_ZNKSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  br i1 %127, label %.preheader44.loopexit, label %.lr.ph57

128:                                              ; preds = %.preheader44
  %129 = add nsw i32 %88, -1
  %130 = srem i32 %129, 12
  %131 = icmp eq i32 %130, 0
  br i1 %131, label %132, label %134

132:                                              ; preds = %128, %.preheader44
  %133 = load i32, ptr %8, align 4, !tbaa !11
  br label %134

134:                                              ; preds = %128, %132
  %.1 = phi i32 [ %133, %132 ], [ 0, %128 ]
  %135 = sub nsw i32 %86, %87
  %136 = srem i32 %135, 12
  %137 = icmp eq i32 %136, 0
  br i1 %137, label %142, label %138

138:                                              ; preds = %134
  %139 = add nsw i32 %135, -1
  %140 = srem i32 %139, 12
  %141 = icmp eq i32 %140, 0
  br i1 %141, label %142, label %145

142:                                              ; preds = %138, %134
  %143 = load i32, ptr %76, align 4, !tbaa !11
  %144 = add nsw i32 %143, %.1
  br label %145

145:                                              ; preds = %142, %138
  %.1.1 = phi i32 [ %144, %142 ], [ %.1, %138 ]
  %146 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.1.1)
          to label %147 unwind label %151

147:                                              ; preds = %145
  %148 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %146, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %149 unwind label %151

149:                                              ; preds = %147
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %6) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #8
  br i1 %37, label %.loopexit43, label %.preheader42.preheader

.preheader42.preheader:                           ; preds = %149
  %150 = getelementptr inbounds %"class.std::vector", ptr %36, i64 %35
  br label %.preheader42

151:                                              ; preds = %147, %145
  %152 = landingpad { ptr, i32 }
          cleanup
  br label %153

153:                                              ; preds = %151, %124, %100, %98
  %.pn = phi { ptr, i32 } [ %125, %124 ], [ %152, %151 ], [ %101, %100 ], [ %99, %98 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @_ZNSt5stackISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %6) #8
  br label %154

154:                                              ; preds = %153, %96
  %.pn.pn = phi { ptr, i32 } [ %.pn, %153 ], [ %97, %96 ]
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #8
  br label %158

.preheader42:                                     ; preds = %.preheader42.preheader, %.preheader42
  %155 = phi ptr [ %156, %.preheader42 ], [ %150, %.preheader42.preheader ]
  %156 = getelementptr inbounds i8, ptr %155, i64 -24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %156) #8
  %157 = icmp eq ptr %156, %36
  br i1 %157, label %.loopexit43, label %.preheader42

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

158:                                              ; preds = %154, %74
  %.pn39.pn = phi { ptr, i32 } [ %.pn39, %74 ], [ %.pn.pn, %154 ]
  br i1 %37, label %.loopexit, label %.preheader.preheader

.preheader.preheader:                             ; preds = %158
  %159 = getelementptr inbounds %"class.std::vector", ptr %36, i64 %35
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %160 = phi ptr [ %161, %.preheader ], [ %159, %.preheader.preheader ]
  %161 = getelementptr inbounds i8, ptr %160, i64 -24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %161) #8
  %162 = icmp eq ptr %161, %36
  br i1 %162, label %.loopexit, label %.preheader

.loopexit:                                        ; preds = %.preheader, %158
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn39.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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

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

; 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 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 #5 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 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 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_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #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: 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 @_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 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !10, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !14}


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