; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/381 Division 1/Problem C (C)

; 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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@a = external dso_local global [300100 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@__FUNCTION__.main = external hidden unnamed_addr constant [5 x i8], align 1
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z3getix(i32 noundef, i64 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z6updateix(i32 noundef, i64 noundef) #0

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

69:                                               ; preds = %79, %0
  %70 = load i32, ptr %2, align 4, !tbaa !8
  %71 = load i32, ptr @n, align 4, !tbaa !8
  %72 = icmp sle i32 %70, %71
  br i1 %72, label %74, label %73

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

74:                                               ; preds = %69
  %75 = load i32, ptr %2, align 4, !tbaa !8
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [300100 x i64], ptr @a, i64 0, i64 %76
  %78 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %77)
  br label %79

79:                                               ; preds = %74
  %80 = load i32, ptr %2, align 4, !tbaa !8
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %2, align 4, !tbaa !8
  br label %69, !llvm.loop !11

82:                                               ; preds = %73
  store i64 1152921504606846976, ptr @a, align 16, !tbaa !13
  %83 = load i32, ptr @n, align 4, !tbaa !8
  %84 = add nsw i32 %83, 1
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [300100 x i64], ptr @a, i64 0, i64 %85
  store i64 1152921504606846976, ptr %86, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 48, ptr %3) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr %4) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 1, ptr %5, align 4, !tbaa !8
  br label %87

87:                                               ; preds = %117, %82
  %88 = load i32, ptr %5, align 4, !tbaa !8
  %89 = load i32, ptr @n, align 4, !tbaa !8
  %90 = icmp sle i32 %88, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %120

92:                                               ; preds = %87
  %93 = load i32, ptr %5, align 4, !tbaa !8
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [300100 x i64], ptr @a, i64 0, i64 %94
  %96 = load i64, ptr %95, align 8, !tbaa !13
  %97 = load i32, ptr %5, align 4, !tbaa !8
  %98 = sub nsw i32 %97, 1
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [300100 x i64], ptr @a, i64 0, i64 %99
  %101 = load i64, ptr %100, align 8, !tbaa !13
  %102 = icmp sle i64 %96, %101
  br i1 %102, label %103, label %116

103:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %104 = load i32, ptr %5, align 4, !tbaa !8
  %105 = sub nsw i32 %104, 1
  store i32 %105, ptr %6, align 4, !tbaa !8
  %106 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %107 unwind label %112

107:                                              ; preds = %103
  %108 = getelementptr inbounds { ptr, i8 }, ptr %9, i32 0, i32 0
  %109 = extractvalue { ptr, i8 } %106, 0
  store ptr %109, ptr %108, align 8
  %110 = getelementptr inbounds { ptr, i8 }, ptr %9, i32 0, i32 1
  %111 = extractvalue { ptr, i8 } %106, 1
  store i8 %111, ptr %110, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %116

112:                                              ; preds = %103
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %7, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %532

116:                                              ; preds = %107, %92
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %5, align 4, !tbaa !8
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %5, align 4, !tbaa !8
  br label %87, !llvm.loop !15

120:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %121 = load i32, ptr @n, align 4, !tbaa !8
  store i32 %121, ptr %10, align 4, !tbaa !8
  br label %122

122:                                              ; preds = %151, %120
  %123 = load i32, ptr %10, align 4, !tbaa !8
  %124 = icmp sge i32 %123, 1
  br i1 %124, label %126, label %125

125:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %154

126:                                              ; preds = %122
  %127 = load i32, ptr %10, align 4, !tbaa !8
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [300100 x i64], ptr @a, i64 0, i64 %128
  %130 = load i64, ptr %129, align 8, !tbaa !13
  %131 = load i32, ptr %10, align 4, !tbaa !8
  %132 = add nsw i32 %131, 1
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [300100 x i64], ptr @a, i64 0, i64 %133
  %135 = load i64, ptr %134, align 8, !tbaa !13
  %136 = icmp sle i64 %130, %135
  br i1 %136, label %137, label %150

137:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %138 = load i32, ptr %10, align 4, !tbaa !8
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %11, align 4, !tbaa !8
  %140 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %141 unwind label %146

141:                                              ; preds = %137
  %142 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 0
  %143 = extractvalue { ptr, i8 } %140, 0
  store ptr %143, ptr %142, align 8
  %144 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 1
  %145 = extractvalue { ptr, i8 } %140, 1
  store i8 %145, ptr %144, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %150

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

150:                                              ; preds = %141, %126
  br label %151

151:                                              ; preds = %150
  %152 = load i32, ptr %10, align 4, !tbaa !8
  %153 = add nsw i32 %152, -1
  store i32 %153, ptr %10, align 4, !tbaa !8
  br label %122, !llvm.loop !16

154:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !8
  br label %155

155:                                              ; preds = %174, %154
  %156 = load i32, ptr %13, align 4, !tbaa !8
  %157 = load i32, ptr @n, align 4, !tbaa !8
  %158 = add nsw i32 %157, 1
  %159 = icmp sle i32 %156, %158
  br i1 %159, label %161, label %160

160:                                              ; preds = %155
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %177

161:                                              ; preds = %155
  %162 = load i32, ptr %13, align 4, !tbaa !8
  %163 = load i32, ptr %13, align 4, !tbaa !8
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [300100 x i64], ptr @a, i64 0, i64 %164
  %166 = load i64, ptr %165, align 8, !tbaa !13
  call void @_Z6updateix(i32 noundef %162, i64 noundef %166)
  %167 = load i32, ptr %13, align 4, !tbaa !8
  %168 = add nsw i32 %167, 1
  %169 = load i32, ptr %13, align 4, !tbaa !8
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [300100 x i64], ptr @a, i64 0, i64 %170
  %172 = load i64, ptr %171, align 8, !tbaa !13
  %173 = sub nsw i64 0, %172
  call void @_Z6updateix(i32 noundef %168, i64 noundef %173)
  br label %174

174:                                              ; preds = %161
  %175 = load i32, ptr %13, align 4, !tbaa !8
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %13, align 4, !tbaa !8
  br label %155, !llvm.loop !17

177:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 1, ptr %14, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %178 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  %179 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %15, i32 0, i32 0
  store ptr %178, ptr %179, align 8
  br label %180

180:                                              ; preds = %214, %177
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %181 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  %182 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %16, i32 0, i32 0
  store ptr %181, ptr %182, align 8
  %183 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br i1 %183, label %185, label %184

184:                                              ; preds = %180
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %217

185:                                              ; preds = %180
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %186 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  %187 = load i32, ptr %186, align 4, !tbaa !8
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %18, align 4, !tbaa !8
  %189 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11upper_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %190 unwind label %205

