; LLVM IR from eyangch/competitive-programming :: Codeforces/1323 (b)

; 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::multiset" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long 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.std::vector" = 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.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #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 %"class.std::multiset", align 8
  %9 = alloca %"class.std::multiset", align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %15 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %18 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %19 = alloca %"class.std::vector", align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca ptr, align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %28 = alloca i64, align 8
  %29 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %30 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %31 = alloca i32, align 4
  %32 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %33 = alloca i64, align 8
  %34 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %35 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %36 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %37 = alloca i64, align 8
  %38 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %39 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %40 = alloca i32, align 4
  %41 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %42 = alloca i64, align 8
  %43 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %44 = 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) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %45, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %48 = load i64, ptr %2, align 8, !tbaa !5
  %49 = call ptr @llvm.stacksave.p0()
  store ptr %49, ptr %5, align 8
  %50 = alloca i64, i64 %48, align 16
  store i64 %48, ptr %6, align 8
  %51 = load i64, ptr %3, align 8, !tbaa !5
  %52 = alloca i64, i64 %51, align 16
  store i64 %51, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr %8) #8
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr %9) #8
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  store i64 0, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %86, %0
  %54 = load i32, ptr %11, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = load i64, ptr %2, align 8, !tbaa !5
  %57 = icmp slt i64 %55, %56
  br i1 %57, label %59, label %58

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

59:                                               ; preds = %53
  %60 = load i32, ptr %11, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds i64, ptr %50, i64 %61
  %63 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %62)
          to label %64 unwind label %73

64:                                               ; preds = %59
  %65 = load i32, ptr %11, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds i64, ptr %50, i64 %66
  %68 = load i64, ptr %67, align 8, !tbaa !5
  %69 = icmp eq i64 %68, 1
  br i1 %69, label %70, label %77

70:                                               ; preds = %64
  %71 = load i64, ptr %10, align 8, !tbaa !5
  %72 = add nsw i64 %71, 1
  store i64 %72, ptr %10, align 8, !tbaa !5
  br label %85

73:                                               ; preds = %80, %59
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %12, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %341

77:                                               ; preds = %64
  %78 = load i64, ptr %10, align 8, !tbaa !5
  %79 = icmp ne i64 %78, 0
  br i1 %79, label %80, label %84

80:                                               ; preds = %77
  %81 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %82 unwind label %73

82:                                               ; preds = %80
  %83 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %14, i32 0, i32 0
  store ptr %81, ptr %83, align 8
  store i64 0, ptr %10, align 8, !tbaa !5
  br label %84

84:                                               ; preds = %82, %77
  br label %85

85:                                               ; preds = %84, %70
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %11, align 4, !tbaa !9
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %11, align 4, !tbaa !9
  br label %53, !llvm.loop !11

89:                                               ; preds = %58
  %90 = load i64, ptr %10, align 8, !tbaa !5
  %91 = icmp ne i64 %90, 0
  br i1 %91, label %92, label %100

92:                                               ; preds = %89
  %93 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %94 unwind label %96

94:                                               ; preds = %92
  %95 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %15, i32 0, i32 0
  store ptr %93, ptr %95, align 8
  store i64 0, ptr %10, align 8, !tbaa !5
  br label %100

96:                                               ; preds = %140, %92
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %12, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %13, align 4
  br label %341

100:                                              ; preds = %94, %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %101

101:                                              ; preds = %134, %100
  %102 = load i32, ptr %16, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = load i64, ptr %3, align 8, !tbaa !5
  %105 = icmp slt i64 %103, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %137

107:                                              ; preds = %101
  %108 = load i32, ptr %16, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds i64, ptr %52, i64 %109
  %111 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %110)
          to label %112 unwind label %121

112:                                              ; preds = %107
  %113 = load i32, ptr %16, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds i64, ptr %52, i64 %114
  %116 = load i64, ptr %115, align 8, !tbaa !5
  %117 = icmp eq i64 %116, 1
  br i1 %117, label %118, label %125

118:                                              ; preds = %112
  %119 = load i64, ptr %10, align 8, !tbaa !5
  %120 = add nsw i64 %119, 1
  store i64 %120, ptr %10, align 8, !tbaa !5
  br label %133

