; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/Codeforces Round #608 (Div. 2)/D. Portals (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<std::vector<long>, std::allocator<std::vector<long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<long>, std::allocator<std::vector<long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<long>, std::allocator<std::vector<long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<long>, std::allocator<std::vector<long>>>::_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<long, long, std::_Identity<long>, std::less<long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long, long, std::_Identity<long>, std::less<long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca %"class.std::vector", align 8
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca %"class.std::multiset", align 8
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %23 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %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 i64, align 8
  %28 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %29 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %30 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %31 = alloca i64, align 8
  %32 = alloca ptr, align 8
  %33 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %34 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %35 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %36 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %37 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %38 = getelementptr i8, ptr %37, i64 -24
  %39 = load i64, ptr %38, align 8
  %40 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %39
  %41 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %40, ptr noundef null)
  %42 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %43 = getelementptr i8, ptr %42, i64 -24
  %44 = load i64, ptr %43, align 8
  %45 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %44
  %46 = call noundef i64 @_ZNSt8ios_base9precisionEl(ptr noundef nonnull align 8 dereferenceable(216) %45, i64 noundef 20)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #9
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %47, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %48, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %50 = load i64, ptr %2, align 8, !tbaa !8
  %51 = call ptr @llvm.stacksave.p0()
  store ptr %51, ptr %5, align 8
  %52 = alloca i64, i64 %50, align 16
  store i64 %50, ptr %6, align 8
  %53 = load i64, ptr %2, align 8, !tbaa !8
  %54 = alloca i64, i64 %53, align 16
  store i64 %53, ptr %7, align 8
  %55 = load i64, ptr %2, align 8, !tbaa !8
  %56 = alloca i64, i64 %55, align 16
  store i64 %55, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  store i64 0, ptr %9, align 8, !tbaa !8
  br label %57

57:                                               ; preds = %72, %0
  %58 = load i64, ptr %9, align 8, !tbaa !8
  %59 = load i64, ptr %2, align 8, !tbaa !8
  %60 = icmp slt i64 %58, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  br label %75

62:                                               ; preds = %57
  %63 = load i64, ptr %9, align 8, !tbaa !8
  %64 = getelementptr inbounds i64, ptr %52, i64 %63
  %65 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %64)
  %66 = load i64, ptr %9, align 8, !tbaa !8
  %67 = getelementptr inbounds i64, ptr %54, i64 %66
  %68 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %65, ptr noundef nonnull align 8 dereferenceable(8) %67)
  %69 = load i64, ptr %9, align 8, !tbaa !8
  %70 = getelementptr inbounds i64, ptr %56, i64 %69
  %71 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %68, ptr noundef nonnull align 8 dereferenceable(8) %70)
  br label %72

72:                                               ; preds = %62
  %73 = load i64, ptr %9, align 8, !tbaa !8
  %74 = add nsw i64 %73, 1
  store i64 %74, ptr %9, align 8, !tbaa !8
  br label %57, !llvm.loop !11

75:                                               ; preds = %61
  %76 = load i64, ptr %2, align 8, !tbaa !8
  %77 = alloca i64, i64 %76, align 16
  store i64 %76, ptr %10, align 8
  %78 = load i64, ptr %2, align 8, !tbaa !8
  %79 = getelementptr inbounds i64, ptr %77, i64 %78
  call void @_ZSt4iotaIPliEvT_S1_T0_(ptr noundef %77, ptr noundef %79, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  store i64 0, ptr %11, align 8, !tbaa !8
  br label %80

80:                                               ; preds = %98, %75
  %81 = load i64, ptr %11, align 8, !tbaa !8
  %82 = load i64, ptr %3, align 8, !tbaa !8
  %83 = icmp slt i64 %81, %82
  br i1 %83, label %85, label %84

84:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  br label %101

85:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %86 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %87 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %86, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %88 = load i64, ptr %12, align 8, !tbaa !8
  %89 = add nsw i64 %88, -1
  store i64 %89, ptr %12, align 8, !tbaa !8
  %90 = load i64, ptr %13, align 8, !tbaa !8
  %91 = add nsw i64 %90, -1
  store i64 %91, ptr %13, align 8, !tbaa !8
  %92 = load i64, ptr %13, align 8, !tbaa !8
  %93 = getelementptr inbounds i64, ptr %77, i64 %92
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %95 = load i64, ptr %94, align 8, !tbaa !8
  %96 = load i64, ptr %13, align 8, !tbaa !8
  %97 = getelementptr inbounds i64, ptr %77, i64 %96
  store i64 %95, ptr %97, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  br label %98

98:                                               ; preds = %85
  %99 = load i64, ptr %11, align 8, !tbaa !8
  %100 = add nsw i64 %99, 1
  store i64 %100, ptr %11, align 8, !tbaa !8
  br label %80, !llvm.loop !13

101:                                              ; preds = %84
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #9
  %102 = load i64, ptr %2, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #9
  call void @_ZNSaISt6vectorIlSaIlEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #9
  invoke void @_ZNSt6vectorIS_IlSaIlEESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %102, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %103 unwind label %109

103:                                              ; preds = %101
  call void @_ZNSt15__new_allocatorISt6vectorIlSaIlEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  store i64 0, ptr %18, align 8, !tbaa !8
  br label %104

104:                                              ; preds = %119, %103
  %105 = load i64, ptr %18, align 8, !tbaa !8
  %106 = load i64, ptr %2, align 8, !tbaa !8
  %107 = icmp slt i64 %105, %106
  br i1 %107, label %113, label %108

108:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %126

109:                                              ; preds = %101
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %16, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %17, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIlSaIlEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #9
  br label %257

113:                                              ; preds = %104
  %114 = load i64, ptr %18, align 8, !tbaa !8
  %115 = getelementptr inbounds i64, ptr %77, i64 %114
  %116 = load i64, ptr %115, align 8, !tbaa !8
  %117 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %116) #9
  invoke void @_ZNSt6vectorIlSaIlEE9push_backERKl(ptr noundef nonnull align 8 dereferenceable(24) %117, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %118 unwind label %122

118:                                              ; preds = %113
  br label %119

119:                                              ; preds = %118
  %120 = load i64, ptr %18, align 8, !tbaa !8
  %121 = add nsw i64 %120, 1
  store i64 %121, ptr %18, align 8, !tbaa !8
  br label %104, !llvm.loop !14

122:                                              ; preds = %113
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %16, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %256

126:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 48, ptr %19) #9
  call void @_ZNSt8multisetIlSt4lessIlESaIlEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  store i64 0, ptr %20, align 8, !tbaa !8
  br label %127

127:                                              ; preds = %203, %126
  %128 = load i64, ptr %20, align 8, !tbaa !8
  %129 = load i64, ptr %2, align 8, !tbaa !8
  %130 = icmp slt i64 %128, %129
  br i1 %130, label %132, label %131

131:                                              ; preds = %127
  store i32 11, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  br label %207

132:                                              ; preds = %127
  br label %133

133:                                              ; preds = %152, %132
  %134 = load i64, ptr %4, align 8, !tbaa !8
  %135 = load i64, ptr %20, align 8, !tbaa !8
  %136 = getelementptr inbounds i64, ptr %52, i64 %135
  %137 = load i64, ptr %136, align 8, !tbaa !8
  %138 = icmp slt i64 %134, %137
  br i1 %138, label %139, label %142

139:                                              ; preds = %133
  %140 = call noundef zeroext i1 @_ZNKSt8multisetIlSt4lessIlESaIlEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %19) #9
  %141 = xor i1 %140, true
  br label %142

142:                                              ; preds = %139, %133
  %143 = phi i1 [ false, %133 ], [ %141, %139 ]
  br i1 %143, label %144, label %158

144:                                              ; preds = %142
  %145 = load i64, ptr %4, align 8, !tbaa !8
  %146 = add nsw i64 %145, 1
  store i64 %146, ptr %4, align 8, !tbaa !8
  %147 = call ptr @_ZNKSt8multisetIlSt4lessIlESaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %19) #9
  %148 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %22, i32 0, i32 0
  store ptr %147, ptr %148, align 8
  %149 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %22, i32 0, i32 0
  %150 = load ptr, ptr %149, align 8
  %151 = invoke ptr @_ZNSt8multisetIlSt4lessIlESaIlEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIlE(ptr noundef nonnull align 8 dereferenceable(48) %19, ptr %150)
          to label %152 unwind label %154

152:                                              ; preds = %144
  %153 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %23, i32 0, i32 0
  store ptr %151, ptr %153, align 8
  br label %133, !llvm.loop !15

154:                                              ; preds = %166, %164, %144
  %155 = landingpad { ptr, i32 }
          cleanup
  %156 = extractvalue { ptr, i32 } %155, 0
  store ptr %156, ptr %16, align 8
  %157 = extractvalue { ptr, i32 } %155, 1
  store i32 %157, ptr %17, align 4
  br label %206

158:                                              ; preds = %142
  %159 = load i64, ptr %4, align 8, !tbaa !8
  %160 = load i64, ptr %20, align 8, !tbaa !8
  %161 = getelementptr inbounds i64, ptr %52, i64 %160
  %162 = load i64, ptr %161, align 8, !tbaa !8
  %163 = icmp slt i64 %159, %162
  br i1 %163, label %164, label %169

164:                                              ; preds = %158
  %165 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
          to label %166 unwind label %154

166:                                              ; preds = %164
  %167 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %165, ptr noundef @.str)
          to label %168 unwind label %154

168:                                              ; preds = %166
  call void @exit(i32 noundef 0) #10
  unreachable

169:                                              ; preds = %158
  %170 = load i64, ptr %20, align 8, !tbaa !8
  %171 = getelementptr inbounds i64, ptr %54, i64 %170
  %172 = load i64, ptr %171, align 8, !tbaa !8
  %173 = load i64, ptr %4, align 8, !tbaa !8
  %174 = add nsw i64 %173, %172
  store i64 %174, ptr %4, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  %175 = load i64, ptr %20, align 8, !tbaa !8
  %176 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %175) #9
  store ptr %176, ptr %24, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  %177 = load ptr, ptr %24, align 8, !tbaa !16
  %178 = call ptr @_ZNSt6vectorIlSaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %177) #9
  %179 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %178, ptr %179, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %180 = load ptr, ptr %24, align 8, !tbaa !16
  %181 = call ptr @_ZNSt6vectorIlSaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %180) #9
  %182 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %181, ptr %182, align 8
  br label %183

183:                                              ; preds = %196, %169
  %184 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPlSt6vectorIlSaIlEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #9
  br i1 %184, label %186, label %185

185:                                              ; preds = %183
  store i32 16, ptr %21, 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 %202

186:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  %187 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPlSt6vectorIlSaIlEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #9
  %188 = load i64, ptr %187, align 8, !tbaa !8
  store i64 %188, ptr %27, align 8, !tbaa !8
  %189 = load i64, ptr %4, align 8, !tbaa !8
  %190 = add nsw i64 %189, -1
  store i64 %190, ptr %4, align 8, !tbaa !8
  %191 = load i64, ptr %27, align 8, !tbaa !8
  %192 = getelementptr inbounds i64, ptr %56, i64 %191
  %193 = invoke ptr @_ZNSt8multisetIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %19, ptr noundef nonnull align 8 dereferenceable(8) %192)
          to label %194 unwind label %198

194:                                              ; preds = %186
  %195 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %28, i32 0, i32 0
  store ptr %193, ptr %195, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  br label %196

196:                                              ; preds = %194
  %197 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPlSt6vectorIlSaIlEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #9
  br label %183

198:                                              ; preds = %186
  %199 = landingpad { ptr, i32 }
          cleanup
  %200 = extractvalue { ptr, i32 } %199, 0
  store ptr %200, ptr %16, align 8
  %201 = extractvalue { ptr, i32 } %199, 1
  store i32 %201, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, 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 %206

202:                                              ; preds = %185
  br label %203

203:                                              ; preds = %202
  %204 = load i64, ptr %20, align 8, !tbaa !8
  %205 = add nsw i64 %204, 1
  store i64 %205, ptr %20, align 8, !tbaa !8
  br label %127, !llvm.loop !18

206:                                              ; preds = %198, %154
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  br label %255

207:                                              ; preds = %131
  br label %208

208:                                              ; preds = %217, %207
  %209 = load i64, ptr %4, align 8, !tbaa !8
  %210 = icmp slt i64 %209, 0
  br i1 %210, label %211, label %225

211:                                              ; preds = %208
  %212 = call ptr @_ZNKSt8multisetIlSt4lessIlESaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %19) #9
  %213 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %29, i32 0, i32 0
  store ptr %212, ptr %213, align 8
  %214 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %29, i32 0, i32 0
  %215 = load ptr, ptr %214, align 8
  %216 = invoke ptr @_ZNSt8multisetIlSt4lessIlESaIlEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIlE(ptr noundef nonnull align 8 dereferenceable(48) %19, ptr %215)
          to label %217 unwind label %221

217:                                              ; preds = %211
  %218 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %30, i32 0, i32 0
  store ptr %216, ptr %218, align 8
  %219 = load i64, ptr %4, align 8, !tbaa !8
  %220 = add nsw i64 %219, 1
  store i64 %220, ptr %4, align 8, !tbaa !8
  br label %208, !llvm.loop !19

221:                                              ; preds = %211
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %16, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %17, align 4
  br label %255

225:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #9
  store i64 0, ptr %31, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #9
  store ptr %19, ptr %32, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #9
  %226 = load ptr, ptr %32, align 8, !tbaa !16
  %227 = call ptr @_ZNKSt8multisetIlSt4lessIlESaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %226) #9
  %228 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %33, i32 0, i32 0
  store ptr %227, ptr %228, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #9
  %229 = load ptr, ptr %32, align 8, !tbaa !16
  %230 = call ptr @_ZNKSt8multisetIlSt4lessIlESaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %229) #9
  %231 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %34, i32 0, i32 0
  store ptr %230, ptr %231, align 8
  br label %232

232:                                              ; preds = %241, %225
  %233 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIlES2_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %34) #9
  br i1 %233, label %235, label %234

234:                                              ; preds = %232
  store i32 20, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  br label %243

235:                                              ; preds = %232
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #9
  %236 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIlEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #9
  %237 = load i64, ptr %236, align 8, !tbaa !8
  store i64 %237, ptr %35, align 8, !tbaa !8
  %238 = load i64, ptr %35, align 8, !tbaa !8
  %239 = load i64, ptr %31, align 8, !tbaa !8
  %240 = add nsw i64 %239, %238
  store i64 %240, ptr %31, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #9
  br label %241

241:                                              ; preds = %235
  %242 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIlEppEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #9
  br label %232

243:                                              ; preds = %234
  %244 = load i64, ptr %31, align 8, !tbaa !8
  %245 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %244)
          to label %246 unwind label %251

246:                                              ; preds = %243
  %247 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %245, ptr noundef @.str)
          to label %248 unwind label %251

248:                                              ; preds = %246
  store i32 0, ptr %1, align 4
  store i32 1, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  call void @_ZNSt8multisetIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr %19) #9
  call void @_ZNSt6vectorIS_IlSaIlEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #9
  %249 = load ptr, ptr %5, align 8
  call void @llvm.stackrestore.p0(ptr %249)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #9
  %250 = load i32, ptr %1, align 4
  ret i32 %250

251:                                              ; preds = %246, %243
  %252 = landingpad { ptr, i32 }
          cleanup
  %253 = extractvalue { ptr, i32 } %252, 0
  store ptr %253, ptr %16, align 8
  %254 = extractvalue { ptr, i32 } %252, 1
  store i32 %254, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  br label %255

255:                                              ; preds = %251, %221, %206
  call void @_ZNSt8multisetIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr %19) #9
  br label %256

256:                                              ; preds = %255, %122
  call void @_ZNSt6vectorIS_IlSaIlEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #9
  br label %257

257:                                              ; preds = %256, %109
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #9
  br label %258

258:                                              ; preds = %257
  %259 = load ptr, ptr %16, align 8
  %260 = load i32, ptr %17, align 4
  %261 = insertvalue { ptr, i32 } poison, ptr %259, 0
  %262 = insertvalue { ptr, i32 } %261, i32 %260, 1
  resume { ptr, i32 } %262
}

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: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt8ios_base9precisionEl(ptr noundef nonnull align 8 dereferenceable(216), i64 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

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

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

; Function Attrs: 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 @_ZSt4iotaIPliEvT_S1_T0_(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #7

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #8

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt6vectorIlSaIlEEED2Ev(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 = { nocallback nofree nosync nounwind willreturn }
attributes #6 = { 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 #7 = { 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 #8 = { noreturn nounwind "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 }
attributes #10 = { noreturn 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 = !{!"long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = !{!17, !17, i64 0}
!17 = !{!"any pointer", !10, i64 0}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !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<std::vector<long>, std::allocator<std::vector<long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<long>, std::allocator<std::vector<long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<long>, std::allocator<std::vector<long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<long>, std::allocator<std::vector<long>>>::_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<long, long, std::_Identity<long>, std::less<long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long, long, std::_Identity<long>, std::less<long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"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
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca i64, align 8
  %9 = alloca %"class.std::multiset", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %13 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %14 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %15 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %17
  %19 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %18, ptr noundef null)
  %20 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %21 = getelementptr i8, ptr %20, i64 -24
  %22 = load i64, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %22
  %24 = tail call noundef i64 @_ZNSt8ios_base9precisionEl(ptr noundef nonnull align 8 dereferenceable(216) %23, i64 noundef 20)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %28 = load i64, ptr %1, align 8, !tbaa !8
  %29 = call ptr @llvm.stacksave.p0()
  %30 = alloca i64, i64 %28, align 16
  %31 = load i64, ptr %1, align 8, !tbaa !8
  %32 = alloca i64, i64 %31, align 16
  %33 = alloca i64, i64 %31, align 16
  %34 = icmp sgt i64 %31, 0
  br i1 %34, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.lcssa45 = phi i64 [ %31, %0 ], [ %46, %.lr.ph ]
  %35 = alloca i64, i64 %.lcssa45, align 16
  %36 = getelementptr inbounds i64, ptr %35, i64 %.lcssa45
  call void @_ZSt4iotaIPliEvT_S1_T0_(ptr noundef nonnull %35, ptr noundef nonnull %36, i32 noundef 0)
  %37 = load i64, ptr %2, align 8, !tbaa !8
  %38 = icmp sgt i64 %37, 0
  br i1 %38, label %.lr.ph49, label %._crit_edge50

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.046 = phi i64 [ %45, %.lr.ph ], [ 0, %0 ]
  %39 = getelementptr inbounds i64, ptr %30, i64 %.046
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %39)
  %41 = getelementptr inbounds i64, ptr %32, i64 %.046
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 8 dereferenceable(8) %41)
  %43 = getelementptr inbounds i64, ptr %33, i64 %.046
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %42, ptr noundef nonnull align 8 dereferenceable(8) %43)
  %45 = add nuw nsw i64 %.046, 1
  %46 = load i64, ptr %1, align 8, !tbaa !8
  %47 = icmp slt i64 %45, %46
  br i1 %47, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge50:                                    ; preds = %.lr.ph49, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #9
  %48 = load i64, ptr %1, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #9
  call void @_ZNSaISt6vectorIlSaIlEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  invoke void @_ZNSt6vectorIS_IlSaIlEESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %48, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %63 unwind label %68

.lr.ph49:                                         ; preds = %._crit_edge, %.lr.ph49
  %.02947 = phi i64 [ %60, %.lr.ph49 ], [ 0, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %49, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %51 = load i64, ptr %4, align 8, !tbaa !8
  %52 = add nsw i64 %51, -1
  store i64 %52, ptr %4, align 8, !tbaa !8
  %53 = load i64, ptr %5, align 8, !tbaa !8
  %54 = add nsw i64 %53, -1
  store i64 %54, ptr %5, align 8, !tbaa !8
  %55 = getelementptr inbounds i64, ptr %35, i64 %54
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %57 = load i64, ptr %56, align 8, !tbaa !8
  %58 = load i64, ptr %5, align 8, !tbaa !8
  %59 = getelementptr inbounds i64, ptr %35, i64 %58
  store i64 %57, ptr %59, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  %60 = add nuw nsw i64 %.02947, 1
  %61 = load i64, ptr %2, align 8, !tbaa !8
  %62 = icmp slt i64 %60, %61
  br i1 %62, label %.lr.ph49, label %._crit_edge50, !llvm.loop !13

63:                                               ; preds = %._crit_edge50
  call void @_ZNSt15__new_allocatorISt6vectorIlSaIlEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  store i64 0, ptr %8, align 8, !tbaa !8
  %64 = load i64, ptr %1, align 8, !tbaa !8
  %65 = icmp sgt i64 %64, 0
  br i1 %65, label %.lr.ph53, label %._crit_edge54

._crit_edge54:                                    ; preds = %73, %63
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %9) #9
  call void @_ZNSt8multisetIlSt4lessIlESaIlEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #9
  %66 = load i64, ptr %1, align 8, !tbaa !8
  %67 = icmp sgt i64 %66, 0
  br i1 %67, label %.preheader, label %thread-pre-split

68:                                               ; preds = %._crit_edge50
  %69 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIlSaIlEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #9
  br label %146

.lr.ph53:                                         ; preds = %63, %73
  %storemerge51 = phi i64 [ %75, %73 ], [ 0, %63 ]
  %70 = getelementptr inbounds i64, ptr %35, i64 %storemerge51
  %71 = load i64, ptr %70, align 8, !tbaa !8
  %72 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %71) #9
  invoke void @_ZNSt6vectorIlSaIlEE9push_backERKl(ptr noundef nonnull align 8 dereferenceable(24) %72, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %73 unwind label %78

73:                                               ; preds = %.lr.ph53
  %74 = load i64, ptr %8, align 8, !tbaa !8
  %75 = add nsw i64 %74, 1
  store i64 %75, ptr %8, align 8, !tbaa !8
  %76 = load i64, ptr %1, align 8, !tbaa !8
  %77 = icmp slt i64 %75, %76
  br i1 %77, label %.lr.ph53, label %._crit_edge54, !llvm.loop !14

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

.preheader:                                       ; preds = %._crit_edge54, %._crit_edge57
  %.03558 = phi i64 [ %107, %._crit_edge57 ], [ 0, %._crit_edge54 ]
  %80 = getelementptr inbounds i64, ptr %30, i64 %.03558
  br label %81

81:                                               ; preds = %.preheader, %87
  %82 = load i64, ptr %3, align 8, !tbaa !8
  %83 = load i64, ptr %80, align 8, !tbaa !8
  %84 = icmp slt i64 %82, %83
  br i1 %84, label %85, label %.critedge

85:                                               ; preds = %81
  %86 = call noundef zeroext i1 @_ZNKSt8multisetIlSt4lessIlESaIlEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #9
  %.pre = load i64, ptr %3, align 8, !tbaa !8
  br i1 %86, label %..critedge_crit_edge, label %87

..critedge_crit_edge:                             ; preds = %85
  %.pre67 = load i64, ptr %80, align 8, !tbaa !8
  br label %.critedge

87:                                               ; preds = %85
  %88 = add nsw i64 %.pre, 1
  store i64 %88, ptr %3, align 8, !tbaa !8
  %89 = call ptr @_ZNKSt8multisetIlSt4lessIlESaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #9
  %90 = invoke ptr @_ZNSt8multisetIlSt4lessIlESaIlEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIlE(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr %89)
          to label %81 unwind label %.loopexit, !llvm.loop !15

.loopexit:                                        ; preds = %87
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %144

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

.critedge:                                        ; preds = %81, %..critedge_crit_edge
  %91 = phi i64 [ %.pre67, %..critedge_crit_edge ], [ %83, %81 ]
  %92 = phi i64 [ %.pre, %..critedge_crit_edge ], [ %82, %81 ]
  %93 = icmp slt i64 %92, %91
  br i1 %93, label %94, label %99

94:                                               ; preds = %.critedge
  %95 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
          to label %96 unwind label %.loopexit.split-lp

96:                                               ; preds = %94
  %97 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %95, ptr noundef nonnull @.str)
          to label %98 unwind label %.loopexit.split-lp

98:                                               ; preds = %96
  call void @exit(i32 noundef 0) #10
  unreachable

99:                                               ; preds = %.critedge
  %100 = getelementptr inbounds i64, ptr %32, i64 %.03558
  %101 = load i64, ptr %100, align 8, !tbaa !8
  %102 = add nsw i64 %101, %92
  store i64 %102, ptr %3, align 8, !tbaa !8
  %103 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IlSaIlEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.03558) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #9
  %104 = call ptr @_ZNSt6vectorIlSaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %103) #9
  store ptr %104, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #9
  %105 = call ptr @_ZNSt6vectorIlSaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %103) #9
  store ptr %105, ptr %11, align 8
  %106 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPlSt6vectorIlSaIlEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #9
  br i1 %106, label %.lr.ph56, label %._crit_edge57

._crit_edge57:                                    ; preds = %116, %99
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  %107 = add nuw nsw i64 %.03558, 1
  %108 = load i64, ptr %1, align 8, !tbaa !8
  %109 = icmp slt i64 %107, %108
  br i1 %109, label %.preheader, label %thread-pre-split, !llvm.loop !16

.lr.ph56:                                         ; preds = %99, %116
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPlSt6vectorIlSaIlEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #9
  %111 = load i64, ptr %110, align 8, !tbaa !8
  %112 = load i64, ptr %3, align 8, !tbaa !8
  %113 = add nsw i64 %112, -1
  store i64 %113, ptr %3, align 8, !tbaa !8
  %114 = getelementptr inbounds i64, ptr %33, i64 %111
  %115 = invoke ptr @_ZNSt8multisetIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(8) %114)
          to label %116 unwind label %119

116:                                              ; preds = %.lr.ph56
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPlSt6vectorIlSaIlEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #9
  %118 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPlSt6vectorIlSaIlEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #9
  br i1 %118, label %.lr.ph56, label %._crit_edge57

119:                                              ; preds = %.lr.ph56
  %120 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  br label %144

thread-pre-split:                                 ; preds = %._crit_edge57, %._crit_edge54
  %.pr = load i64, ptr %3, align 8, !tbaa !8
  %121 = icmp slt i64 %.pr, 0
  br i1 %121, label %.lr.ph59, label %._crit_edge60

.lr.ph59:                                         ; preds = %thread-pre-split, %124
  %122 = call ptr @_ZNKSt8multisetIlSt4lessIlESaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #9
  %123 = invoke ptr @_ZNSt8multisetIlSt4lessIlESaIlEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIlE(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr %122)
          to label %124 unwind label %128

124:                                              ; preds = %.lr.ph59
  %125 = load i64, ptr %3, align 8, !tbaa !8
  %126 = add nsw i64 %125, 1
  store i64 %126, ptr %3, align 8, !tbaa !8
  %127 = icmp slt i64 %125, -1
  br i1 %127, label %.lr.ph59, label %._crit_edge60, !llvm.loop !17

128:                                              ; preds = %.lr.ph59
  %129 = landingpad { ptr, i32 }
          cleanup
  br label %144

._crit_edge60:                                    ; preds = %124, %thread-pre-split
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #9
  %130 = call ptr @_ZNKSt8multisetIlSt4lessIlESaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #9
  store ptr %130, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #9
  %131 = call ptr @_ZNKSt8multisetIlSt4lessIlESaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #9
  store ptr %131, ptr %13, align 8
  %132 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIlES2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  br i1 %132, label %.lr.ph63, label %._crit_edge64

._crit_edge64:                                    ; preds = %.lr.ph63, %._crit_edge60
  %.028.lcssa = phi i64 [ 0, %._crit_edge60 ], [ %136, %.lr.ph63 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  %133 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.028.lcssa)
          to label %139 unwind label %142

.lr.ph63:                                         ; preds = %._crit_edge60, %.lr.ph63
  %.02861 = phi i64 [ %136, %.lr.ph63 ], [ 0, %._crit_edge60 ]
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIlEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  %135 = load i64, ptr %134, align 8, !tbaa !8
  %136 = add nsw i64 %135, %.02861
  %137 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIlEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  %138 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIlES2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  br i1 %138, label %.lr.ph63, label %._crit_edge64

139:                                              ; preds = %._crit_edge64
  %140 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %133, ptr noundef nonnull @.str)
          to label %141 unwind label %142

141:                                              ; preds = %139
  call void @_ZNSt8multisetIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #9
  call void @_ZNSt6vectorIS_IlSaIlEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #9
  call void @llvm.stackrestore.p0(ptr %29)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #9
  ret i32 0

142:                                              ; preds = %139, %._crit_edge64
  %143 = landingpad { ptr, i32 }
          cleanup
  br label %144

144:                                              ; preds = %.loopexit, %.loopexit.split-lp, %119, %142, %128
  %.pn.pn = phi { ptr, i32 } [ %129, %128 ], [ %143, %142 ], [ %120, %119 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt8multisetIlSt4lessIlESaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #9
  br label %145

145:                                              ; preds = %144, %78
  %.pn41 = phi { ptr, i32 } [ %79, %78 ], [ %.pn.pn, %144 ]
  call void @_ZNSt6vectorIS_IlSaIlEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  br label %146

146:                                              ; preds = %145, %68
  %.pn41.pn = phi { ptr, i32 } [ %.pn41, %145 ], [ %69, %68 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #9
  resume { ptr, i32 } %.pn41.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 nounwind uwtable
declare dso_local noundef i64 @_ZNSt8ios_base9precisionEl(ptr noundef nonnull align 8 dereferenceable(216), i64 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

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

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

; Function Attrs: mustprogress 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 @_ZSt4iotaIPliEvT_S1_T0_(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #7

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #8

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt6vectorIlSaIlEEED2Ev(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 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #6 = { 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 #7 = { 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 #8 = { noreturn nounwind "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 }
attributes #10 = { noreturn 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 = !{!"long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


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