; LLVM IR from xirc/cp-algorithm :: atcoder/abc170/E (main)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::multiset" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<std::multiset<int>, std::allocator<std::multiset<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::multiset<int>, std::allocator<std::multiset<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::multiset<int>, std::allocator<std::multiset<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::multiset<int>, std::allocator<std::multiset<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.5" = type { i8 }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::reverse_iterator" = type { %"struct.std::_Rb_tree_const_iterator" }

@_ZSt3cin = external global %"class.std::basic_istream", 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 i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca %"class.std::multiset", align 8
  %13 = alloca %"class.std::vector.3", align 8
  %14 = alloca %"class.std::allocator.5", align 1
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %19 = alloca ptr, align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca %"class.std::reverse_iterator", align 8
  %25 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca %"class.std::reverse_iterator", align 8
  %32 = alloca i32, align 4
  %33 = alloca %"class.std::reverse_iterator", align 8
  %34 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %35 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %36 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %37 = alloca i32, align 4
  %38 = alloca %"class.std::reverse_iterator", align 8
  %39 = alloca i32, align 4
  %40 = alloca %"class.std::reverse_iterator", align 8
  %41 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %42 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %43 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %44 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %45 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %46 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %47 = alloca i32, align 4
  %48 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  store i32 0, ptr %1, align 4
  %49 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %50 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %51 = getelementptr i8, ptr %50, i64 -24
  %52 = load i64, ptr %51, align 8
  %53 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %52
  %54 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %53, ptr noundef null)
  %55 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %56 = getelementptr i8, ptr %55, i64 -24
  %57 = load i64, ptr %56, align 8
  %58 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %57
  %59 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %58, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 2147483647, ptr %2, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 200000, ptr %3, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %60, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #7
  %62 = load i32, ptr %4, align 4, !tbaa !8
  %63 = sext i32 %62 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %63, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %64 unwind label %74

64:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #7
  %65 = load i32, ptr %4, align 4, !tbaa !8
  %66 = sext i32 %65 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %66, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %67 unwind label %78

67:                                               ; preds = %64
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #7
  call void @_ZNSt8multisetIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #7
  call void @_ZNSaISt8multisetIiSt4lessIiESaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  invoke void @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEC2EmRKS5_(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef 200000, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %68 unwind label %82

68:                                               ; preds = %67
  call void @_ZNSt15__new_allocatorISt8multisetIiSt4lessIiESaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !8
  br label %69

69:                                               ; preds = %107, %68
  %70 = load i32, ptr %15, align 4, !tbaa !8
  %71 = load i32, ptr %4, align 4, !tbaa !8
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %86, label %73

73:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %114

74:                                               ; preds = %0
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %8, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #7
  br label %315

78:                                               ; preds = %64
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %8, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  br label %314

82:                                               ; preds = %67
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %8, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %9, align 4
  call void @_ZNSt15__new_allocatorISt8multisetIiSt4lessIiESaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  br label %313

86:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %87 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %88 unwind label %110

88:                                               ; preds = %86
  %89 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %87, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %90 unwind label %110

90:                                               ; preds = %88
  %91 = load i32, ptr %17, align 4, !tbaa !8
  %92 = add nsw i32 %91, -1
  store i32 %92, ptr %17, align 4, !tbaa !8
  %93 = load i32, ptr %16, align 4, !tbaa !8
  %94 = load i32, ptr %15, align 4, !tbaa !8
  %95 = sext i32 %94 to i64
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %95) #7
  store i32 %93, ptr %96, align 4, !tbaa !8
  %97 = load i32, ptr %17, align 4, !tbaa !8
  %98 = load i32, ptr %15, align 4, !tbaa !8
  %99 = sext i32 %98 to i64
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %99) #7
  store i32 %97, ptr %100, align 4, !tbaa !8
  %101 = load i32, ptr %17, align 4, !tbaa !8
  %102 = sext i32 %101 to i64
  %103 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %102) #7
  %104 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %103, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %105 unwind label %110