121:                                              ; preds = %128, %107
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %12, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %341

125:                                              ; preds = %112
  %126 = load i64, ptr %10, align 8, !tbaa !5
  %127 = icmp ne i64 %126, 0
  br i1 %127, label %128, label %132

128:                                              ; preds = %125
  %129 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %130 unwind label %121

130:                                              ; preds = %128
  %131 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %17, i32 0, i32 0
  store ptr %129, ptr %131, align 8
  store i64 0, ptr %10, align 8, !tbaa !5
  br label %132

132:                                              ; preds = %130, %125
  br label %133

133:                                              ; preds = %132, %118
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %16, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %16, align 4, !tbaa !9
  br label %101, !llvm.loop !13

137:                                              ; preds = %106
  %138 = load i64, ptr %10, align 8, !tbaa !5
  %139 = icmp ne i64 %138, 0
  br i1 %139, label %140, label %144

140:                                              ; preds = %137
  %141 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %142 unwind label %96

142:                                              ; preds = %140
  %143 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %18, i32 0, i32 0
  store ptr %141, ptr %143, align 8
  store i64 0, ptr %10, align 8, !tbaa !5
  br label %144

144:                                              ; preds = %142, %137
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #8
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  store i64 1, ptr %20, align 8, !tbaa !5
  br label %145

145:                                              ; preds = %165, %144
  %146 = load i64, ptr %20, align 8, !tbaa !5
  %147 = load i64, ptr %4, align 8, !tbaa !5
  %148 = invoke noundef double @_ZSt4sqrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef %147)
          to label %149 unwind label %153

149:                                              ; preds = %145
  %150 = fptosi double %148 to i64
  %151 = icmp sle i64 %146, %150
  br i1 %151, label %157, label %152

152:                                              ; preds = %149
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %168

153:                                              ; preds = %162, %145
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %12, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %340

157:                                              ; preds = %149
  %158 = load i64, ptr %4, align 8, !tbaa !5
  %159 = load i64, ptr %20, align 8, !tbaa !5
  %160 = srem i64 %158, %159
  %161 = icmp eq i64 %160, 0
  br i1 %161, label %162, label %164

162:                                              ; preds = %157
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %163 unwind label %153

163:                                              ; preds = %162
  br label %164

164:                                              ; preds = %163, %157
  br label %165

165:                                              ; preds = %164
  %166 = load i64, ptr %20, align 8, !tbaa !5
  %167 = add nsw i64 %166, 1
  store i64 %167, ptr %20, align 8, !tbaa !5
  br label %145, !llvm.loop !14

168:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  store i64 0, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  store ptr %19, ptr %22, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %169 = load ptr, ptr %22, align 8, !tbaa !15
  %170 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %169) #8
  %171 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %170, ptr %171, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %172 = load ptr, ptr %22, align 8, !tbaa !15
  %173 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %172) #8
  %174 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %173, ptr %174, align 8
  br label %175

175:                                              ; preds = %323, %168
  %176 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  br i1 %176, label %178, label %177

177:                                              ; preds = %175
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %327

178:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %179 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #8
  %180 = load i64, ptr %179, align 8, !tbaa !5
  %181 = trunc i64 %180 to i32
  store i32 %181, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  store i32 0, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %182 = load i32, ptr %25, align 4, !tbaa !9
  %183 = sext i32 %182 to i64
  store i64 %183, ptr %28, align 8, !tbaa !5
  %184 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE11lower_boundERKx(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %185 unwind label %205

185:                                              ; preds = %178
  %186 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %27, i32 0, i32 0
  store ptr %184, ptr %186, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  br label %187

187:                                              ; preds = %202, %185
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %188 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %8) #8
  %189 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %29, i32 0, i32 0
  store ptr %188, ptr %189, align 8
  %190 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  br i1 %190, label %191, label %209

191:                                              ; preds = %187
  %192 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #8
  %193 = load i64, ptr %192, align 8, !tbaa !5
  %194 = load i32, ptr %25, align 4, !tbaa !9
  %195 = sub nsw i32 %194, 1
  %196 = sext i32 %195 to i64
  %197 = sub nsw i64 %193, %196
  %198 = load i32, ptr %26, align 4, !tbaa !9
  %199 = sext i32 %198 to i64
  %200 = add nsw i64 %199, %197
  %201 = trunc i64 %200 to i32
  store i32 %201, ptr %26, align 4, !tbaa !9
  br label %202