190:                                              ; preds = %185
  %191 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %17, i32 0, i32 0
  store ptr %189, ptr %191, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %192 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  %193 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %19, i32 0, i32 0
  store ptr %192, ptr %193, align 8
  %194 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br i1 %194, label %195, label %213

195:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %196 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  %197 = load i32, ptr %196, align 4, !tbaa !8
  %198 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  %199 = load i32, ptr %198, align 4, !tbaa !8
  %200 = sub nsw i32 %197, %199
  %201 = sub nsw i32 %200, 1
  store i32 %201, ptr %20, align 4, !tbaa !8
  %202 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %203 unwind label %209

203:                                              ; preds = %195
  %204 = load i32, ptr %202, align 4, !tbaa !8
  store i32 %204, ptr %14, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %213

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

209:                                              ; preds = %195
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %7, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %216

213:                                              ; preds = %203, %190
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %214

214:                                              ; preds = %213
  %215 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  br label %180, !llvm.loop !18

216:                                              ; preds = %209, %205
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %531

217:                                              ; preds = %184
  %218 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @m)
          to label %219 unwind label %225

219:                                              ; preds = %217
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !8
  br label %220

220:                                              ; preds = %512, %219
  %221 = load i32, ptr %21, align 4, !tbaa !8
  %222 = load i32, ptr @m, align 4, !tbaa !8
  %223 = icmp slt i32 %221, %222
  br i1 %223, label %229, label %224

224:                                              ; preds = %220
  store i32 17, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %529

225:                                              ; preds = %217
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %7, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %8, align 4
  br label %531

229:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %230 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %231 unwind label %271

231:                                              ; preds = %229
  %232 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %230, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %233 unwind label %271

233:                                              ; preds = %231
  %234 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %232, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %235 unwind label %271

235:                                              ; preds = %233
  %236 = load i32, ptr %23, align 4, !tbaa !8
  %237 = load i32, ptr %25, align 4, !tbaa !8
  %238 = sext i32 %237 to i64
  call void @_Z6updateix(i32 noundef %236, i64 noundef %238)
  %239 = load i32, ptr %24, align 4, !tbaa !8
  %240 = add nsw i32 %239, 1
  %241 = load i32, ptr %25, align 4, !tbaa !8
  %242 = sub nsw i32 0, %241
  %243 = sext i32 %242 to i64
  call void @_Z6updateix(i32 noundef %240, i64 noundef %243)
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %244 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11lower_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %245 unwind label %275

245:                                              ; preds = %235
  %246 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %26, i32 0, i32 0
  store ptr %244, ptr %246, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %247 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  %248 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %27, i32 0, i32 0
  store ptr %247, ptr %248, align 8
  %249 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br i1 %249, label %250, label %280

250:                                              ; preds = %245
  %251 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %26, i32 noundef 0) #8
  %252 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %28, i32 0, i32 0
  store ptr %251, ptr %252, align 8
  %253 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %26) #8
  %254 = load i32, ptr %253, align 4, !tbaa !8
  %255 = load i32, ptr %23, align 4, !tbaa !8
  %256 = sub nsw i32 %255, 1
  %257 = icmp eq i32 %254, %256
  br i1 %257, label %258, label %279

258:                                              ; preds = %250
  %259 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %26) #8
  %260 = load i32, ptr %259, align 4, !tbaa !8
  %261 = call noundef i64 @_Z3getix(i32 noundef %260, i64 noundef 0)
  %262 = load i32, ptr %23, align 4, !tbaa !8
  %263 = call noundef i64 @_Z3getix(i32 noundef %262, i64 noundef 0)
  %264 = icmp slt i64 %261, %263
  br i1 %264, label %265, label %279

265:                                              ; preds = %258
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %29, ptr align 8 %26, i64 8, i1 false), !tbaa.struct !19
  %266 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %29, i32 0, i32 0
  %267 = load ptr, ptr %266, align 8
  %268 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr %267)
          to label %269 unwind label %275

269:                                              ; preds = %265
  %270 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %30, i32 0, i32 0
  store ptr %268, ptr %270, align 8
  br label %279

271:                                              ; preds = %233, %231, %229
  %272 = landingpad { ptr, i32 }
          cleanup
  %273 = extractvalue { ptr, i32 } %272, 0
  store ptr %273, ptr %7, align 8
  %274 = extractvalue { ptr, i32 } %272, 1
  store i32 %274, ptr %8, align 4
  br label %528

275:                                              ; preds = %287, %265, %235
  %276 = landingpad { ptr, i32 }
          cleanup
  %277 = extractvalue { ptr, i32 } %276, 0
  store ptr %277, ptr %7, align 8
  %278 = extractvalue { ptr, i32 } %276, 1
  store i32 %278, ptr %8, align 4
  br label %527

279:                                              ; preds = %269, %258, %250
  br label %280

280:                                              ; preds = %279, %245
  %281 = load i32, ptr %24, align 4, !tbaa !8
  %282 = call noundef i64 @_Z3getix(i32 noundef %281, i64 noundef 0)
  %283 = load i32, ptr %24, align 4, !tbaa !8
  %284 = add nsw i32 %283, 1
  %285 = call noundef i64 @_Z3getix(i32 noundef %284, i64 noundef 0)
  %286 = icmp sge i64 %282, %285
  br i1 %286, label %287, label %294

287:                                              ; preds = %280
  %288 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %289 unwind label %275

289:                                              ; preds = %287
  %290 = getelementptr inbounds { ptr, i8 }, ptr %31, i32 0, i32 0
  %291 = extractvalue { ptr, i8 } %288, 0
  store ptr %291, ptr %290, align 8
  %292 = getelementptr inbounds { ptr, i8 }, ptr %31, i32 0, i32 1
  %293 = extractvalue { ptr, i8 } %288, 1
  store i8 %293, ptr %292, align 8
  br label %294

294:                                              ; preds = %289, %280
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #8
  %295 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11upper_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %296 unwind label %320

296:                                              ; preds = %294
  %297 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %32, i32 0, i32 0
  store ptr %295, ptr %297, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  %298 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  %299 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %33, i32 0, i32 0
  store ptr %298, ptr %299, align 8
  %300 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  br i1 %300, label %301, label %325

301:                                              ; preds = %296
  %302 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #8
  %303 = load i32, ptr %302, align 4, !tbaa !8
  %304 = load i32, ptr %24, align 4, !tbaa !8
  %305 = add nsw i32 %304, 1
  %306 = icmp eq i32 %303, %305
  br i1 %306, label %307, label %324

307:                                              ; preds = %301
  %308 = load i32, ptr %24, align 4, !tbaa !8
  %309 = call noundef i64 @_Z3getix(i32 noundef %308, i64 noundef 0)
  %310 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #8
  %311 = load i32, ptr %310, align 4, !tbaa !8
  %312 = call noundef i64 @_Z3getix(i32 noundef %311, i64 noundef 0)
  %313 = icmp sgt i64 %309, %312
  br i1 %313, label %314, label %324