105:                                              ; preds = %90
  %106 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %18, i32 0, i32 0
  store ptr %104, ptr %106, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %107

107:                                              ; preds = %105
  %108 = load i32, ptr %15, align 4, !tbaa !8
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %15, align 4, !tbaa !8
  br label %69, !llvm.loop !11

110:                                              ; preds = %90, %88, %86
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %8, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %312

114:                                              ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  store ptr %13, ptr %19, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %115 = load ptr, ptr %19, align 8, !tbaa !13
  %116 = call ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %115) #7
  %117 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %116, ptr %117, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %118 = load ptr, ptr %19, align 8, !tbaa !13
  %119 = call ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %118) #7
  %120 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %119, ptr %120, align 8
  br label %121

121:                                              ; preds = %139, %114
  %122 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt8multisetIiSt4lessIiESaIiEESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  br i1 %122, label %124, label %123

123:                                              ; preds = %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %150

124:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %125 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt8multisetIiSt4lessIiESaIiEESt6vectorIS5_SaIS5_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  store ptr %125, ptr %22, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %126 = load ptr, ptr %22, align 8, !tbaa !13
  %127 = call noundef zeroext i1 @_ZNKSt8multisetIiSt4lessIiESaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %126) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  br i1 %127, label %128, label %129

128:                                              ; preds = %124
  br label %134

129:                                              ; preds = %124
  %130 = load ptr, ptr %22, align 8, !tbaa !13
  call void @_ZNKSt8multisetIiSt4lessIiESaIiEE6rbeginEv(ptr dead_on_unwind writable sret(%"class.std::reverse_iterator") align 8 %24, ptr noundef nonnull align 8 dereferenceable(48) %130) #7
  %131 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorIiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %132 unwind label %141

132:                                              ; preds = %129
  %133 = load i32, ptr %131, align 4, !tbaa !8
  br label %134

134:                                              ; preds = %132, %128
  %135 = phi i32 [ 2147483647, %128 ], [ %133, %132 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  store i32 %135, ptr %23, align 4, !tbaa !8
  %136 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %137 unwind label %145

137:                                              ; preds = %134
  %138 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %25, i32 0, i32 0
  store ptr %136, ptr %138, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %139

139:                                              ; preds = %137
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt8multisetIiSt4lessIiESaIiEESt6vectorIS5_SaIS5_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  br label %121

141:                                              ; preds = %129
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %8, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %149

145:                                              ; preds = %134
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %8, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %9, align 4
  br label %149

149:                                              ; preds = %145, %141
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %312

150:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  store i32 0, ptr %26, align 4, !tbaa !8
  br label %151

151:                                              ; preds = %270, %150
  %152 = load i32, ptr %26, align 4, !tbaa !8
  %153 = load i32, ptr %5, align 4, !tbaa !8
  %154 = icmp slt i32 %152, %153
  br i1 %154, label %156, label %155

155:                                              ; preds = %151
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %310

156:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  %157 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %27)
          to label %158 unwind label %273

158:                                              ; preds = %156
  %159 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %157, ptr noundef nonnull align 4 dereferenceable(4) %28)
          to label %160 unwind label %273

160:                                              ; preds = %158
  %161 = load i32, ptr %27, align 4, !tbaa !8
  %162 = add nsw i32 %161, -1
  store i32 %162, ptr %27, align 4, !tbaa !8
  %163 = load i32, ptr %28, align 4, !tbaa !8
  %164 = add nsw i32 %163, -1
  store i32 %164, ptr %28, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  %165 = load i32, ptr %27, align 4, !tbaa !8
  %166 = sext i32 %165 to i64
  %167 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %166) #7
  %168 = load i32, ptr %167, align 4, !tbaa !8
  store i32 %168, ptr %29, align 4, !tbaa !8
  %169 = load i32, ptr %28, align 4, !tbaa !8
  %170 = load i32, ptr %27, align 4, !tbaa !8
  %171 = sext i32 %170 to i64
  %172 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %171) #7
  store i32 %169, ptr %172, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %173 = load i32, ptr %29, align 4, !tbaa !8
  %174 = sext i32 %173 to i64
  %175 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %174) #7
  call void @_ZNKSt8multisetIiSt4lessIiESaIiEE6rbeginEv(ptr dead_on_unwind writable sret(%"class.std::reverse_iterator") align 8 %31, ptr noundef nonnull align 8 dereferenceable(48) %175) #7
  %176 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorIiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %177 unwind label %277