202:                                              ; preds = %191
  %203 = call ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEi(ptr noundef nonnull align 8 dereferenceable(8) %27, i32 noundef 0) #8
  %204 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %30, i32 0, i32 0
  store ptr %203, ptr %204, align 8
  br label %187, !llvm.loop !17

205:                                              ; preds = %178
  %206 = landingpad { ptr, i32 }
          cleanup
  %207 = extractvalue { ptr, i32 } %206, 0
  store ptr %207, ptr %12, align 8
  %208 = extractvalue { ptr, i32 } %206, 1
  store i32 %208, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  br label %326

209:                                              ; preds = %187
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  store i32 0, ptr %31, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  %210 = load i64, ptr %4, align 8, !tbaa !5
  %211 = load i32, ptr %25, align 4, !tbaa !9
  %212 = sext i32 %211 to i64
  %213 = sdiv i64 %210, %212
  store i64 %213, ptr %33, align 8, !tbaa !5
  %214 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE11lower_boundERKx(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %215 unwind label %237

215:                                              ; preds = %209
  %216 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %32, i32 0, i32 0
  store ptr %214, ptr %216, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %27, ptr align 8 %32, i64 8, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %217

217:                                              ; preds = %234, %215
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %218 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #8
  %219 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %34, i32 0, i32 0
  store ptr %218, ptr %219, align 8
  %220 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  br i1 %220, label %221, label %241

221:                                              ; preds = %217
  %222 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #8
  %223 = load i64, ptr %222, align 8, !tbaa !5
  %224 = load i64, ptr %4, align 8, !tbaa !5
  %225 = load i32, ptr %25, align 4, !tbaa !9
  %226 = sext i32 %225 to i64
  %227 = sdiv i64 %224, %226
  %228 = sub nsw i64 %227, 1
  %229 = sub nsw i64 %223, %228
  %230 = load i32, ptr %31, align 4, !tbaa !9
  %231 = sext i32 %230 to i64
  %232 = add nsw i64 %231, %229
  %233 = trunc i64 %232 to i32
  store i32 %233, ptr %31, align 4, !tbaa !9
  br label %234

234:                                              ; preds = %221
  %235 = call ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEi(ptr noundef nonnull align 8 dereferenceable(8) %27, i32 noundef 0) #8
  %236 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %35, i32 0, i32 0
  store ptr %235, ptr %236, align 8
  br label %217, !llvm.loop !19

237:                                              ; preds = %209
  %238 = landingpad { ptr, i32 }
          cleanup
  %239 = extractvalue { ptr, i32 } %238, 0
  store ptr %239, ptr %12, align 8
  %240 = extractvalue { ptr, i32 } %238, 1
  store i32 %240, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %325

241:                                              ; preds = %217
  %242 = load i32, ptr %26, align 4, !tbaa !9
  %243 = load i32, ptr %31, align 4, !tbaa !9
  %244 = mul nsw i32 %242, %243
  %245 = sext i32 %244 to i64
  %246 = load i64, ptr %21, align 8, !tbaa !5
  %247 = add nsw i64 %246, %245
  store i64 %247, ptr %21, align 8, !tbaa !5
  %248 = load i32, ptr %25, align 4, !tbaa !9
  %249 = sext i32 %248 to i64
  %250 = load i64, ptr %4, align 8, !tbaa !5
  %251 = load i32, ptr %25, align 4, !tbaa !9
  %252 = sext i32 %251 to i64
  %253 = sdiv i64 %250, %252
  %254 = icmp ne i64 %249, %253
  br i1 %254, label %255, label %322

255:                                              ; preds = %241
  store i32 0, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  %256 = load i64, ptr %4, align 8, !tbaa !5
  %257 = load i32, ptr %25, align 4, !tbaa !9
  %258 = sext i32 %257 to i64
  %259 = sdiv i64 %256, %258
  store i64 %259, ptr %37, align 8, !tbaa !5
  %260 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE11lower_boundERKx(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(8) %37)
          to label %261 unwind label %283

261:                                              ; preds = %255
  %262 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %36, i32 0, i32 0
  store ptr %260, ptr %262, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %27, ptr align 8 %36, i64 8, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  br label %263

263:                                              ; preds = %280, %261
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #8
  %264 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %8) #8
  %265 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %38, i32 0, i32 0
  store ptr %264, ptr %265, align 8
  %266 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  br i1 %266, label %267, label %287