314:                                              ; preds = %307
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %34, ptr align 8 %32, i64 8, i1 false), !tbaa.struct !19
  %315 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %34, i32 0, i32 0
  %316 = load ptr, ptr %315, align 8
  %317 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr %316)
          to label %318 unwind label %320

318:                                              ; preds = %314
  %319 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %35, i32 0, i32 0
  store ptr %317, ptr %319, align 8
  br label %324

320:                                              ; preds = %509, %505, %332, %314, %294
  %321 = landingpad { ptr, i32 }
          cleanup
  %322 = extractvalue { ptr, i32 } %321, 0
  store ptr %322, ptr %7, align 8
  %323 = extractvalue { ptr, i32 } %321, 1
  store i32 %323, ptr %8, align 4
  br label %526

324:                                              ; preds = %318, %307, %301
  br label %325

325:                                              ; preds = %324, %296
  %326 = load i32, ptr %23, align 4, !tbaa !8
  %327 = call noundef i64 @_Z3getix(i32 noundef %326, i64 noundef 0)
  %328 = load i32, ptr %23, align 4, !tbaa !8
  %329 = sub nsw i32 %328, 1
  %330 = call noundef i64 @_Z3getix(i32 noundef %329, i64 noundef 0)
  %331 = icmp sge i64 %327, %330
  br i1 %331, label %332, label %339

332:                                              ; preds = %325
  %333 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %334 unwind label %320

334:                                              ; preds = %332
  %335 = getelementptr inbounds { ptr, i8 }, ptr %36, i32 0, i32 0
  %336 = extractvalue { ptr, i8 } %333, 0
  store ptr %336, ptr %335, align 8
  %337 = getelementptr inbounds { ptr, i8 }, ptr %36, i32 0, i32 1
  %338 = extractvalue { ptr, i8 } %333, 1
  store i8 %338, ptr %337, align 8
  br label %339

339:                                              ; preds = %334, %325
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  %340 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  %341 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %37, i32 0, i32 0
  store ptr %340, ptr %341, align 8
  br label %342

342:                                              ; preds = %358, %339
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #8
  %343 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  %344 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %38, i32 0, i32 0
  store ptr %343, ptr %344, align 8
  %345 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(8) %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  br i1 %345, label %347, label %346

346:                                              ; preds = %342
  store i32 20, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  br label %364

347:                                              ; preds = %342
  %348 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @__FUNCTION__.main)
          to label %349 unwind label %360

349:                                              ; preds = %347
  %350 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %348, i8 noundef signext 32)
          to label %351 unwind label %360

351:                                              ; preds = %349
  %352 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %350, i32 noundef 128)
          to label %353 unwind label %360

353:                                              ; preds = %351
  %354 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %352, ptr noundef @.str)
          to label %355 unwind label %360

355:                                              ; preds = %353
  %356 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #8
  invoke void @_Z5traceIRKiEvPKcOT_(ptr noundef @.str.1, ptr noundef nonnull align 4 dereferenceable(4) %356)
          to label %357 unwind label %360

357:                                              ; preds = %355
  br label %358

358:                                              ; preds = %357
  %359 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #8
  br label %342, !llvm.loop !22

360:                                              ; preds = %355, %353, %351, %349, %347
  %361 = landingpad { ptr, i32 }
          cleanup
  %362 = extractvalue { ptr, i32 } %361, 0
  store ptr %362, ptr %7, align 8
  %363 = extractvalue { ptr, i32 } %361, 1
  store i32 %363, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  br label %526

364:                                              ; preds = %346
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #8
  %365 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  %366 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %39, i32 0, i32 0
  store ptr %365, ptr %366, align 8
  br label %367

367:                                              ; preds = %383, %364
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #8
  %368 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  %369 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %40, i32 0, i32 0
  store ptr %368, ptr %369, align 8
  %370 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 8 dereferenceable(8) %40) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  br i1 %370, label %372, label %371

371:                                              ; preds = %367
  store i32 23, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  br label %389

372:                                              ; preds = %367
  %373 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @__FUNCTION__.main)
          to label %374 unwind label %385

374:                                              ; preds = %372
  %375 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %373, i8 noundef signext 32)
          to label %376 unwind label %385

376:                                              ; preds = %374
  %377 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %375, i32 noundef 131)
          to label %378 unwind label %385

378:                                              ; preds = %376
  %379 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %377, ptr noundef @.str)
          to label %380 unwind label %385

380:                                              ; preds = %378
  %381 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #8
  invoke void @_Z5traceIRKiEvPKcOT_(ptr noundef @.str.1, ptr noundef nonnull align 4 dereferenceable(4) %381)
          to label %382 unwind label %385

382:                                              ; preds = %380
  br label %383

383:                                              ; preds = %382
  %384 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #8
  br label %367, !llvm.loop !23

385:                                              ; preds = %380, %378, %376, %374, %372
  %386 = landingpad { ptr, i32 }
          cleanup
  %387 = extractvalue { ptr, i32 } %386, 0
  store ptr %387, ptr %7, align 8
  %388 = extractvalue { ptr, i32 } %386, 1
  store i32 %388, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  br label %526

389:                                              ; preds = %371
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #8
  %390 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11lower_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %391 unwind label %399

391:                                              ; preds = %389
  %392 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %41, i32 0, i32 0
  store ptr %390, ptr %392, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #8
  %393 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  %394 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %43, i32 0, i32 0
  store ptr %393, ptr %394, align 8
  %395 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull align 8 dereferenceable(8) %43) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  br i1 %395, label %396, label %403

396:                                              ; preds = %391
  %397 = load i32, ptr %23, align 4, !tbaa !8
  %398 = sub nsw i32 %397, 1
  store i32 %398, ptr %42, align 4, !tbaa !8
  br label %408

399:                                              ; preds = %389
  %400 = landingpad { ptr, i32 }
          cleanup
  %401 = extractvalue { ptr, i32 } %400, 0
  store ptr %401, ptr %7, align 8
  %402 = extractvalue { ptr, i32 } %400, 1
  store i32 %402, ptr %8, align 4
  br label %476

403:                                              ; preds = %391
  %404 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %41, i32 noundef 0) #8
  %405 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %44, i32 0, i32 0
  store ptr %404, ptr %405, align 8
  %406 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %41) #8
  %407 = load i32, ptr %406, align 4, !tbaa !8
  store i32 %407, ptr %42, align 4, !tbaa !8
  br label %408

408:                                              ; preds = %403, %396
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #8
  %409 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11upper_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %410 unwind label %462

410:                                              ; preds = %408
  %411 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %45, i32 0, i32 0
  store ptr %409, ptr %411, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #8
  %412 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  %413 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %47, i32 0, i32 0
  store ptr %412, ptr %413, align 8
  %414 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull align 8 dereferenceable(8) %47) #8
  br i1 %414, label %415, label %418