177:                                              ; preds = %160
  %178 = load i32, ptr %176, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  store i32 %178, ptr %30, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  %179 = load i32, ptr %28, align 4, !tbaa !8
  %180 = sext i32 %179 to i64
  %181 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %180) #7
  %182 = call noundef zeroext i1 @_ZNKSt8multisetIiSt4lessIiESaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %181) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  br i1 %182, label %183, label %184

183:                                              ; preds = %177
  br label %191

184:                                              ; preds = %177
  %185 = load i32, ptr %28, align 4, !tbaa !8
  %186 = sext i32 %185 to i64
  %187 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %186) #7
  call void @_ZNKSt8multisetIiSt4lessIiESaIiEE6rbeginEv(ptr dead_on_unwind writable sret(%"class.std::reverse_iterator") align 8 %33, ptr noundef nonnull align 8 dereferenceable(48) %187) #7
  %188 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorIiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %189 unwind label %281

189:                                              ; preds = %184
  %190 = load i32, ptr %188, align 4, !tbaa !8
  br label %191

191:                                              ; preds = %189, %183
  %192 = phi i32 [ 2147483647, %183 ], [ %190, %189 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  store i32 %192, ptr %32, align 4, !tbaa !8
  %193 = load i32, ptr %29, align 4, !tbaa !8
  %194 = sext i32 %193 to i64
  %195 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %194) #7
  %196 = load i32, ptr %29, align 4, !tbaa !8
  %197 = sext i32 %196 to i64
  %198 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %197) #7
  %199 = load i32, ptr %27, align 4, !tbaa !8
  %200 = sext i32 %199 to i64
  %201 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %200) #7
  %202 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(48) %198, ptr noundef nonnull align 4 dereferenceable(4) %201)
          to label %203 unwind label %285

203:                                              ; preds = %191
  %204 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %34, i32 0, i32 0
  store ptr %202, ptr %204, align 8
  %205 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %34, i32 0, i32 0
  %206 = load ptr, ptr %205, align 8
  %207 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE(ptr noundef nonnull align 8 dereferenceable(48) %195, ptr %206)
          to label %208 unwind label %285

208:                                              ; preds = %203
  %209 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %35, i32 0, i32 0
  store ptr %207, ptr %209, align 8
  %210 = load i32, ptr %28, align 4, !tbaa !8
  %211 = sext i32 %210 to i64
  %212 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %211) #7
  %213 = load i32, ptr %27, align 4, !tbaa !8
  %214 = sext i32 %213 to i64
  %215 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %214) #7
  %216 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %212, ptr noundef nonnull align 4 dereferenceable(4) %215)
          to label %217 unwind label %285

217:                                              ; preds = %208
  %218 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %36, i32 0, i32 0
  store ptr %216, ptr %218, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #7
  %219 = load i32, ptr %29, align 4, !tbaa !8
  %220 = sext i32 %219 to i64
  %221 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %220) #7
  %222 = call noundef zeroext i1 @_ZNKSt8multisetIiSt4lessIiESaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %221) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  br i1 %222, label %223, label %224

223:                                              ; preds = %217
  br label %231

224:                                              ; preds = %217
  %225 = load i32, ptr %29, align 4, !tbaa !8
  %226 = sext i32 %225 to i64
  %227 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %226) #7
  call void @_ZNKSt8multisetIiSt4lessIiESaIiEE6rbeginEv(ptr dead_on_unwind writable sret(%"class.std::reverse_iterator") align 8 %38, ptr noundef nonnull align 8 dereferenceable(48) %227) #7
  %228 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorIiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %38)
          to label %229 unwind label %289

