; LLVM IR from DionysiosB/CodeForces :: 1300-1399 (1349A-OracAndLCM)

; 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::vector" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.0" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.std::vector.3" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = type { %"struct.std::_Vector_base<std::multiset<long long, std::greater<long long>>, std::allocator<std::multiset<long long, std::greater<long long>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::multiset<long long, std::greater<long long>>, std::allocator<std::multiset<long long, std::greater<long long>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::multiset<long long, std::greater<long long>>, std::allocator<std::multiset<long long, std::greater<long long>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::multiset<long long, std::greater<long long>>, std::allocator<std::multiset<long long, std::greater<long long>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.9" = type { i8 }
%"class.std::allocator.4" = type { i8 }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 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 %"class.std::vector", align 8
  %4 = alloca i8, align 1
  %5 = alloca %"class.std::allocator.0", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::_Bit_reference", align 8
  %9 = alloca %"struct.std::_Bit_reference", align 8
  %10 = alloca %"class.std::vector.3", align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::_Bit_reference", align 8
  %14 = alloca i64, align 8
  %15 = alloca %"struct.std::_Bit_reference", align 8
  %16 = alloca %"class.std::vector.7", align 8
  %17 = alloca %"class.std::allocator.9", align 1
  %18 = alloca %"class.std::vector.3", align 8
  %19 = alloca i64, align 8
  %20 = alloca %"class.std::allocator.4", align 1
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %27 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %28 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  %32 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  store i64 200007, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #5
  store i8 1, ptr %4, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 noundef 200007, ptr noundef nonnull align 1 dereferenceable(1) %4, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %33 unwind label %52

33:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #5
  %34 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 noundef 1)
          to label %35 unwind label %56

35:                                               ; preds = %33
  %36 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 0
  %37 = extractvalue { ptr, i64 } %34, 0
  store ptr %37, ptr %36, align 8
  %38 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 1
  %39 = extractvalue { ptr, i64 } %34, 1
  store i64 %39, ptr %38, align 8
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %8, i1 noundef zeroext false) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  %41 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 noundef 0)
          to label %42 unwind label %60

42:                                               ; preds = %35
  %43 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 0
  %44 = extractvalue { ptr, i64 } %41, 0
  store ptr %44, ptr %43, align 8
  %45 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 1
  %46 = extractvalue { ptr, i64 } %41, 1
  store i64 %46, ptr %45, align 8
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %40) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #5
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 2, ptr %11, align 8, !tbaa !5
  br label %48

48:                                               ; preds = %110, %42
  %49 = load i64, ptr %11, align 8, !tbaa !5
  %50 = icmp slt i64 %49, 200007
  br i1 %50, label %65, label %51

51:                                               ; preds = %48
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %114

52:                                               ; preds = %0
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %6, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #5
  br label %279

56:                                               ; preds = %33
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %6, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %7, align 4
  br label %64

60:                                               ; preds = %35
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %6, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  br label %64

64:                                               ; preds = %60, %56
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  br label %278

65:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  %66 = load i64, ptr %11, align 8, !tbaa !5
  %67 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 noundef %66)
          to label %68 unwind label %76

68:                                               ; preds = %65
  %69 = getelementptr inbounds { ptr, i64 }, ptr %13, i32 0, i32 0
  %70 = extractvalue { ptr, i64 } %67, 0
  store ptr %70, ptr %69, align 8
  %71 = getelementptr inbounds { ptr, i64 }, ptr %13, i32 0, i32 1
  %72 = extractvalue { ptr, i64 } %67, 1
  store i64 %72, ptr %71, align 8
  %73 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %13) #5
  %74 = xor i1 %73, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  br i1 %74, label %75, label %80

75:                                               ; preds = %68
  br label %110

76:                                               ; preds = %65
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %6, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  br label %113

80:                                               ; preds = %68
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %81 unwind label %88

81:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %82 = load i64, ptr %11, align 8, !tbaa !5
  %83 = mul nsw i64 2, %82
  store i64 %83, ptr %14, align 8, !tbaa !5
  br label %84