415:                                              ; preds = %410
  %416 = load i32, ptr %23, align 4, !tbaa !8
  %417 = add nsw i32 %416, 1
  br label %421

418:                                              ; preds = %410
  %419 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %45) #8
  %420 = load i32, ptr %419, align 4, !tbaa !8
  br label %421

421:                                              ; preds = %418, %415
  %422 = phi i32 [ %417, %415 ], [ %420, %418 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #8
  store i32 %422, ptr %46, align 4, !tbaa !8
  %423 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @__FUNCTION__.main)
          to label %424 unwind label %466

424:                                              ; preds = %421
  %425 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %423, i8 noundef signext 32)
          to label %426 unwind label %466

426:                                              ; preds = %424
  %427 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %425, i32 noundef 149)
          to label %428 unwind label %466

428:                                              ; preds = %426
  %429 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %427, ptr noundef @.str)
          to label %430 unwind label %466

430:                                              ; preds = %428
  invoke void @_Z5traceIRiJS0_S0_S0_EEvPKcOT_DpOT0_(ptr noundef @.str.2, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %42, ptr noundef nonnull align 4 dereferenceable(4) %46)
          to label %431 unwind label %466

431:                                              ; preds = %430
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #8
  %432 = load i32, ptr %46, align 4, !tbaa !8
  %433 = load i32, ptr %42, align 4, !tbaa !8
  %434 = sub nsw i32 %432, %433
  %435 = sub nsw i32 %434, 1
  store i32 %435, ptr %48, align 4, !tbaa !8
  %436 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %48)
          to label %437 unwind label %470

437:                                              ; preds = %431
  %438 = load i32, ptr %436, align 4, !tbaa !8
  store i32 %438, ptr %14, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #8
  %439 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11upper_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %440 unwind label %477

440:                                              ; preds = %437
  %441 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %49, i32 0, i32 0
  store ptr %439, ptr %441, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #8
  %442 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  %443 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %51, i32 0, i32 0
  store ptr %442, ptr %443, align 8
  %444 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull align 8 dereferenceable(8) %51) #8
  br i1 %444, label %445, label %448

445:                                              ; preds = %440
  %446 = load i32, ptr %24, align 4, !tbaa !8
  %447 = add nsw i32 %446, 1
  br label %451

448:                                              ; preds = %440
  %449 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %49) #8
  %450 = load i32, ptr %449, align 4, !tbaa !8
  br label %451

451:                                              ; preds = %448, %445
  %452 = phi i32 [ %447, %445 ], [ %450, %448 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #8
  store i32 %452, ptr %50, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #8
  %453 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11lower_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %454 unwind label %481

454:                                              ; preds = %451
  %455 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %52, i32 0, i32 0
  store ptr %453, ptr %455, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #8
  %456 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  %457 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %54, i32 0, i32 0
  store ptr %456, ptr %457, align 8
  %458 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef nonnull align 8 dereferenceable(8) %54) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #8
  br i1 %458, label %459, label %485

459:                                              ; preds = %454
  %460 = load i32, ptr %24, align 4, !tbaa !8
  %461 = sub nsw i32 %460, 1
  store i32 %461, ptr %53, align 4, !tbaa !8
  br label %490

462:                                              ; preds = %408
  %463 = landingpad { ptr, i32 }
          cleanup
  %464 = extractvalue { ptr, i32 } %463, 0
  store ptr %464, ptr %7, align 8
  %465 = extractvalue { ptr, i32 } %463, 1
  store i32 %465, ptr %8, align 4
  br label %475

466:                                              ; preds = %430, %428, %426, %424, %421
  %467 = landingpad { ptr, i32 }
          cleanup
  %468 = extractvalue { ptr, i32 } %467, 0
  store ptr %468, ptr %7, align 8
  %469 = extractvalue { ptr, i32 } %467, 1
  store i32 %469, ptr %8, align 4
  br label %474

470:                                              ; preds = %431
  %471 = landingpad { ptr, i32 }
          cleanup
  %472 = extractvalue { ptr, i32 } %471, 0
  store ptr %472, ptr %7, align 8
  %473 = extractvalue { ptr, i32 } %471, 1
  store i32 %473, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #8
  br label %474

474:                                              ; preds = %470, %466
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #8
  br label %475

475:                                              ; preds = %474, %462
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  br label %476

476:                                              ; preds = %475, %399
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #8
  br label %526

477:                                              ; preds = %437
  %478 = landingpad { ptr, i32 }
          cleanup
  %479 = extractvalue { ptr, i32 } %478, 0
  store ptr %479, ptr %7, align 8
  %480 = extractvalue { ptr, i32 } %478, 1
  store i32 %480, ptr %8, align 4
  br label %525

481:                                              ; preds = %451
  %482 = landingpad { ptr, i32 }
          cleanup
  %483 = extractvalue { ptr, i32 } %482, 0
  store ptr %483, ptr %7, align 8
  %484 = extractvalue { ptr, i32 } %482, 1
  store i32 %484, ptr %8, align 4
  br label %524

485:                                              ; preds = %454
  %486 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %52, i32 noundef 0) #8
  %487 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %55, i32 0, i32 0
  store ptr %486, ptr %487, align 8
  %488 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %52) #8
  %489 = load i32, ptr %488, align 4, !tbaa !8
  store i32 %489, ptr %53, align 4, !tbaa !8
  br label %490

490:                                              ; preds = %485, %459
  %491 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @__FUNCTION__.main)
          to label %492 unwind label %515

492:                                              ; preds = %490
  %493 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %491, i8 noundef signext 32)
          to label %494 unwind label %515

494:                                              ; preds = %492
  %495 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %493, i32 noundef 171)
          to label %496 unwind label %515

496:                                              ; preds = %494
  %497 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %495, ptr noundef @.str)
          to label %498 unwind label %515

498:                                              ; preds = %496
  invoke void @_Z5traceIRiJS0_S0_S0_EEvPKcOT_DpOT0_(ptr noundef @.str.2, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %53, ptr noundef nonnull align 4 dereferenceable(4) %50)
          to label %499 unwind label %515

499:                                              ; preds = %498
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #8
  %500 = load i32, ptr %50, align 4, !tbaa !8
  %501 = load i32, ptr %53, align 4, !tbaa !8
  %502 = sub nsw i32 %500, %501
  %503 = sub nsw i32 %502, 1
  store i32 %503, ptr %56, align 4, !tbaa !8
  %504 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %56)
          to label %505 unwind label %519

505:                                              ; preds = %499
  %506 = load i32, ptr %504, align 4, !tbaa !8
  store i32 %506, ptr %14, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #8
  %507 = load i32, ptr %14, align 4, !tbaa !8
  %508 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %507)
          to label %509 unwind label %320