229:                                              ; preds = %224
  %230 = load i32, ptr %228, align 4, !tbaa !8
  br label %231

231:                                              ; preds = %229, %223
  %232 = phi i32 [ 2147483647, %223 ], [ %230, %229 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  store i32 %232, ptr %37, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #7
  %233 = load i32, ptr %28, align 4, !tbaa !8
  %234 = sext i32 %233 to i64
  %235 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %234) #7
  call void @_ZNKSt8multisetIiSt4lessIiESaIiEE6rbeginEv(ptr dead_on_unwind writable sret(%"class.std::reverse_iterator") align 8 %40, ptr noundef nonnull align 8 dereferenceable(48) %235) #7
  %236 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorIiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %40)
          to label %237 unwind label %293

237:                                              ; preds = %231
  %238 = load i32, ptr %236, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #7
  store i32 %238, ptr %39, align 4, !tbaa !8
  %239 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 4 dereferenceable(4) %30)
          to label %240 unwind label %297

240:                                              ; preds = %237
  %241 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %41, i32 0, i32 0
  store ptr %239, ptr %241, align 8
  %242 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %41, i32 0, i32 0
  %243 = load ptr, ptr %242, align 8
  %244 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr %243)
          to label %245 unwind label %297

245:                                              ; preds = %240
  %246 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %42, i32 0, i32 0
  store ptr %244, ptr %246, align 8
  %247 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 4 dereferenceable(4) %32)
          to label %248 unwind label %297

248:                                              ; preds = %245
  %249 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %43, i32 0, i32 0
  store ptr %247, ptr %249, align 8
  %250 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %43, i32 0, i32 0
  %251 = load ptr, ptr %250, align 8
  %252 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr %251)
          to label %253 unwind label %297

253:                                              ; preds = %248
  %254 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %44, i32 0, i32 0
  store ptr %252, ptr %254, align 8
  %255 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 4 dereferenceable(4) %37)
          to label %256 unwind label %297

256:                                              ; preds = %253
  %257 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %45, i32 0, i32 0
  store ptr %255, ptr %257, align 8
  %258 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 4 dereferenceable(4) %39)
          to label %259 unwind label %297

259:                                              ; preds = %256
  %260 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %46, i32 0, i32 0
  store ptr %258, ptr %260, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #7
  %261 = call ptr @_ZNKSt8multisetIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  %262 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %48, i32 0, i32 0
  store ptr %261, ptr %262, align 8
  %263 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %48) #7
  %264 = load i32, ptr %263, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #7
  store i32 %264, ptr %47, align 4, !tbaa !8
  %265 = load i32, ptr %47, align 4, !tbaa !8
  %266 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %265)
          to label %267 unwind label %301

267:                                              ; preds = %259
  %268 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %266, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %269 unwind label %301

269:                                              ; preds = %267
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %270

270:                                              ; preds = %269
  %271 = load i32, ptr %26, align 4, !tbaa !8
  %272 = add nsw i32 %271, 1
  store i32 %272, ptr %26, align 4, !tbaa !8
  br label %151, !llvm.loop !15

273:                                              ; preds = %158, %156
  %274 = landingpad { ptr, i32 }
          cleanup
  %275 = extractvalue { ptr, i32 } %274, 0
  store ptr %275, ptr %8, align 8
  %276 = extractvalue { ptr, i32 } %274, 1
  store i32 %276, ptr %9, align 4
  br label %309

277:                                              ; preds = %160
  %278 = landingpad { ptr, i32 }
          cleanup
  %279 = extractvalue { ptr, i32 } %278, 0
  store ptr %279, ptr %8, align 8
  %280 = extractvalue { ptr, i32 } %278, 1
  store i32 %280, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  br label %308

281:                                              ; preds = %184
  %282 = landingpad { ptr, i32 }
          cleanup
  %283 = extractvalue { ptr, i32 } %282, 0
  store ptr %283, ptr %8, align 8
  %284 = extractvalue { ptr, i32 } %282, 1
  store i32 %284, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  br label %307