267:                                              ; preds = %263
  %268 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #8
  %269 = load i64, ptr %268, align 8, !tbaa !5
  %270 = load i64, ptr %4, align 8, !tbaa !5
  %271 = load i32, ptr %25, align 4, !tbaa !9
  %272 = sext i32 %271 to i64
  %273 = sdiv i64 %270, %272
  %274 = sub nsw i64 %273, 1
  %275 = sub nsw i64 %269, %274
  %276 = load i32, ptr %26, align 4, !tbaa !9
  %277 = sext i32 %276 to i64
  %278 = add nsw i64 %277, %275
  %279 = trunc i64 %278 to i32
  store i32 %279, ptr %26, align 4, !tbaa !9
  br label %280

280:                                              ; preds = %267
  %281 = call ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEi(ptr noundef nonnull align 8 dereferenceable(8) %27, i32 noundef 0) #8
  %282 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %39, i32 0, i32 0
  store ptr %281, ptr %282, align 8
  br label %263, !llvm.loop !20

283:                                              ; preds = %255
  %284 = landingpad { ptr, i32 }
          cleanup
  %285 = extractvalue { ptr, i32 } %284, 0
  store ptr %285, ptr %12, align 8
  %286 = extractvalue { ptr, i32 } %284, 1
  store i32 %286, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  br label %325

287:                                              ; preds = %263
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #8
  store i32 0, ptr %40, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #8
  %288 = load i32, ptr %25, align 4, !tbaa !9
  %289 = sext i32 %288 to i64
  store i64 %289, ptr %42, align 8, !tbaa !5
  %290 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE11lower_boundERKx(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 8 dereferenceable(8) %42)
          to label %291 unwind label %311

291:                                              ; preds = %287
  %292 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %41, i32 0, i32 0
  store ptr %290, ptr %292, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %27, ptr align 8 %41, i64 8, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #8
  br label %293

293:                                              ; preds = %308, %291
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #8
  %294 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #8
  %295 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %43, i32 0, i32 0
  store ptr %294, ptr %295, align 8
  %296 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %43) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  br i1 %296, label %297, label %315

297:                                              ; preds = %293
  %298 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #8
  %299 = load i64, ptr %298, align 8, !tbaa !5
  %300 = load i32, ptr %25, align 4, !tbaa !9
  %301 = sub nsw i32 %300, 1
  %302 = sext i32 %301 to i64
  %303 = sub nsw i64 %299, %302
  %304 = load i32, ptr %40, align 4, !tbaa !9
  %305 = sext i32 %304 to i64
  %306 = add nsw i64 %305, %303
  %307 = trunc i64 %306 to i32
  store i32 %307, ptr %40, align 4, !tbaa !9
  br label %308

308:                                              ; preds = %297
  %309 = call ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEi(ptr noundef nonnull align 8 dereferenceable(8) %27, i32 noundef 0) #8
  %310 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %44, i32 0, i32 0
  store ptr %309, ptr %310, align 8
  br label %293, !llvm.loop !21

311:                                              ; preds = %287
  %312 = landingpad { ptr, i32 }
          cleanup
  %313 = extractvalue { ptr, i32 } %312, 0
  store ptr %313, ptr %12, align 8
  %314 = extractvalue { ptr, i32 } %312, 1
  store i32 %314, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #8
  br label %325

315:                                              ; preds = %293
  %316 = load i32, ptr %26, align 4, !tbaa !9
  %317 = load i32, ptr %40, align 4, !tbaa !9
  %318 = mul nsw i32 %316, %317
  %319 = sext i32 %318 to i64
  %320 = load i64, ptr %21, align 8, !tbaa !5
  %321 = add nsw i64 %320, %319
  store i64 %321, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #8
  br label %322

322:                                              ; preds = %315, %241
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %323