509:                                              ; preds = %505
  %510 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %508, i8 noundef signext 10)
          to label %511 unwind label %320

511:                                              ; preds = %509
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %512

512:                                              ; preds = %511
  %513 = load i32, ptr %21, align 4, !tbaa !8
  %514 = add nsw i32 %513, 1
  store i32 %514, ptr %21, align 4, !tbaa !8
  br label %220, !llvm.loop !24

515:                                              ; preds = %498, %496, %494, %492, %490
  %516 = landingpad { ptr, i32 }
          cleanup
  %517 = extractvalue { ptr, i32 } %516, 0
  store ptr %517, ptr %7, align 8
  %518 = extractvalue { ptr, i32 } %516, 1
  store i32 %518, ptr %8, align 4
  br label %523

519:                                              ; preds = %499
  %520 = landingpad { ptr, i32 }
          cleanup
  %521 = extractvalue { ptr, i32 } %520, 0
  store ptr %521, ptr %7, align 8
  %522 = extractvalue { ptr, i32 } %520, 1
  store i32 %522, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #8
  br label %523

523:                                              ; preds = %519, %515
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #8
  br label %524

524:                                              ; preds = %523, %481
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #8
  br label %525

525:                                              ; preds = %524, %477
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #8
  br label %526

526:                                              ; preds = %525, %476, %385, %360, %320
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %527

527:                                              ; preds = %526, %275
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  br label %528

528:                                              ; preds = %527, %271
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %531

529:                                              ; preds = %224
  store i32 0, ptr %1, align 4
  store i32 1, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #8
  %530 = load i32, ptr %1, align 4
  ret i32 %530

531:                                              ; preds = %528, %225, %216
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %532

532:                                              ; preds = %531, %146, %112
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #8
  br label %533

533:                                              ; preds = %532
  %534 = load ptr, ptr %7, align 8
  %535 = load i32, ptr %8, align 4
  %536 = insertvalue { ptr, i32 } poison, ptr %534, 0
  %537 = insertvalue { ptr, i32 } %536, i32 %535, 1
  resume { ptr, i32 } %537
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #2

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #0 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3setIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE(ptr noundef nonnull align 8 dereferenceable(48), ptr) #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 uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"long long", !10, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = !{i64 0, i64 8, !20}
!20 = !{!21, !21, i64 0}
!21 = !{!"any pointer", !10, i64 0}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@a = external dso_local global [300100 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@__FUNCTION__.main = external hidden unnamed_addr constant [5 x i8], align 1
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z3getix(i32 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z6updateix(i32 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::set", align 8
  %2 = alloca %"class.std::set", align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %8 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %16 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %17 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %18 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %19 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %20 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %21 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %22 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %23 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %24 = alloca i32, align 4
  %25 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %26 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %27 = alloca i32, align 4
  %28 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %29 = alloca i32, align 4
  %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 %"struct.std::_Rb_tree_const_iterator", align 8
  %34 = alloca i32, align 4
  %35 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %36 = alloca i32, align 4
  %37 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %38 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %39 = getelementptr i8, ptr %38, i64 -24
  %40 = load i64, ptr %39, align 8
  %41 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %40
  %42 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %41, ptr noundef null)
  %43 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %44 = getelementptr i8, ptr %43, i64 -24
  %45 = load i64, ptr %44, align 8
  %46 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %45
  %47 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %46, ptr noundef null)
  %48 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %49 = load i32, ptr @n, align 4, !tbaa !8
  %.not75 = icmp slt i32 %49, 1
  br i1 %.not75, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.lcssa74 = phi i32 [ %49, %0 ], [ %56, %.lr.ph ]
  store i64 1152921504606846976, ptr @a, align 16, !tbaa !11
  %50 = add nsw i32 %.lcssa74, 1
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [300100 x i64], ptr @a, i64 0, i64 %51
  store i64 1152921504606846976, ptr %52, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #7
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #7
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  %53 = load i32, ptr @n, align 4, !tbaa !8
  %.not5177 = icmp slt i32 %53, 1
  br i1 %.not5177, label %.preheader71, label %.lr.ph80

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %54 = getelementptr inbounds [300100 x i64], ptr @a, i64 0, i64 %indvars.iv
  %55 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %54)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %56 = load i32, ptr @n, align 4, !tbaa !8
  %57 = sext i32 %56 to i64
  %.not.not = icmp slt i64 %indvars.iv, %57
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !13

.preheader72:                                     ; preds = %72
  %58 = icmp sgt i32 %73, 0
  br i1 %58, label %.lr.ph83.preheader, label %.preheader71

.lr.ph83.preheader:                               ; preds = %.preheader72
  %59 = zext nneg i32 %73 to i64
  br label %.lr.ph83

.lr.ph80:                                         ; preds = %._crit_edge, %72
  %60 = phi i32 [ %73, %72 ], [ %53, %._crit_edge ]
  %indvars.iv103 = phi i64 [ %indvars.iv.next104, %72 ], [ 1, %._crit_edge ]
  %61 = getelementptr inbounds [300100 x i64], ptr @a, i64 0, i64 %indvars.iv103
  %62 = load i64, ptr %61, align 8, !tbaa !11
  %63 = add nsw i64 %indvars.iv103, -1
  %64 = getelementptr inbounds [300100 x i64], ptr @a, i64 0, i64 %63
  %65 = load i64, ptr %64, align 8, !tbaa !11
  %.not68 = icmp sgt i64 %62, %65
  br i1 %.not68, label %72, label %66

66:                                               ; preds = %.lr.ph80
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %67 = trunc nuw nsw i64 %63 to i32
  store i32 %67, ptr %3, align 4, !tbaa !8
  %68 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %69 unwind label %70

69:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  %.pre = load i32, ptr @n, align 4, !tbaa !8
  br label %72

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

72:                                               ; preds = %.lr.ph80, %69
  %73 = phi i32 [ %60, %.lr.ph80 ], [ %.pre, %69 ]
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %74 = sext i32 %73 to i64
  %.not51.not = icmp slt i64 %indvars.iv103, %74
  br i1 %.not51.not, label %.lr.ph80, label %.preheader72, !llvm.loop !15

.preheader71.loopexit:                            ; preds = %87
  %.pre112 = load i32, ptr @n, align 4, !tbaa !8
  br label %.preheader71

.preheader71:                                     ; preds = %._crit_edge, %.preheader71.loopexit, %.preheader72
  %75 = phi i32 [ %.pre112, %.preheader71.loopexit ], [ %73, %.preheader72 ], [ %53, %._crit_edge ]
  %.not5284 = icmp slt i32 %75, -1
  br i1 %.not5284, label %._crit_edge87, label %.lr.ph86