285:                                              ; preds = %208, %203, %191
  %286 = landingpad { ptr, i32 }
          cleanup
  %287 = extractvalue { ptr, i32 } %286, 0
  store ptr %287, ptr %8, align 8
  %288 = extractvalue { ptr, i32 } %286, 1
  store i32 %288, ptr %9, align 4
  br label %307

289:                                              ; preds = %224
  %290 = landingpad { ptr, i32 }
          cleanup
  %291 = extractvalue { ptr, i32 } %290, 0
  store ptr %291, ptr %8, align 8
  %292 = extractvalue { ptr, i32 } %290, 1
  store i32 %292, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  br label %306

293:                                              ; preds = %231
  %294 = landingpad { ptr, i32 }
          cleanup
  %295 = extractvalue { ptr, i32 } %294, 0
  store ptr %295, ptr %8, align 8
  %296 = extractvalue { ptr, i32 } %294, 1
  store i32 %296, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #7
  br label %305

297:                                              ; preds = %256, %253, %248, %245, %240, %237
  %298 = landingpad { ptr, i32 }
          cleanup
  %299 = extractvalue { ptr, i32 } %298, 0
  store ptr %299, ptr %8, align 8
  %300 = extractvalue { ptr, i32 } %298, 1
  store i32 %300, ptr %9, align 4
  br label %305

301:                                              ; preds = %267, %259
  %302 = landingpad { ptr, i32 }
          cleanup
  %303 = extractvalue { ptr, i32 } %302, 0
  store ptr %303, ptr %8, align 8
  %304 = extractvalue { ptr, i32 } %302, 1
  store i32 %304, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #7
  br label %305

305:                                              ; preds = %301, %297, %293
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #7
  br label %306

306:                                              ; preds = %305, %289
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #7
  br label %307

307:                                              ; preds = %306, %285, %281
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  br label %308

308:                                              ; preds = %307, %277
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  br label %309

309:                                              ; preds = %308, %273
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %312

310:                                              ; preds = %155
  store i32 0, ptr %1, align 4
  call void @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #7
  call void @_ZNSt8multisetIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %311 = load i32, ptr %1, align 4
  ret i32 %311

312:                                              ; preds = %309, %149, %110
  call void @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  br label %313

313:                                              ; preds = %312, %82
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #7
  call void @_ZNSt8multisetIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  br label %314

314:                                              ; preds = %313, %78
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  br label %315

315:                                              ; preds = %314, %74
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %316

316:                                              ; preds = %315
  %317 = load ptr, ptr %8, align 8
  %318 = load i32, ptr %9, align 4
  %319 = insertvalue { ptr, i32 } poison, ptr %317, 0
  %320 = insertvalue { ptr, i32 } %319, i32 %318, 1
  resume { ptr, i32 } %320
}

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

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt8multisetIiSt4lessIiESaIiEE6rbeginEv(ptr dead_on_unwind noalias writable sret(%"class.std::reverse_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

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

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

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

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

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

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

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

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

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

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

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

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

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

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


; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::multiset" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<std::multiset<int>, std::allocator<std::multiset<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::multiset<int>, std::allocator<std::multiset<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::multiset<int>, std::allocator<std::multiset<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::multiset<int>, std::allocator<std::multiset<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.5" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::reverse_iterator" = type { %"struct.std::_Rb_tree_const_iterator" }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@_ZSt3cin = external global %"class.std::basic_istream", 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 %"class.std::vector", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"class.std::multiset", align 8
  %8 = alloca %"class.std::vector.3", align 8
  %9 = alloca %"class.std::allocator.5", align 1
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::reverse_iterator", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::reverse_iterator", align 8
  %20 = alloca i32, align 4
  %21 = alloca %"class.std::reverse_iterator", align 8
  %22 = alloca i32, align 4
  %23 = alloca %"class.std::reverse_iterator", align 8
  %24 = alloca i32, align 4
  %25 = alloca %"class.std::reverse_iterator", align 8
  %26 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %27 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %28 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %29 = getelementptr i8, ptr %28, i64 -24
  %30 = load i64, ptr %29, align 8
  %31 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %30
  %32 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %31, ptr noundef null)
  %33 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %34 = getelementptr i8, ptr %33, i64 -24
  %35 = load i64, ptr %34, align 8
  %36 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %35
  %37 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %36, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %38 = 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)
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  %40 = load i32, ptr %1, align 4, !tbaa !8
  %41 = sext i32 %40 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %41, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %42 unwind label %52

42:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  %43 = load i32, ptr %1, align 4, !tbaa !8
  %44 = sext i32 %43 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %44, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %45 unwind label %54

45:                                               ; preds = %42
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) #7
  call void @_ZNSt8multisetIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #7
  call void @_ZNSaISt8multisetIiSt4lessIiESaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  invoke void @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEC2EmRKS5_(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 200000, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %46 unwind label %56

46:                                               ; preds = %45
  call void @_ZNSt15__new_allocatorISt8multisetIiSt4lessIiESaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  %47 = load i32, ptr %1, align 4, !tbaa !8
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %72, %46
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %49 = call ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  store ptr %49, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %50 = call ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  store ptr %50, ptr %13, align 8
  %51 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt8multisetIiSt4lessIiESaIiEESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br i1 %51, label %.lr.ph47, label %._crit_edge48

52:                                               ; preds = %0
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  br label %190

54:                                               ; preds = %42
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  br label %189

56:                                               ; preds = %45
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt8multisetIiSt4lessIiESaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  br label %188

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

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

61:                                               ; preds = %59
  %62 = load i32, ptr %11, align 4, !tbaa !8
  %63 = add nsw i32 %62, -1
  store i32 %63, ptr %11, align 4, !tbaa !8
  %64 = load i32, ptr %10, align 4, !tbaa !8
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #7
  store i32 %64, ptr %65, align 4, !tbaa !8
  %66 = load i32, ptr %11, align 4, !tbaa !8
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv) #7
  store i32 %66, ptr %67, align 4, !tbaa !8
  %68 = load i32, ptr %11, align 4, !tbaa !8
  %69 = sext i32 %68 to i64
  %70 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %69) #7
  %71 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %70, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %72 unwind label %76

72:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %73 = load i32, ptr %1, align 4, !tbaa !8
  %74 = sext i32 %73 to i64
  %75 = icmp slt i64 %indvars.iv.next, %74
  br i1 %75, label %.lr.ph, label %._crit_edge, !llvm.loop !11

76:                                               ; preds = %61, %59, %.lr.ph
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  br label %187

._crit_edge48:                                    ; preds = %88, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  %78 = load i32, ptr %2, align 4, !tbaa !8
  %79 = icmp sgt i32 %78, 0
  br i1 %79, label %.lr.ph51, label %._crit_edge52

.lr.ph47:                                         ; preds = %._crit_edge, %88
  %80 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt8multisetIiSt4lessIiESaIiEESt6vectorIS5_SaIS5_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  %81 = call noundef zeroext i1 @_ZNKSt8multisetIiSt4lessIiESaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %80) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  br i1 %81, label %85, label %82

82:                                               ; preds = %.lr.ph47
  call void @_ZNKSt8multisetIiSt4lessIiESaIiEE6rbeginEv(ptr dead_on_unwind nonnull writable sret(%"class.std::reverse_iterator") align 8 %15, ptr noundef nonnull align 8 dereferenceable(48) %80) #7
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorIiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
  %84 = load i32, ptr %83, align 4, !tbaa !8
  br label %85