84:                                               ; preds = %101, %81
  %85 = load i64, ptr %14, align 8, !tbaa !5
  %86 = icmp slt i64 %85, 200007
  br i1 %86, label %92, label %87

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

88:                                               ; preds = %80
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %6, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %7, align 4
  br label %113

92:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  %93 = load i64, ptr %14, align 8, !tbaa !5
  %94 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %3, i64 noundef %93)
          to label %95 unwind label %105

95:                                               ; preds = %92
  %96 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %97 = extractvalue { ptr, i64 } %94, 0
  store ptr %97, ptr %96, align 8
  %98 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %99 = extractvalue { ptr, i64 } %94, 1
  store i64 %99, ptr %98, align 8
  %100 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %15, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  br label %101

101:                                              ; preds = %95
  %102 = load i64, ptr %11, align 8, !tbaa !5
  %103 = load i64, ptr %14, align 8, !tbaa !5
  %104 = add nsw i64 %103, %102
  store i64 %104, ptr %14, align 8, !tbaa !5
  br label %84, !llvm.loop !11

105:                                              ; preds = %92
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %6, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %113

109:                                              ; preds = %87
  br label %110

110:                                              ; preds = %109, %75
  %111 = load i64, ptr %11, align 8, !tbaa !5
  %112 = add nsw i64 %111, 1
  store i64 %112, ptr %11, align 8, !tbaa !5
  br label %48, !llvm.loop !13

113:                                              ; preds = %105, %88, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %277

114:                                              ; preds = %51
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #5
  %115 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  call void @_ZNSaISt8multisetIxSt7greaterIxESaIxEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  invoke void @_ZNSt6vectorISt8multisetIxSt7greaterIxESaIxEESaIS4_EEC2EmRKS5_(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %115, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %116 unwind label %126

116:                                              ; preds = %114
  call void @_ZNSt15__new_allocatorISt8multisetIxSt7greaterIxESaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #5
  %117 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  store i64 0, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #5
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKxRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %117, ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %118 unwind label %130

118:                                              ; preds = %116
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %119 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %21)
          to label %120 unwind label %134

120:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  store i64 0, ptr %22, align 8, !tbaa !5
  br label %121

121:                                              ; preds = %222, %120
  %122 = load i64, ptr %22, align 8, !tbaa !5
  %123 = load i64, ptr %21, align 8, !tbaa !5
  %124 = icmp slt i64 %122, %123
  br i1 %124, label %138, label %125

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

126:                                              ; preds = %114
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %6, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %7, align 4
  call void @_ZNSt15__new_allocatorISt8multisetIxSt7greaterIxESaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  br label %276

130:                                              ; preds = %116
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %6, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %275

134:                                              ; preds = %118
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %6, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %7, align 4
  br label %274

138:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %139 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %23)
          to label %140 unwind label %154

140:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  store i64 0, ptr %24, align 8, !tbaa !5
  br label %141

141:                                              ; preds = %218, %140
  %142 = load i64, ptr %24, align 8, !tbaa !5
  %143 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %144 = icmp ult i64 %142, %143
  br i1 %144, label %145, label %151

145:                                              ; preds = %141
  %146 = load i64, ptr %23, align 8, !tbaa !5
  %147 = load i64, ptr %24, align 8, !tbaa !5
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %147) #5
  %149 = load i64, ptr %148, align 8, !tbaa !5
  %150 = icmp sge i64 %146, %149
  br label %151

151:                                              ; preds = %145, %141
  %152 = phi i1 [ false, %141 ], [ %150, %145 ]
  br i1 %152, label %158, label %153

153:                                              ; preds = %151
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %221

154:                                              ; preds = %138
  %155 = landingpad { ptr, i32 }
          cleanup
  %156 = extractvalue { ptr, i32 } %155, 0
  store ptr %156, ptr %6, align 8
  %157 = extractvalue { ptr, i32 } %155, 1
  store i32 %157, ptr %7, align 4
  br label %225