.lr.ph83:                                         ; preds = %.lr.ph83.preheader, %87
  %indvars.iv106 = phi i64 [ %59, %.lr.ph83.preheader ], [ %indvars.iv.next107, %87 ]
  %76 = getelementptr inbounds [300100 x i64], ptr @a, i64 0, i64 %indvars.iv106
  %77 = load i64, ptr %76, align 8, !tbaa !11
  %78 = add nuw nsw i64 %indvars.iv106, 1
  %79 = getelementptr inbounds [300100 x i64], ptr @a, i64 0, i64 %78
  %80 = load i64, ptr %79, align 8, !tbaa !11
  %.not67 = icmp sgt i64 %77, %80
  br i1 %.not67, label %87, label %81

81:                                               ; preds = %.lr.ph83
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %82 = trunc nuw i64 %78 to i32
  store i32 %82, ptr %4, align 4, !tbaa !8
  %83 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %84 unwind label %85

84:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br label %87

85:                                               ; preds = %81
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br label %344

87:                                               ; preds = %.lr.ph83, %84
  %indvars.iv.next107 = add nsw i64 %indvars.iv106, -1
  %88 = icmp sgt i64 %indvars.iv106, 1
  br i1 %88, label %.lr.ph83, label %.preheader71.loopexit, !llvm.loop !16

._crit_edge87:                                    ; preds = %.lr.ph86, %.preheader71
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 1, ptr %5, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %89 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  store ptr %89, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %90 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  store ptr %90, ptr %7, align 8
  %91 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br i1 %91, label %.lr.ph89, label %._crit_edge90

.lr.ph86:                                         ; preds = %.preheader71, %.lr.ph86
  %indvars.iv109 = phi i64 [ %indvars.iv.next110, %.lr.ph86 ], [ 0, %.preheader71 ]
  %92 = getelementptr inbounds [300100 x i64], ptr @a, i64 0, i64 %indvars.iv109
  %93 = load i64, ptr %92, align 8, !tbaa !11
  %94 = trunc nuw nsw i64 %indvars.iv109 to i32
  call void @_Z6updateix(i32 noundef %94, i64 noundef %93)
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %95 = load i64, ptr %92, align 8, !tbaa !11
  %96 = sub nsw i64 0, %95
  %97 = trunc nuw i64 %indvars.iv.next110 to i32
  call void @_Z6updateix(i32 noundef %97, i64 noundef %96)
  %98 = load i32, ptr @n, align 4, !tbaa !8
  %99 = sext i32 %98 to i64
  %.not52 = icmp sgt i64 %indvars.iv109, %99
  br i1 %.not52, label %._crit_edge87, label %.lr.ph86, !llvm.loop !17

._crit_edge90:                                    ; preds = %121, %._crit_edge87
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %100 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @m)
          to label %.preheader unwind label %125

.preheader:                                       ; preds = %._crit_edge90
  %101 = load i32, ptr @m, align 4, !tbaa !8
  %102 = icmp sgt i32 %101, 0
  br i1 %102, label %.lr.ph98, label %._crit_edge99

.lr.ph89:                                         ; preds = %._crit_edge87, %121
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %104 = load i32, ptr %103, align 4, !tbaa !8
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %9, align 4, !tbaa !8
  %106 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11upper_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %107 unwind label %119

107:                                              ; preds = %.lr.ph89
  store ptr %106, ptr %8, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %108 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  store ptr %108, ptr %10, align 8
  %109 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br i1 %109, label %110, label %121

110:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %112 = load i32, ptr %111, align 4, !tbaa !8
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %114 = load i32, ptr %113, align 4, !tbaa !8
  %115 = xor i32 %114, -1
  %116 = add i32 %112, %115
  store i32 %116, ptr %11, align 4, !tbaa !8
  %117 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %118 = load i32, ptr %117, align 4, !tbaa !8
  store i32 %118, ptr %5, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  br label %121

119:                                              ; preds = %.lr.ph89
  %120 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %343

121:                                              ; preds = %110, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %123 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  store ptr %123, ptr %7, align 8
  %124 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br i1 %124, label %.lr.ph89, label %._crit_edge90, !llvm.loop !18

._crit_edge99:                                    ; preds = %332, %.preheader
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #7
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #7
  ret i32 0

125:                                              ; preds = %._crit_edge90
  %126 = landingpad { ptr, i32 }
          cleanup
  br label %343

.lr.ph98:                                         ; preds = %.preheader, %332
  %.04997 = phi i32 [ %333, %332 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  %127 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %128 unwind label %161

128:                                              ; preds = %.lr.ph98
  %129 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %127, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %130 unwind label %161

130:                                              ; preds = %128
  %131 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %129, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %132 unwind label %161

132:                                              ; preds = %130
  %133 = load i32, ptr %12, align 4, !tbaa !8
  %134 = load i32, ptr %14, align 4, !tbaa !8
  %135 = sext i32 %134 to i64
  call void @_Z6updateix(i32 noundef %133, i64 noundef %135)
  %136 = load i32, ptr %13, align 4, !tbaa !8
  %137 = add nsw i32 %136, 1
  %138 = load i32, ptr %14, align 4, !tbaa !8
  %139 = sub nsw i32 0, %138
  %140 = sext i32 %139 to i64
  call void @_Z6updateix(i32 noundef %137, i64 noundef %140)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %141 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11lower_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %142 unwind label %163

142:                                              ; preds = %132
  store ptr %141, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #7
  %143 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  store ptr %143, ptr %16, align 8
  %144 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  br i1 %144, label %145, label %165

145:                                              ; preds = %142
  %146 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %15, i32 noundef 0) #7
  %147 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  %148 = load i32, ptr %147, align 4, !tbaa !8
  %149 = load i32, ptr %12, align 4, !tbaa !8
  %150 = add nsw i32 %149, -1
  %151 = icmp eq i32 %148, %150
  br i1 %151, label %152, label %165

152:                                              ; preds = %145
  %153 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  %154 = load i32, ptr %153, align 4, !tbaa !8
  %155 = call noundef i64 @_Z3getix(i32 noundef %154, i64 noundef 0)
  %156 = load i32, ptr %12, align 4, !tbaa !8
  %157 = call noundef i64 @_Z3getix(i32 noundef %156, i64 noundef 0)
  %158 = icmp slt i64 %155, %157
  br i1 %158, label %159, label %165

159:                                              ; preds = %152
  %.sroa.08.0.copyload = load ptr, ptr %15, align 8, !tbaa !19
  %160 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr %.sroa.08.0.copyload)
          to label %165 unwind label %163

161:                                              ; preds = %130, %128, %.lr.ph98
  %162 = landingpad { ptr, i32 }
          cleanup
  br label %342

163:                                              ; preds = %171, %159, %132
  %164 = landingpad { ptr, i32 }
          cleanup
  br label %341

165:                                              ; preds = %159, %145, %152, %142
  %166 = load i32, ptr %13, align 4, !tbaa !8
  %167 = call noundef i64 @_Z3getix(i32 noundef %166, i64 noundef 0)
  %168 = load i32, ptr %13, align 4, !tbaa !8
  %169 = add nsw i32 %168, 1
  %170 = call noundef i64 @_Z3getix(i32 noundef %169, i64 noundef 0)
  %.not53 = icmp slt i64 %167, %170
  br i1 %.not53, label %173, label %171

171:                                              ; preds = %165
  %172 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %173 unwind label %163

173:                                              ; preds = %171, %165
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %174 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11upper_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %175 unwind label %192

175:                                              ; preds = %173
  store ptr %174, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #7
  %176 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  store ptr %176, ptr %18, align 8
  %177 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #7
  br i1 %177, label %178, label %194

178:                                              ; preds = %175
  %179 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  %180 = load i32, ptr %179, align 4, !tbaa !8
  %181 = load i32, ptr %13, align 4, !tbaa !8
  %182 = add nsw i32 %181, 1
  %183 = icmp eq i32 %180, %182
  br i1 %183, label %184, label %194

184:                                              ; preds = %178
  %185 = call noundef i64 @_Z3getix(i32 noundef %181, i64 noundef 0)
  %186 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  %187 = load i32, ptr %186, align 4, !tbaa !8
  %188 = call noundef i64 @_Z3getix(i32 noundef %187, i64 noundef 0)
  %189 = icmp sgt i64 %185, %188
  br i1 %189, label %190, label %194

190:                                              ; preds = %184
  %.sroa.04.0.copyload = load ptr, ptr %17, align 8, !tbaa !19
  %191 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr %.sroa.04.0.copyload)
          to label %194 unwind label %192

192:                                              ; preds = %330, %322, %200, %190, %173
  %193 = landingpad { ptr, i32 }
          cleanup
  br label %340

194:                                              ; preds = %190, %178, %184, %175
  %195 = load i32, ptr %12, align 4, !tbaa !8
  %196 = call noundef i64 @_Z3getix(i32 noundef %195, i64 noundef 0)
  %197 = load i32, ptr %12, align 4, !tbaa !8
  %198 = add nsw i32 %197, -1
  %199 = call noundef i64 @_Z3getix(i32 noundef %198, i64 noundef 0)
  %.not54 = icmp slt i64 %196, %199
  br i1 %.not54, label %202, label %200

200:                                              ; preds = %194
  %201 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %202 unwind label %192

202:                                              ; preds = %200, %194
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #7
  %203 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  store ptr %203, ptr %19, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #7
  %204 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  store ptr %204, ptr %20, align 8
  %205 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #7
  br i1 %205, label %.lr.ph92, label %._crit_edge93

._crit_edge93:                                    ; preds = %218, %202
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #7
  %206 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  store ptr %206, ptr %21, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #7
  %207 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  store ptr %207, ptr %22, align 8
  %208 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  br i1 %208, label %.lr.ph95, label %._crit_edge96

.lr.ph92:                                         ; preds = %202, %218
  %209 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @__FUNCTION__.main)
          to label %210 unwind label %222

210:                                              ; preds = %.lr.ph92
  %211 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %209, i8 noundef signext 32)
          to label %212 unwind label %222

212:                                              ; preds = %210
  %213 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %211, i32 noundef 128)
          to label %214 unwind label %222

214:                                              ; preds = %212
  %215 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %213, ptr noundef nonnull @.str)
          to label %216 unwind label %222

216:                                              ; preds = %214
  %217 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  invoke void @_Z5traceIRKiEvPKcOT_(ptr noundef nonnull @.str.1, ptr noundef nonnull align 4 dereferenceable(4) %217)
          to label %218 unwind label %222

218:                                              ; preds = %216
  %219 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #7
  %220 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  store ptr %220, ptr %20, align 8
  %221 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #7
  br i1 %221, label %.lr.ph92, label %._crit_edge93, !llvm.loop !21

222:                                              ; preds = %216, %214, %212, %210, %.lr.ph92
  %223 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  br label %340

._crit_edge96:                                    ; preds = %234, %._crit_edge93
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #7
  %224 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11lower_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %240 unwind label %246

.lr.ph95:                                         ; preds = %._crit_edge93, %234
  %225 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @__FUNCTION__.main)
          to label %226 unwind label %238

226:                                              ; preds = %.lr.ph95
  %227 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %225, i8 noundef signext 32)
          to label %228 unwind label %238

228:                                              ; preds = %226
  %229 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %227, i32 noundef 131)
          to label %230 unwind label %238

230:                                              ; preds = %228
  %231 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %229, ptr noundef nonnull @.str)
          to label %232 unwind label %238

232:                                              ; preds = %230
  %233 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  invoke void @_Z5traceIRKiEvPKcOT_(ptr noundef nonnull @.str.1, ptr noundef nonnull align 4 dereferenceable(4) %233)
          to label %234 unwind label %238

234:                                              ; preds = %232
  %235 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #7
  %236 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  store ptr %236, ptr %22, align 8
  %237 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #7
  br i1 %237, label %.lr.ph95, label %._crit_edge96, !llvm.loop !22

238:                                              ; preds = %232, %230, %228, %226, %.lr.ph95
  %239 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #7
  br label %340

240:                                              ; preds = %._crit_edge96
  store ptr %224, ptr %23, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #7
  %241 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  store ptr %241, ptr %25, align 8
  %242 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #7
  br i1 %242, label %243, label %248

243:                                              ; preds = %240
  %244 = load i32, ptr %12, align 4, !tbaa !8
  %245 = add nsw i32 %244, -1
  br label %252

246:                                              ; preds = %._crit_edge96
  %247 = landingpad { ptr, i32 }
          cleanup
  br label %304

248:                                              ; preds = %240
  %249 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %23, i32 noundef 0) #7
  %250 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #7
  %251 = load i32, ptr %250, align 4, !tbaa !8
  br label %252

252:                                              ; preds = %248, %243
  %storemerge = phi i32 [ %251, %248 ], [ %245, %243 ]
  store i32 %storemerge, ptr %24, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #7
  %253 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11upper_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %254 unwind label %299

254:                                              ; preds = %252
  store ptr %253, ptr %26, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %27) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #7
  %255 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  store ptr %255, ptr %28, align 8
  %256 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %28) #7
  br i1 %256, label %257, label %260

257:                                              ; preds = %254
  %258 = load i32, ptr %12, align 4, !tbaa !8
  %259 = add nsw i32 %258, 1
  br label %263

260:                                              ; preds = %254
  %261 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %26) #7
  %262 = load i32, ptr %261, align 4, !tbaa !8
  br label %263

263:                                              ; preds = %260, %257
  %264 = phi i32 [ %259, %257 ], [ %262, %260 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #7
  store i32 %264, ptr %27, align 4, !tbaa !8
  %265 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @__FUNCTION__.main)
          to label %266 unwind label %301

266:                                              ; preds = %263
  %267 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %265, i8 noundef signext 32)
          to label %268 unwind label %301

268:                                              ; preds = %266
  %269 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %267, i32 noundef 149)
          to label %270 unwind label %301

270:                                              ; preds = %268
  %271 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %269, ptr noundef nonnull @.str)
          to label %272 unwind label %301

272:                                              ; preds = %270
  invoke void @_Z5traceIRiJS0_S0_S0_EEvPKcOT_DpOT0_(ptr noundef nonnull @.str.2, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %27)
          to label %273 unwind label %301

273:                                              ; preds = %272
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %29) #7
  %274 = load i32, ptr %27, align 4, !tbaa !8
  %275 = load i32, ptr %24, align 4, !tbaa !8
  %276 = xor i32 %275, -1
  %277 = add i32 %274, %276
  store i32 %277, ptr %29, align 4, !tbaa !8
  %278 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %29)
  %279 = load i32, ptr %278, align 4, !tbaa !8
  store i32 %279, ptr %5, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %30) #7
  %280 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11upper_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %281 unwind label %305

281:                                              ; preds = %273
  store ptr %280, ptr %30, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %31) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %32) #7
  %282 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  store ptr %282, ptr %32, align 8
  %283 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %32) #7
  br i1 %283, label %284, label %287

284:                                              ; preds = %281
  %285 = load i32, ptr %13, align 4, !tbaa !8
  %286 = add nsw i32 %285, 1
  br label %290

287:                                              ; preds = %281
  %288 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #7
  %289 = load i32, ptr %288, align 4, !tbaa !8
  br label %290

290:                                              ; preds = %287, %284
  %291 = phi i32 [ %286, %284 ], [ %289, %287 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %32) #7
  store i32 %291, ptr %31, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %33) #7
  %292 = invoke ptr @_ZNSt3setIiSt4lessIiESaIiEE11lower_boundERKi(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %293 unwind label %307

293:                                              ; preds = %290
  store ptr %292, ptr %33, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %34) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %35) #7
  %294 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  store ptr %294, ptr %35, align 8
  %295 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %35) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %35) #7
  br i1 %295, label %296, label %309

296:                                              ; preds = %293
  %297 = load i32, ptr %13, align 4, !tbaa !8
  %298 = add nsw i32 %297, -1
  br label %313

299:                                              ; preds = %252
  %300 = landingpad { ptr, i32 }
          cleanup
  br label %303

301:                                              ; preds = %272, %270, %268, %266, %263
  %302 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %27) #7
  br label %303

303:                                              ; preds = %301, %299
  %.pn = phi { ptr, i32 } [ %302, %301 ], [ %300, %299 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #7
  br label %304

304:                                              ; preds = %303, %246
  %.pn.pn = phi { ptr, i32 } [ %.pn, %303 ], [ %247, %246 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #7
  br label %340

305:                                              ; preds = %273
  %306 = landingpad { ptr, i32 }
          cleanup
  br label %339

307:                                              ; preds = %290
  %308 = landingpad { ptr, i32 }
          cleanup
  br label %338

309:                                              ; preds = %293
  %310 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %33, i32 noundef 0) #7
  %311 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #7
  %312 = load i32, ptr %311, align 4, !tbaa !8
  br label %313

313:                                              ; preds = %309, %296
  %storemerge57 = phi i32 [ %312, %309 ], [ %298, %296 ]
  store i32 %storemerge57, ptr %34, align 4, !tbaa !8
  %314 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @__FUNCTION__.main)
          to label %315 unwind label %336

315:                                              ; preds = %313
  %316 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %314, i8 noundef signext 32)
          to label %317 unwind label %336

317:                                              ; preds = %315
  %318 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %316, i32 noundef 171)
          to label %319 unwind label %336

319:                                              ; preds = %317
  %320 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %318, ptr noundef nonnull @.str)
          to label %321 unwind label %336

321:                                              ; preds = %319
  invoke void @_Z5traceIRiJS0_S0_S0_EEvPKcOT_DpOT0_(ptr noundef nonnull @.str.2, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %34, ptr noundef nonnull align 4 dereferenceable(4) %31)
          to label %322 unwind label %336

322:                                              ; preds = %321
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %36) #7
  %323 = load i32, ptr %31, align 4, !tbaa !8
  %324 = load i32, ptr %34, align 4, !tbaa !8
  %325 = xor i32 %324, -1
  %326 = add i32 %323, %325
  store i32 %326, ptr %36, align 4, !tbaa !8
  %327 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %36)
  %328 = load i32, ptr %327, align 4, !tbaa !8
  store i32 %328, ptr %5, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %36) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #7
  %329 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %328)
          to label %330 unwind label %192

330:                                              ; preds = %322
  %331 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %329, i8 noundef signext 10)
          to label %332 unwind label %192

332:                                              ; preds = %330
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  %333 = add nuw nsw i32 %.04997, 1
  %334 = load i32, ptr @m, align 4, !tbaa !8
  %335 = icmp slt i32 %333, %334
  br i1 %335, label %.lr.ph98, label %._crit_edge99, !llvm.loop !23

336:                                              ; preds = %321, %319, %317, %315, %313
  %337 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %34) #7
  br label %338

338:                                              ; preds = %336, %307
  %.pn58 = phi { ptr, i32 } [ %337, %336 ], [ %308, %307 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %31) #7
  br label %339

339:                                              ; preds = %338, %305
  %.pn58.pn = phi { ptr, i32 } [ %.pn58, %338 ], [ %306, %305 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #7
  br label %340

340:                                              ; preds = %339, %304, %238, %222, %192
  %.pn61 = phi { ptr, i32 } [ %223, %222 ], [ %239, %238 ], [ %193, %192 ], [ %.pn58.pn, %339 ], [ %.pn.pn, %304 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  br label %341

341:                                              ; preds = %340, %163
  %.pn61.pn = phi { ptr, i32 } [ %.pn61, %340 ], [ %164, %163 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br label %342

342:                                              ; preds = %341, %161
  %.pn61.pn.pn = phi { ptr, i32 } [ %.pn61.pn, %341 ], [ %162, %161 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  br label %343

343:                                              ; preds = %342, %125, %119
  %.pn65 = phi { ptr, i32 } [ %120, %119 ], [ %.pn61.pn.pn, %342 ], [ %126, %125 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  br label %344

344:                                              ; preds = %343, %85, %70
  %.pn69 = phi { ptr, i32 } [ %71, %70 ], [ %86, %85 ], [ %.pn65, %343 ]
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #7
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn69
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #6

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

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

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

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

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

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

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

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


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