323:                                              ; preds = %322
  %324 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #8
  br label %175

325:                                              ; preds = %311, %283, %237
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %326

326:                                              ; preds = %325, %205
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %339

327:                                              ; preds = %177
  %328 = load i64, ptr %21, align 8, !tbaa !5
  %329 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %328)
          to label %330 unwind label %335

330:                                              ; preds = %327
  %331 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %329, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %332 unwind label %335

332:                                              ; preds = %330
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #8
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #8
  %333 = load ptr, ptr %5, align 8
  call void @llvm.stackrestore.p0(ptr %333)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  %334 = load i32, ptr %1, align 4
  ret i32 %334

335:                                              ; preds = %330, %327
  %336 = landingpad { ptr, i32 }
          cleanup
  %337 = extractvalue { ptr, i32 } %336, 0
  store ptr %337, ptr %12, align 8
  %338 = extractvalue { ptr, i32 } %336, 1
  store i32 %338, ptr %13, align 4
  br label %339

339:                                              ; preds = %335, %326
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %340

340:                                              ; preds = %339, %153
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #8
  br label %341

341:                                              ; preds = %340, %121, %96, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #8
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  br label %342

342:                                              ; preds = %341
  %343 = load ptr, ptr %12, align 8
  %344 = load i32, ptr %13, align 4
  %345 = insertvalue { ptr, i32 } poison, ptr %343, 0
  %346 = insertvalue { ptr, i32 } %345, i32 %344, 1
  resume { ptr, i32 } %346
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #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 nounwind uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef) #5

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

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

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

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

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

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

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

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

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

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

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 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 }
attributes #4 = { 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 #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = distinct !{!17, !12}
!18 = !{i64 0, i64 8, !15}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !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::multiset" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long 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.std::vector" = 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.__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

; 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 %"class.std::multiset", align 8
  %5 = alloca %"class.std::multiset", align 8
  %6 = alloca i64, align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca i64, align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %12 = alloca i64, align 8
  %13 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %14 = alloca i64, align 8
  %15 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %16 = alloca i64, align 8
  %17 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %18 = alloca i64, align 8
  %19 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %23 = load i64, ptr %1, align 8, !tbaa !5
  %24 = call ptr @llvm.stacksave.p0()
  %25 = alloca i64, i64 %23, align 16
  %26 = load i64, ptr %2, align 8, !tbaa !5
  %27 = alloca i64, i64 %26, align 16
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  store i64 0, ptr %6, align 8, !tbaa !5
  %28 = load i64, ptr %1, align 8, !tbaa !5
  %29 = icmp sgt i64 %28, 0
  br i1 %29, label %.lr.ph, label %._crit_edge.thread

._crit_edge:                                      ; preds = %44
  %.not = icmp eq i64 %45, 0
  br i1 %.not, label %._crit_edge.thread, label %48

.lr.ph:                                           ; preds = %0, %44
  %indvars.iv = phi i64 [ %indvars.iv.next, %44 ], [ 0, %0 ]
  %30 = getelementptr inbounds i64, ptr %25, i64 %indvars.iv
  %31 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %30)
          to label %32 unwind label %38

32:                                               ; preds = %.lr.ph
  %33 = load i64, ptr %30, align 8, !tbaa !5
  %34 = icmp eq i64 %33, 1
  %35 = load i64, ptr %6, align 8, !tbaa !5
  br i1 %34, label %36, label %40

36:                                               ; preds = %32
  %37 = add nsw i64 %35, 1
  store i64 %37, ptr %6, align 8, !tbaa !5
  br label %44

38:                                               ; preds = %41, %.lr.ph
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %181

40:                                               ; preds = %32
  %.not71 = icmp eq i64 %35, 0
  br i1 %.not71, label %44, label %41

41:                                               ; preds = %40
  %42 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %43 unwind label %38

43:                                               ; preds = %41
  store i64 0, ptr %6, align 8, !tbaa !5
  br label %44