85:                                               ; preds = %.lr.ph47, %82
  %86 = phi i32 [ %84, %82 ], [ 2147483647, %.lr.ph47 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  store i32 %86, ptr %14, align 4, !tbaa !8
  %87 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %88 unwind label %91

88:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt8multisetIiSt4lessIiESaIiEESt6vectorIS5_SaIS5_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  %90 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt8multisetIiSt4lessIiESaIiEESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br i1 %90, label %.lr.ph47, label %._crit_edge48

91:                                               ; preds = %85
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  br label %187

._crit_edge52:                                    ; preds = %172, %._crit_edge48
  call void @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  call void @_ZNSt8multisetIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

.lr.ph51:                                         ; preds = %._crit_edge48, %172
  %.03649 = phi i32 [ %173, %172 ], [ 0, %._crit_edge48 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #7
  %93 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %94 unwind label %176

94:                                               ; preds = %.lr.ph51
  %95 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %93, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %96 unwind label %176

96:                                               ; preds = %94
  %97 = load i32, ptr %16, align 4, !tbaa !8
  %98 = add nsw i32 %97, -1
  store i32 %98, ptr %16, align 4, !tbaa !8
  %99 = load i32, ptr %17, align 4, !tbaa !8
  %100 = add nsw i32 %99, -1
  store i32 %100, ptr %17, align 4, !tbaa !8
  %101 = sext i32 %98 to i64
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %101) #7
  %103 = load i32, ptr %102, align 4, !tbaa !8
  %104 = load i32, ptr %17, align 4, !tbaa !8
  %105 = load i32, ptr %16, align 4, !tbaa !8
  %106 = sext i32 %105 to i64
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %106) #7
  store i32 %104, ptr %107, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #7
  %108 = sext i32 %103 to i64
  %109 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %108) #7
  call void @_ZNKSt8multisetIiSt4lessIiESaIiEE6rbeginEv(ptr dead_on_unwind nonnull writable sret(%"class.std::reverse_iterator") align 8 %19, ptr noundef nonnull align 8 dereferenceable(48) %109) #7
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorIiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19)
  %111 = load i32, ptr %110, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  store i32 %111, ptr %18, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #7
  %112 = load i32, ptr %17, align 4, !tbaa !8
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %113) #7
  %115 = call noundef zeroext i1 @_ZNKSt8multisetIiSt4lessIiESaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %114) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #7
  br i1 %115, label %122, label %116

116:                                              ; preds = %96
  %117 = load i32, ptr %17, align 4, !tbaa !8
  %118 = sext i32 %117 to i64
  %119 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %118) #7
  call void @_ZNKSt8multisetIiSt4lessIiESaIiEE6rbeginEv(ptr dead_on_unwind nonnull writable sret(%"class.std::reverse_iterator") align 8 %21, ptr noundef nonnull align 8 dereferenceable(48) %119) #7
  %120 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorIiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %21)
  %121 = load i32, ptr %120, align 4, !tbaa !8
  br label %122

122:                                              ; preds = %96, %116
  %123 = phi i32 [ %121, %116 ], [ 2147483647, %96 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #7
  store i32 %123, ptr %20, align 4, !tbaa !8
  %124 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %108) #7
  %125 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %108) #7
  %126 = load i32, ptr %16, align 4, !tbaa !8
  %127 = sext i32 %126 to i64
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %127) #7
  %129 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(48) %125, ptr noundef nonnull align 4 dereferenceable(4) %128)
          to label %130 unwind label %178

130:                                              ; preds = %122
  %131 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE(ptr noundef nonnull align 8 dereferenceable(48) %124, ptr %129)
          to label %132 unwind label %178

132:                                              ; preds = %130
  %133 = load i32, ptr %17, align 4, !tbaa !8
  %134 = sext i32 %133 to i64
  %135 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %134) #7
  %136 = load i32, ptr %16, align 4, !tbaa !8
  %137 = sext i32 %136 to i64
  %138 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %137) #7
  %139 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %135, ptr noundef nonnull align 4 dereferenceable(4) %138)
          to label %140 unwind label %178

140:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #7
  %141 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %108) #7
  %142 = call noundef zeroext i1 @_ZNKSt8multisetIiSt4lessIiESaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %141) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #7
  br i1 %142, label %147, label %143

143:                                              ; preds = %140
  %144 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %108) #7
  call void @_ZNKSt8multisetIiSt4lessIiESaIiEE6rbeginEv(ptr dead_on_unwind nonnull writable sret(%"class.std::reverse_iterator") align 8 %23, ptr noundef nonnull align 8 dereferenceable(48) %144) #7
  %145 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorIiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
  %146 = load i32, ptr %145, align 4, !tbaa !8
  br label %147