158:                                              ; preds = %151
  %159 = load i64, ptr %24, align 8, !tbaa !5
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %159) #5
  %161 = load i64, ptr %160, align 8, !tbaa !5
  %162 = load i64, ptr %22, align 8, !tbaa !5
  %163 = sub nsw i64 %162, 2
  %164 = icmp sle i64 %161, %163
  br i1 %164, label %165, label %166

165:                                              ; preds = %158
  br label %218

166:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  store i64 0, ptr %25, align 8, !tbaa !5
  br label %167

167:                                              ; preds = %179, %166
  %168 = load i64, ptr %23, align 8, !tbaa !5
  %169 = icmp sgt i64 %168, 1
  br i1 %169, label %170, label %177

170:                                              ; preds = %167
  %171 = load i64, ptr %23, align 8, !tbaa !5
  %172 = load i64, ptr %24, align 8, !tbaa !5
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %172) #5
  %174 = load i64, ptr %173, align 8, !tbaa !5
  %175 = srem i64 %171, %174
  %176 = icmp eq i64 %175, 0
  br label %177

177:                                              ; preds = %170, %167
  %178 = phi i1 [ false, %167 ], [ %176, %170 ]
  br i1 %178, label %179, label %187

179:                                              ; preds = %177
  %180 = load i64, ptr %25, align 8, !tbaa !5
  %181 = add nsw i64 %180, 1
  store i64 %181, ptr %25, align 8, !tbaa !5
  %182 = load i64, ptr %24, align 8, !tbaa !5
  %183 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %182) #5
  %184 = load i64, ptr %183, align 8, !tbaa !5
  %185 = load i64, ptr %23, align 8, !tbaa !5
  %186 = sdiv i64 %185, %184
  store i64 %186, ptr %23, align 8, !tbaa !5
  br label %167, !llvm.loop !14

187:                                              ; preds = %177
  %188 = load i64, ptr %24, align 8, !tbaa !5
  %189 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIxSt7greaterIxESaIxEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %188) #5
  %190 = invoke ptr @_ZNSt8multisetIxSt7greaterIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %189, ptr noundef nonnull align 8 dereferenceable(8) %25)
          to label %191 unwind label %213

191:                                              ; preds = %187
  %192 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %26, i32 0, i32 0
  store ptr %190, ptr %192, align 8
  %193 = load i64, ptr %24, align 8, !tbaa !5
  %194 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %193) #5
  %195 = load i64, ptr %194, align 8, !tbaa !5
  %196 = add nsw i64 %195, 1
  store i64 %196, ptr %194, align 8, !tbaa !5
  %197 = load i64, ptr %24, align 8, !tbaa !5
  %198 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIxSt7greaterIxESaIxEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %197) #5
  %199 = call noundef i64 @_ZNKSt8multisetIxSt7greaterIxESaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %198) #5
  %200 = icmp ugt i64 %199, 2
  br i1 %200, label %201, label %217

201:                                              ; preds = %191
  %202 = load i64, ptr %24, align 8, !tbaa !5
  %203 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIxSt7greaterIxESaIxEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %202) #5
  %204 = load i64, ptr %24, align 8, !tbaa !5
  %205 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIxSt7greaterIxESaIxEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %204) #5
  %206 = call ptr @_ZNKSt8multisetIxSt7greaterIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %205) #5
  %207 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %27, i32 0, i32 0
  store ptr %206, ptr %207, align 8
  %208 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %27, i32 0, i32 0
  %209 = load ptr, ptr %208, align 8
  %210 = invoke ptr @_ZNSt8multisetIxSt7greaterIxESaIxEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIxE(ptr noundef nonnull align 8 dereferenceable(48) %203, ptr %209)
          to label %211 unwind label %213

211:                                              ; preds = %201
  %212 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %28, i32 0, i32 0
  store ptr %210, ptr %212, align 8
  br label %217

213:                                              ; preds = %201, %187
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %6, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %225

217:                                              ; preds = %211, %191
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  br label %218

218:                                              ; preds = %217, %165
  %219 = load i64, ptr %24, align 8, !tbaa !5
  %220 = add nsw i64 %219, 1
  store i64 %220, ptr %24, align 8, !tbaa !5
  br label %141, !llvm.loop !15

221:                                              ; preds = %153
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %222

222:                                              ; preds = %221
  %223 = load i64, ptr %22, align 8, !tbaa !5
  %224 = add nsw i64 %223, 1
  store i64 %224, ptr %22, align 8, !tbaa !5
  br label %121, !llvm.loop !16

225:                                              ; preds = %213, %154
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %274

226:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  store i64 1, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  store i64 0, ptr %30, align 8, !tbaa !5
  br label %227

227:                                              ; preds = %262, %226
  %228 = load i64, ptr %30, align 8, !tbaa !5
  %229 = load i64, ptr %21, align 8, !tbaa !5
  %230 = icmp slt i64 %228, %229
  br i1 %230, label %232, label %231

231:                                              ; preds = %227
  store i32 16, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  br label %265

232:                                              ; preds = %227
  %233 = load i64, ptr %30, align 8, !tbaa !5
  %234 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIxSt7greaterIxESaIxEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %233) #5
  %235 = call noundef zeroext i1 @_ZNKSt8multisetIxSt7greaterIxESaIxEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %234) #5
  br i1 %235, label %243, label %236

236:                                              ; preds = %232
  %237 = load i64, ptr %30, align 8, !tbaa !5
  %238 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %237) #5
  %239 = load i64, ptr %238, align 8, !tbaa !5
  %240 = load i64, ptr %21, align 8, !tbaa !5
  %241 = sub nsw i64 %240, 1
  %242 = icmp slt i64 %239, %241
  br i1 %242, label %243, label %244

243:                                              ; preds = %236, %232
  br label %262

244:                                              ; preds = %236
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  %245 = load i64, ptr %30, align 8, !tbaa !5
  %246 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIxSt7greaterIxESaIxEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %245) #5
  %247 = call ptr @_ZNKSt8multisetIxSt7greaterIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %246) #5
  %248 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %32, i32 0, i32 0
  store ptr %247, ptr %248, align 8
  %249 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #5
  %250 = load i64, ptr %249, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  store i64 %250, ptr %31, align 8, !tbaa !5
  br label %251

251:                                              ; preds = %255, %244
  %252 = load i64, ptr %31, align 8, !tbaa !5
  %253 = add nsw i64 %252, -1
  store i64 %253, ptr %31, align 8, !tbaa !5
  %254 = icmp ne i64 %252, 0
  br i1 %254, label %255, label %261

255:                                              ; preds = %251
  %256 = load i64, ptr %30, align 8, !tbaa !5
  %257 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %256) #5
  %258 = load i64, ptr %257, align 8, !tbaa !5
  %259 = load i64, ptr %29, align 8, !tbaa !5
  %260 = mul nsw i64 %259, %258
  store i64 %260, ptr %29, align 8, !tbaa !5
  br label %251, !llvm.loop !17

261:                                              ; preds = %251
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  br label %262

262:                                              ; preds = %261, %243
  %263 = load i64, ptr %30, align 8, !tbaa !5
  %264 = add nsw i64 %263, 1
  store i64 %264, ptr %30, align 8, !tbaa !5
  br label %227, !llvm.loop !18

265:                                              ; preds = %231
  %266 = load i64, ptr %29, align 8, !tbaa !5
  %267 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %266)
          to label %268 unwind label %270

268:                                              ; preds = %265
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #5
  call void @_ZNSt6vectorISt8multisetIxSt7greaterIxESaIxEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %269 = load i32, ptr %1, align 4
  ret i32 %269

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

274:                                              ; preds = %270, %225, %134
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  br label %275

275:                                              ; preds = %274, %130
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #5
  call void @_ZNSt6vectorISt8multisetIxSt7greaterIxESaIxEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #5
  br label %276

276:                                              ; preds = %275, %126
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #5
  br label %277

277:                                              ; preds = %276, %113
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  br label %278

278:                                              ; preds = %277, %64
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #5
  br label %279

279:                                              ; preds = %278, %52
  call void @llvm.lifetime.end.p0(i64 40, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  br label %280

280:                                              ; preds = %279
  %281 = load ptr, ptr %6, align 8
  %282 = load i32, ptr %7, align 4
  %283 = insertvalue { ptr, i32 } poison, ptr %281, 0
  %284 = insertvalue { ptr, i32 } %283, i32 %282, 1
  resume { ptr, i32 } %284
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #3 align 2

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

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

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

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

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

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

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

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

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

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #4

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

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

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

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

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

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

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

declare i32 @printf(ptr noundef, ...) #4

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt8multisetIxSt7greaterIxESaIxEEED2Ev(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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 #4 = { "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 = { 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !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}
!18 = distinct !{!18, !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::vector" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.0" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.std::vector.3" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = type { %"struct.std::_Vector_base<std::multiset<long long, std::greater<long long>>, std::allocator<std::multiset<long long, std::greater<long long>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::multiset<long long, std::greater<long long>>, std::allocator<std::multiset<long long, std::greater<long long>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::multiset<long long, std::greater<long long>>, std::allocator<std::multiset<long long, std::greater<long long>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::multiset<long long, std::greater<long long>>, std::allocator<std::multiset<long long, std::greater<long long>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.9" = type { i8 }
%"class.std::allocator.4" = type { i8 }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 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 %"class.std::vector", align 8
  %2 = alloca i8, align 1
  %3 = alloca %"class.std::allocator.0", align 1
  %4 = alloca %"struct.std::_Bit_reference", align 8
  %5 = alloca %"struct.std::_Bit_reference", align 8
  %6 = alloca %"class.std::vector.3", align 8
  %7 = alloca i64, align 8
  %8 = alloca %"struct.std::_Bit_reference", align 8
  %9 = alloca %"struct.std::_Bit_reference", align 8
  %10 = alloca %"class.std::vector.7", align 8
  %11 = alloca %"class.std::allocator.9", align 1
  %12 = alloca %"class.std::vector.3", align 8
  %13 = alloca i64, align 8
  %14 = alloca %"class.std::allocator.4", align 1
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #5
  store i8 1, ptr %2, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef 200007, ptr noundef nonnull align 1 dereferenceable(1) %2, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %19 unwind label %36

19:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  %20 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef 1)
          to label %21 unwind label %38

21:                                               ; preds = %19
  %22 = extractvalue { ptr, i64 } %20, 0
  store ptr %22, ptr %4, align 8
  %23 = getelementptr inbounds i8, ptr %4, i64 8
  %24 = extractvalue { ptr, i64 } %20, 1
  store i64 %24, ptr %23, align 8
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %4, i1 noundef zeroext false) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %26 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef 0)
          to label %27 unwind label %40

27:                                               ; preds = %21
  %28 = extractvalue { ptr, i64 } %26, 0
  store ptr %28, ptr %5, align 8
  %29 = getelementptr inbounds i8, ptr %5, i64 8
  %30 = extractvalue { ptr, i64 } %26, 1
  store i64 %30, ptr %29, align 8
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %25) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  store i64 2, ptr %7, align 8, !tbaa !9
  %32 = getelementptr inbounds i8, ptr %8, i64 8
  %33 = getelementptr inbounds i8, ptr %9, i64 8
  br label %43

34:                                               ; preds = %.loopexit59
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #5
  %35 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #5
  call void @_ZNSaISt8multisetIxSt7greaterIxESaIxEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  invoke void @_ZNSt6vectorISt8multisetIxSt7greaterIxESaIxEESaIS4_EEC2EmRKS5_(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %35, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %72 unwind label %79

36:                                               ; preds = %0
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  br label %157

38:                                               ; preds = %19
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %42

40:                                               ; preds = %21
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %42

42:                                               ; preds = %40, %38
  %.pn = phi { ptr, i32 } [ %41, %40 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %156

43:                                               ; preds = %27, %.loopexit59
  %storemerge61 = phi i64 [ 2, %27 ], [ %69, %.loopexit59 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  %44 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef %storemerge61)
          to label %45 unwind label %49

45:                                               ; preds = %43
  %46 = extractvalue { ptr, i64 } %44, 0
  store ptr %46, ptr %8, align 8
  %47 = extractvalue { ptr, i64 } %44, 1
  store i64 %47, ptr %32, align 8
  %48 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  br i1 %48, label %51, label %..loopexit59_crit_edge

..loopexit59_crit_edge:                           ; preds = %45
  %.pre = load i64, ptr %7, align 8, !tbaa !9
  br label %.loopexit59

49:                                               ; preds = %43
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  br label %71

51:                                               ; preds = %45
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %52 unwind label %56

52:                                               ; preds = %51
  %53 = load i64, ptr %7, align 8, !tbaa !9
  %54 = icmp slt i64 %53, 100004
  br i1 %54, label %.lr.ph.preheader, label %.loopexit59

.lr.ph.preheader:                                 ; preds = %52
  %55 = shl nsw i64 %53, 1
  br label %.lr.ph

56:                                               ; preds = %51
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %71

.lr.ph:                                           ; preds = %.lr.ph.preheader, %59
  %.04660 = phi i64 [ %64, %59 ], [ %55, %.lr.ph.preheader ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  %58 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef %.04660)
          to label %59 unwind label %66

59:                                               ; preds = %.lr.ph
  %60 = extractvalue { ptr, i64 } %58, 0
  store ptr %60, ptr %9, align 8
  %61 = extractvalue { ptr, i64 } %58, 1
  store i64 %61, ptr %33, align 8
  %62 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %9, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  %63 = load i64, ptr %7, align 8, !tbaa !9
  %64 = add nsw i64 %63, %.04660
  %65 = icmp slt i64 %64, 200007
  br i1 %65, label %.lr.ph, label %.loopexit59, !llvm.loop !11

66:                                               ; preds = %.lr.ph
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  br label %71

.loopexit59:                                      ; preds = %59, %..loopexit59_crit_edge, %52
  %68 = phi i64 [ %.pre, %..loopexit59_crit_edge ], [ %53, %52 ], [ %63, %59 ]
  %69 = add nsw i64 %68, 1
  store i64 %69, ptr %7, align 8, !tbaa !9
  %70 = icmp slt i64 %68, 200006
  br i1 %70, label %43, label %34, !llvm.loop !13

71:                                               ; preds = %66, %56, %49
  %.pn54 = phi { ptr, i32 } [ %67, %66 ], [ %57, %56 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %155

72:                                               ; preds = %34
  call void @_ZNSt15__new_allocatorISt8multisetIxSt7greaterIxESaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #5
  %73 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #5
  store i64 0, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #5
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKxRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %73, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %74 unwind label %81

74:                                               ; preds = %72
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #5
  %75 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %15)
  %76 = load i64, ptr %15, align 8, !tbaa !9
  %77 = icmp sgt i64 %76, 0
  br i1 %77, label %.lr.ph68, label %._crit_edge

.preheader:                                       ; preds = %.critedge
  %78 = icmp sgt i64 %91, 0
  br i1 %78, label %.lr.ph75, label %._crit_edge

79:                                               ; preds = %34
  %80 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt8multisetIxSt7greaterIxESaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  br label %154

81:                                               ; preds = %72
  %82 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  br label %153

.lr.ph68:                                         ; preds = %74, %.critedge
  %.04567 = phi i64 [ %90, %.critedge ], [ 0, %74 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #5
  %83 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %16)
  %84 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  %.not77 = icmp eq i64 %84, 0
  br i1 %.not77, label %.critedge, label %.lr.ph65

.lr.ph65:                                         ; preds = %.lr.ph68
  %85 = add nsw i64 %.04567, -2
  br label %86

86:                                               ; preds = %.lr.ph65, %128
  %.04464 = phi i64 [ 0, %.lr.ph65 ], [ %129, %128 ]
  %87 = load i64, ptr %16, align 8, !tbaa !9
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.04464) #5
  %89 = load i64, ptr %88, align 8, !tbaa !9
  %.not49 = icmp slt i64 %87, %89
  br i1 %.not49, label %.critedge, label %93

.critedge:                                        ; preds = %86, %128, %.lr.ph68
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #5
  %90 = add nuw nsw i64 %.04567, 1
  %91 = load i64, ptr %15, align 8, !tbaa !9
  %92 = icmp slt i64 %90, %91
  br i1 %92, label %.lr.ph68, label %.preheader, !llvm.loop !14

93:                                               ; preds = %86
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %.04464) #5
  %95 = load i64, ptr %94, align 8, !tbaa !9
  %.not50 = icmp sgt i64 %95, %85
  br i1 %.not50, label %96, label %128

96:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #5
  store i64 0, ptr %17, align 8, !tbaa !9
  %.pr = load i64, ptr %16, align 8, !tbaa !9
  %97 = icmp sgt i64 %.pr, 1
  br i1 %97, label %.lr.ph62, label %.critedge2

.lr.ph62:                                         ; preds = %96, %103
  %98 = phi i64 [ %109, %103 ], [ %.pr, %96 ]
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.04464) #5
  %100 = load i64, ptr %99, align 8, !tbaa !9
  %101 = srem i64 %98, %100
  %102 = icmp eq i64 %101, 0
  br i1 %102, label %103, label %.critedge2

103:                                              ; preds = %.lr.ph62
  %104 = load i64, ptr %17, align 8, !tbaa !9
  %105 = add nsw i64 %104, 1
  store i64 %105, ptr %17, align 8, !tbaa !9
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.04464) #5
  %107 = load i64, ptr %106, align 8, !tbaa !9
  %108 = load i64, ptr %16, align 8, !tbaa !9
  %109 = sdiv i64 %108, %107
  store i64 %109, ptr %16, align 8, !tbaa !9
  %110 = icmp sgt i64 %109, 1
  br i1 %110, label %.lr.ph62, label %.critedge2, !llvm.loop !15

.critedge2:                                       ; preds = %.lr.ph62, %103, %96
  %111 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIxSt7greaterIxESaIxEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.04464) #5
  %112 = invoke ptr @_ZNSt8multisetIxSt7greaterIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %111, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %113 unwind label %125

113:                                              ; preds = %.critedge2
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %.04464) #5
  %115 = load i64, ptr %114, align 8, !tbaa !9
  %116 = add nsw i64 %115, 1
  store i64 %116, ptr %114, align 8, !tbaa !9
  %117 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIxSt7greaterIxESaIxEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.04464) #5
  %118 = call noundef i64 @_ZNKSt8multisetIxSt7greaterIxESaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %117) #5
  %119 = icmp ugt i64 %118, 2
  br i1 %119, label %120, label %127

120:                                              ; preds = %113
  %121 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIxSt7greaterIxESaIxEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.04464) #5
  %122 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIxSt7greaterIxESaIxEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.04464) #5
  %123 = call ptr @_ZNKSt8multisetIxSt7greaterIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %122) #5
  %124 = invoke ptr @_ZNSt8multisetIxSt7greaterIxESaIxEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIxE(ptr noundef nonnull align 8 dereferenceable(48) %121, ptr %123)
          to label %127 unwind label %125

125:                                              ; preds = %120, %.critedge2
  %126 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  br label %153

127:                                              ; preds = %120, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #5
  br label %128

128:                                              ; preds = %93, %127
  %129 = add nuw nsw i64 %.04464, 1
  %130 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  %131 = icmp ult i64 %129, %130
  br i1 %131, label %86, label %.critedge, !llvm.loop !16

._crit_edge:                                      ; preds = %.loopexit, %74, %.preheader
  %.033.lcssa = phi i64 [ 1, %.preheader ], [ 1, %74 ], [ %.2, %.loopexit ]
  %132 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %.033.lcssa)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #5
  call void @_ZNSt6vectorISt8multisetIxSt7greaterIxESaIxEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #5
  ret i32 0

.lr.ph75:                                         ; preds = %.preheader, %.loopexit
  %.03274 = phi i64 [ %150, %.loopexit ], [ 0, %.preheader ]
  %.03373 = phi i64 [ %.2, %.loopexit ], [ 1, %.preheader ]
  %133 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIxSt7greaterIxESaIxEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.03274) #5
  %134 = call noundef zeroext i1 @_ZNKSt8multisetIxSt7greaterIxESaIxEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(48) %133) #5
  br i1 %134, label %.loopexit, label %135

135:                                              ; preds = %.lr.ph75
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %.03274) #5
  %137 = load i64, ptr %136, align 8, !tbaa !9
  %138 = load i64, ptr %15, align 8, !tbaa !9
  %139 = add nsw i64 %138, -1
  %140 = icmp slt i64 %137, %139
  br i1 %140, label %.loopexit, label %141

141:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #5
  %142 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt8multisetIxSt7greaterIxESaIxEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.03274) #5
  %143 = call ptr @_ZNKSt8multisetIxSt7greaterIxESaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %142) #5
  store ptr %143, ptr %18, align 8
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  %145 = load i64, ptr %144, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #5
  %.not69 = icmp eq i64 %145, 0
  br i1 %.not69, label %.loopexit, label %.lr.ph72

.lr.ph72:                                         ; preds = %141, %.lr.ph72
  %.071 = phi i64 [ %146, %.lr.ph72 ], [ %145, %141 ]
  %.170 = phi i64 [ %149, %.lr.ph72 ], [ %.03373, %141 ]
  %146 = add nsw i64 %.071, -1
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.03274) #5
  %148 = load i64, ptr %147, align 8, !tbaa !9
  %149 = mul nsw i64 %148, %.170
  %.not = icmp eq i64 %146, 0
  br i1 %.not, label %.loopexit, label %.lr.ph72, !llvm.loop !17

.loopexit:                                        ; preds = %.lr.ph72, %141, %.lr.ph75, %135
  %.2 = phi i64 [ %.03373, %.lr.ph75 ], [ %.03373, %135 ], [ %.03373, %141 ], [ %149, %.lr.ph72 ]
  %150 = add nuw nsw i64 %.03274, 1
  %151 = load i64, ptr %15, align 8, !tbaa !9
  %152 = icmp slt i64 %150, %151
  br i1 %152, label %.lr.ph75, label %._crit_edge, !llvm.loop !18

153:                                              ; preds = %125, %81
  %.pn51 = phi { ptr, i32 } [ %126, %125 ], [ %82, %81 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #5
  call void @_ZNSt6vectorISt8multisetIxSt7greaterIxESaIxEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  br label %154

154:                                              ; preds = %153, %79
  %.pn51.pn = phi { ptr, i32 } [ %.pn51, %153 ], [ %80, %79 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  br label %155

155:                                              ; preds = %154, %71
  %.pn54.pn = phi { ptr, i32 } [ %.pn54, %71 ], [ %.pn51.pn, %154 ]
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  br label %156

156:                                              ; preds = %155, %42
  %.pn54.pn.pn = phi { ptr, i32 } [ %.pn54.pn, %155 ], [ %.pn, %42 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) #5
  br label %157

157:                                              ; preds = %156, %36
  %.pn54.pn.pn.pn = phi { ptr, i32 } [ %.pn54.pn.pn, %156 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn54.pn.pn.pn
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #3 align 2

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

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

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

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

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt8multisetIxSt7greaterIxESaIxEEED2Ev(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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 #4 = { nofree 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 #5 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !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}
!18 = distinct !{!18, !12}


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