44:                                               ; preds = %36, %43, %40
  %45 = phi i64 [ %37, %36 ], [ 0, %43 ], [ 0, %40 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %46 = load i64, ptr %1, align 8, !tbaa !5
  %47 = icmp sgt i64 %46, %indvars.iv.next
  br i1 %47, label %.lr.ph, label %._crit_edge, !llvm.loop !9

48:                                               ; preds = %._crit_edge
  %49 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %50 unwind label %51

50:                                               ; preds = %48
  store i64 0, ptr %6, align 8, !tbaa !5
  br label %._crit_edge.thread

51:                                               ; preds = %74, %48
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %181

._crit_edge.thread:                               ; preds = %0, %50, %._crit_edge
  %53 = load i64, ptr %2, align 8, !tbaa !5
  %54 = icmp sgt i64 %53, 0
  br i1 %54, label %.lr.ph87, label %._crit_edge88.thread

._crit_edge88:                                    ; preds = %70
  %55 = icmp eq i64 %71, 0
  br i1 %55, label %._crit_edge88.thread, label %74

.lr.ph87:                                         ; preds = %._crit_edge.thread, %70
  %indvars.iv122 = phi i64 [ %indvars.iv.next123, %70 ], [ 0, %._crit_edge.thread ]
  %56 = getelementptr inbounds i64, ptr %27, i64 %indvars.iv122
  %57 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %56)
          to label %58 unwind label %64

58:                                               ; preds = %.lr.ph87
  %59 = load i64, ptr %56, align 8, !tbaa !5
  %60 = icmp eq i64 %59, 1
  %61 = load i64, ptr %6, align 8, !tbaa !5
  br i1 %60, label %62, label %66

62:                                               ; preds = %58
  %63 = add nsw i64 %61, 1
  store i64 %63, ptr %6, align 8, !tbaa !5
  br label %70

64:                                               ; preds = %67, %.lr.ph87
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %181

66:                                               ; preds = %58
  %.not70 = icmp eq i64 %61, 0
  br i1 %.not70, label %70, label %67

67:                                               ; preds = %66
  %68 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %69 unwind label %64

69:                                               ; preds = %67
  store i64 0, ptr %6, align 8, !tbaa !5
  br label %70

70:                                               ; preds = %62, %69, %66
  %71 = phi i64 [ %63, %62 ], [ 0, %69 ], [ 0, %66 ]
  %indvars.iv.next123 = add nuw nsw i64 %indvars.iv122, 1
  %72 = load i64, ptr %2, align 8, !tbaa !5
  %73 = icmp sgt i64 %72, %indvars.iv.next123
  br i1 %73, label %.lr.ph87, label %._crit_edge88, !llvm.loop !11

74:                                               ; preds = %._crit_edge88
  %75 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %76 unwind label %51

76:                                               ; preds = %74
  store i64 0, ptr %6, align 8, !tbaa !5
  br label %._crit_edge88.thread

._crit_edge88.thread:                             ; preds = %._crit_edge.thread, %76, %._crit_edge88
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  store i64 1, ptr %8, align 8, !tbaa !5
  %77 = load i64, ptr %3, align 8, !tbaa !5
  %78 = call noundef double @_ZSt4sqrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef %77)
  %79 = fptosi double %78 to i64
  %.not6189 = icmp slt i64 %79, 1
  br i1 %.not6189, label %._crit_edge92, label %.lr.ph91

._crit_edge92:                                    ; preds = %90, %._crit_edge88.thread
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %80 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  store ptr %80, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %81 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  store ptr %81, ptr %10, align 8
  %82 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %82, label %.lr.ph114, label %._crit_edge115

83:                                               ; preds = %89
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %180

.lr.ph91:                                         ; preds = %._crit_edge88.thread, %90
  %85 = load i64, ptr %3, align 8, !tbaa !5
  %86 = load i64, ptr %8, align 8, !tbaa !5
  %87 = srem i64 %85, %86
  %88 = icmp eq i64 %87, 0
  br i1 %88, label %89, label %90

89:                                               ; preds = %.lr.ph91
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %._crit_edge125 unwind label %83

._crit_edge125:                                   ; preds = %89
  %.pre = load i64, ptr %8, align 8, !tbaa !5
  %.pre126 = load i64, ptr %3, align 8, !tbaa !5
  br label %90

90:                                               ; preds = %._crit_edge125, %.lr.ph91
  %91 = phi i64 [ %.pre126, %._crit_edge125 ], [ %85, %.lr.ph91 ]
  %92 = phi i64 [ %.pre, %._crit_edge125 ], [ %86, %.lr.ph91 ]
  %93 = add nsw i64 %92, 1
  store i64 %93, ptr %8, align 8, !tbaa !5
  %94 = call noundef double @_ZSt4sqrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef %91)
  %95 = fptosi double %94 to i64
  %.not61.not = icmp slt i64 %92, %95
  br i1 %.not61.not, label %.lr.ph91, label %._crit_edge92, !llvm.loop !12

._crit_edge115:                                   ; preds = %171, %._crit_edge92
  %.052.lcssa = phi i64 [ 0, %._crit_edge92 ], [ %.153, %171 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  %96 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.052.lcssa)
          to label %175 unwind label %178

.lr.ph114:                                        ; preds = %._crit_edge92, %171
  %.052112 = phi i64 [ %.153, %171 ], [ 0, %._crit_edge92 ]
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %98 = load i64, ptr %97, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %sext = shl i64 %98, 32
  %99 = ashr exact i64 %sext, 32
  store i64 %99, ptr %12, align 8, !tbaa !5
  %100 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE11lower_boundERKx(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %101 unwind label %112

101:                                              ; preds = %.lr.ph114
  store ptr %100, ptr %11, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %102 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  store ptr %102, ptr %13, align 8
  %103 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br i1 %103, label %.lr.ph95, label %._crit_edge96

.lr.ph95:                                         ; preds = %101, %.lr.ph95
  %.05593 = phi i32 [ %108, %.lr.ph95 ], [ 0, %101 ]
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  %105 = load i64, ptr %104, align 8, !tbaa !5
  %reass.sub = sub i64 %105, %98
  %106 = trunc i64 %reass.sub to i32
  %107 = add i32 %106, 1
  %108 = add i32 %107, %.05593
  %109 = call ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %110 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  store ptr %110, ptr %13, align 8
  %111 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br i1 %111, label %.lr.ph95, label %._crit_edge96, !llvm.loop !13

112:                                              ; preds = %.lr.ph114
  %113 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  br label %174

._crit_edge96:                                    ; preds = %.lr.ph95, %101
  %.055.lcssa = phi i32 [ 0, %101 ], [ %108, %.lr.ph95 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %114 = load i64, ptr %3, align 8, !tbaa !5
  %115 = sdiv i64 %114, %99
  store i64 %115, ptr %14, align 8, !tbaa !5
  %116 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE11lower_boundERKx(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %117 unwind label %130

117:                                              ; preds = %._crit_edge96
  store ptr %116, ptr %11, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %118 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #7
  store ptr %118, ptr %15, align 8
  %119 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br i1 %119, label %.lr.ph99, label %._crit_edge100

.lr.ph99:                                         ; preds = %117, %.lr.ph99
  %.05497 = phi i32 [ %126, %.lr.ph99 ], [ 0, %117 ]
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  %121 = load i64, ptr %120, align 8, !tbaa !5
  %122 = load i64, ptr %3, align 8, !tbaa !5
  %123 = sdiv i64 %122, %99
  %.neg78 = add i64 %121, 1
  %124 = sub i64 %.neg78, %123
  %125 = trunc i64 %124 to i32
  %126 = add i32 %.05497, %125
  %127 = call ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %128 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #7
  store ptr %128, ptr %15, align 8
  %129 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br i1 %129, label %.lr.ph99, label %._crit_edge100, !llvm.loop !16

130:                                              ; preds = %._crit_edge96
  %131 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %174

._crit_edge100:                                   ; preds = %.lr.ph99, %117
  %.054.lcssa = phi i32 [ 0, %117 ], [ %126, %.lr.ph99 ]
  %132 = mul nsw i32 %.054.lcssa, %.055.lcssa
  %133 = sext i32 %132 to i64
  %134 = add nsw i64 %.052112, %133
  %135 = load i64, ptr %3, align 8, !tbaa !5
  %136 = sdiv i64 %135, %99
  %.not62 = icmp eq i64 %99, %136
  br i1 %.not62, label %171, label %137

137:                                              ; preds = %._crit_edge100
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #7
  store i64 %136, ptr %16, align 8, !tbaa !5
  %138 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE11lower_boundERKx(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %139 unwind label %152

139:                                              ; preds = %137
  store ptr %138, ptr %11, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %140 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  store ptr %140, ptr %17, align 8
  %141 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  br i1 %141, label %.lr.ph104, label %._crit_edge105

.lr.ph104:                                        ; preds = %139, %.lr.ph104
  %.156102 = phi i32 [ %148, %.lr.ph104 ], [ 0, %139 ]
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  %143 = load i64, ptr %142, align 8, !tbaa !5
  %144 = load i64, ptr %3, align 8, !tbaa !5
  %145 = sdiv i64 %144, %99
  %.neg76 = add i64 %143, 1
  %146 = sub i64 %.neg76, %145
  %147 = trunc i64 %146 to i32
  %148 = add i32 %.156102, %147
  %149 = call ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %150 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  store ptr %150, ptr %17, align 8
  %151 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  br i1 %151, label %.lr.ph104, label %._crit_edge105, !llvm.loop !17

152:                                              ; preds = %137
  %153 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  br label %174

._crit_edge105:                                   ; preds = %.lr.ph104, %139
  %.156.lcssa = phi i32 [ 0, %139 ], [ %148, %.lr.ph104 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #7
  store i64 %99, ptr %18, align 8, !tbaa !5
  %154 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE11lower_boundERKx(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %155 unwind label %166

155:                                              ; preds = %._crit_edge105
  store ptr %154, ptr %11, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #7
  %156 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #7
  store ptr %156, ptr %19, align 8
  %157 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  br i1 %157, label %.lr.ph109, label %._crit_edge110

.lr.ph109:                                        ; preds = %155, %.lr.ph109
  %.044107 = phi i32 [ %162, %.lr.ph109 ], [ 0, %155 ]
  %158 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIxEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  %159 = load i64, ptr %158, align 8, !tbaa !5
  %reass.sub117 = sub i64 %159, %98
  %160 = trunc i64 %reass.sub117 to i32
  %161 = add i32 %160, 1
  %162 = add i32 %161, %.044107
  %163 = call ptr @_ZNSt23_Rb_tree_const_iteratorIxEppEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #7
  %164 = call ptr @_ZNKSt8multisetIxSt4lessIxESaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #7
  store ptr %164, ptr %19, align 8
  %165 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIxES2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  br i1 %165, label %.lr.ph109, label %._crit_edge110, !llvm.loop !18

166:                                              ; preds = %._crit_edge105
  %167 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #7
  br label %174

._crit_edge110:                                   ; preds = %.lr.ph109, %155
  %.044.lcssa = phi i32 [ 0, %155 ], [ %162, %.lr.ph109 ]
  %168 = mul nsw i32 %.044.lcssa, %.156.lcssa
  %169 = sext i32 %168 to i64
  %170 = add nsw i64 %134, %169
  br label %171

171:                                              ; preds = %._crit_edge110, %._crit_edge100
  %.153 = phi i64 [ %170, %._crit_edge110 ], [ %134, %._crit_edge100 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %173 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %173, label %.lr.ph114, label %._crit_edge115

174:                                              ; preds = %130, %152, %166, %112
  %.pn.pn = phi { ptr, i32 } [ %113, %112 ], [ %167, %166 ], [ %153, %152 ], [ %131, %130 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %180

175:                                              ; preds = %._crit_edge115
  %176 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %96, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %177 unwind label %178

177:                                              ; preds = %175
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #7
  call void @llvm.stackrestore.p0(ptr %24)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret i32 0

178:                                              ; preds = %175, %._crit_edge115
  %179 = landingpad { ptr, i32 }
          cleanup
  br label %180

180:                                              ; preds = %174, %178, %83
  %.pn68 = phi { ptr, i32 } [ %84, %83 ], [ %.pn.pn, %174 ], [ %179, %178 ]
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  br label %181

181:                                              ; preds = %180, %64, %51, %38
  %.pn72 = phi { ptr, i32 } [ %39, %38 ], [ %65, %64 ], [ %.pn68, %180 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn72
}

; 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 uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_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 nounwind uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef) local_unnamed_addr #5

; 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 #2 align 2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 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 }
attributes #4 = { 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 #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

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


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