147:                                              ; preds = %140, %143
  %148 = phi i32 [ %146, %143 ], [ 2147483647, %140 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #7
  store i32 %148, ptr %22, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #7
  %149 = load i32, ptr %17, align 4, !tbaa !8
  %150 = sext i32 %149 to i64
  %151 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %150) #7
  call void @_ZNKSt8multisetIiSt4lessIiESaIiEE6rbeginEv(ptr dead_on_unwind nonnull writable sret(%"class.std::reverse_iterator") align 8 %25, ptr noundef nonnull align 8 dereferenceable(48) %151) #7
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorIiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %25)
  %153 = load i32, ptr %152, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #7
  store i32 %153, ptr %24, align 4, !tbaa !8
  %154 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %155 unwind label %180

155:                                              ; preds = %147
  %156 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr %154)
          to label %157 unwind label %180

157:                                              ; preds = %155
  %158 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %159 unwind label %180

159:                                              ; preds = %157
  %160 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr %158)
          to label %161 unwind label %180

161:                                              ; preds = %159
  %162 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %163 unwind label %180

163:                                              ; preds = %161
  %164 = invoke ptr @_ZNSt8multisetIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %165 unwind label %180

165:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #7
  %166 = call ptr @_ZNKSt8multisetIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %7) #7
  store ptr %166, ptr %26, align 8
  %167 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %26) #7
  %168 = load i32, ptr %167, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #7
  %169 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %168)
          to label %170 unwind label %182

170:                                              ; preds = %165
  %171 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %169, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %172 unwind label %182

172:                                              ; preds = %170
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  %173 = add nuw nsw i32 %.03649, 1
  %174 = load i32, ptr %2, align 4, !tbaa !8
  %175 = icmp slt i32 %173, %174
  br i1 %175, label %.lr.ph51, label %._crit_edge52, !llvm.loop !13

176:                                              ; preds = %94, %.lr.ph51
  %177 = landingpad { ptr, i32 }
          cleanup
  br label %186

178:                                              ; preds = %132, %130, %122
  %179 = landingpad { ptr, i32 }
          cleanup
  br label %185

180:                                              ; preds = %163, %161, %159, %157, %155, %147
  %181 = landingpad { ptr, i32 }
          cleanup
  br label %184

182:                                              ; preds = %170, %165
  %183 = landingpad { ptr, i32 }
          cleanup
  br label %184

184:                                              ; preds = %182, %180
  %.pn = phi { ptr, i32 } [ %183, %182 ], [ %181, %180 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #7
  br label %185

185:                                              ; preds = %184, %178
  %.pn.pn = phi { ptr, i32 } [ %.pn, %184 ], [ %179, %178 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  br label %186

186:                                              ; preds = %185, %176
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %185 ], [ %177, %176 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  br label %187

187:                                              ; preds = %186, %91, %76
  %.pn40 = phi { ptr, i32 } [ %77, %76 ], [ %92, %91 ], [ %.pn.pn.pn, %186 ]
  call void @_ZNSt6vectorISt8multisetIiSt4lessIiESaIiEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  br label %188

188:                                              ; preds = %187, %56
  %.pn40.pn = phi { ptr, i32 } [ %.pn40, %187 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  call void @_ZNSt8multisetIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  br label %189

189:                                              ; preds = %188, %54
  %.pn40.pn.pn = phi { ptr, i32 } [ %.pn40.pn, %188 ], [ %55, %54 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  br label %190

190:                                              ; preds = %189, %52
  %.pn40.pn.pn.pn = phi { ptr, i32 } [ %.pn40.pn.pn, %189 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn40.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

; 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 nounwind uwtable
declare dso_local void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt8multisetIiSt4lessIiESaIiEE6rbeginEv(ptr dead_on_unwind noalias writable sret(%"class.std::reverse_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

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

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

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

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

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

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

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

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

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

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

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass