; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/120 Division 2/Problem E (E)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::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 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.3" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@g = external dso_local global [500500 x %"class.std::vector"], align 16
@res = external dso_local global [500500 x %"class.std::vector"], align 16
@ok = external dso_local global [500500 x i32], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [1 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z4findi(i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5mergeii(i32 noundef, i32 noundef) #1

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::set", align 8
  %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 %"class.std::vector", align 8
  %12 = alloca %"class.std::vector", align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_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 %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca %"struct.std::pair", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %32 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %33 = alloca %"class.std::vector", align 8
  %34 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %35 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %36 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %37 = alloca %"class.__gnu_cxx::__normal_iterator.3", align 8
  %38 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %39 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %40 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %41 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %42 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %43 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %44 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %45 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %46 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %47 = alloca %"struct.std::pair", align 8
  %48 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %49 = alloca i32, align 4
  %50 = alloca i32, align 4
  %51 = alloca i32, align 4
  %52 = alloca i32, align 4
  %53 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %54 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %55 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store i32 0, ptr %1, align 4
  %56 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %70, %0
  %58 = load i32, ptr %4, align 4, !tbaa !5
  %59 = load i32, ptr @m, align 4, !tbaa !5
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %73

62:                                               ; preds = %57
  %63 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3)
  %64 = load i32, ptr %2, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [500500 x %"class.std::vector"], ptr @g, i64 0, i64 %65
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %66, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %67 = load i32, ptr %3, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [500500 x %"class.std::vector"], ptr @g, i64 0, i64 %68
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %69, ptr noundef nonnull align 4 dereferenceable(4) %2)
  br label %70

70:                                               ; preds = %62
  %71 = load i32, ptr %4, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %4, align 4, !tbaa !5
  br label %57, !llvm.loop !9

73:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 48, ptr %5) #6
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %90, %73
  %75 = load i32, ptr %6, align 4, !tbaa !5
  %76 = load i32, ptr @n, align 4, !tbaa !5
  %77 = icmp sle i32 %75, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %97

79:                                               ; preds = %74
  %80 = load i32, ptr %6, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [500500 x i32], ptr @ok, i64 0, i64 %81
  store i32 1, ptr %82, align 4, !tbaa !5
  %83 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %84 unwind label %93

84:                                               ; preds = %79
  %85 = getelementptr inbounds { ptr, i8 }, ptr %9, i32 0, i32 0
  %86 = extractvalue { ptr, i8 } %83, 0
  store ptr %86, ptr %85, align 8
  %87 = getelementptr inbounds { ptr, i8 }, ptr %9, i32 0, i32 1
  %88 = extractvalue { ptr, i8 } %83, 1
  store i8 %88, ptr %87, align 8
  %89 = load i32, ptr %6, align 4, !tbaa !5
  call void @_Z6createi(i32 noundef %89)
  br label %90

90:                                               ; preds = %84
  %91 = load i32, ptr %6, align 4, !tbaa !5
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %6, align 4, !tbaa !5
  br label %74, !llvm.loop !11

93:                                               ; preds = %79
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %7, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %472

97:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #6
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #6
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %361, %97
  %99 = load i32, ptr %13, align 4, !tbaa !5
  %100 = load i32, ptr @n, align 4, !tbaa !5
  %101 = icmp sle i32 %99, %100
  br i1 %101, label %103, label %102

102:                                              ; preds = %98
  store i32 8, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %365

103:                                              ; preds = %98
  %104 = load i32, ptr %13, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [500500 x i32], ptr @ok, i64 0, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %109, label %360

109:                                              ; preds = %103
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %110 = load i32, ptr %13, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [500500 x %"class.std::vector"], ptr @g, i64 0, i64 %111
  %113 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %112) #6
  %114 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %113, ptr %114, align 8
  br label %115

115:                                              ; preds = %139, %109
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %116 = load i32, ptr %13, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [500500 x %"class.std::vector"], ptr @g, i64 0, i64 %117
  %119 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %118) #6
  %120 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %119, ptr %120, align 8
  %121 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br i1 %121, label %123, label %122

122:                                              ; preds = %115
  store i32 11, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %142

123:                                              ; preds = %115
  %124 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  %125 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %124)
          to label %126 unwind label %134

126:                                              ; preds = %123
  %127 = icmp ne i64 %125, 0
  br i1 %127, label %128, label %138

128:                                              ; preds = %126
  %129 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %129)
          to label %130 unwind label %134

130:                                              ; preds = %128
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  %132 = invoke noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %131)
          to label %133 unwind label %134

133:                                              ; preds = %130
  br label %138

134:                                              ; preds = %130, %128, %123
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %7, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %364

138:                                              ; preds = %133, %126
  br label %139

139:                                              ; preds = %138
  %140 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %15, i32 noundef 0) #6
  %141 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %140, ptr %141, align 8
  br label %115, !llvm.loop !12

142:                                              ; preds = %122
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %143 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  %144 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %18, i32 0, i32 0
  store ptr %143, ptr %144, align 8
  br label %145

145:                                              ; preds = %161, %142
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %146 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  %147 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %19, i32 0, i32 0
  store ptr %146, ptr %147, align 8
  %148 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br i1 %148, label %150, label %149

149:                                              ; preds = %145
  store i32 14, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %168

150:                                              ; preds = %145
  %151 = load i32, ptr %13, align 4, !tbaa !5
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  %153 = load i32, ptr %152, align 4, !tbaa !5
  invoke void @_Z5mergeii(i32 noundef %151, i32 noundef %153)
          to label %154 unwind label %164

154:                                              ; preds = %150
  %155 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 4 dereferenceable(4) %155)
          to label %156 unwind label %164

156:                                              ; preds = %154
  %157 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [500500 x i32], ptr @ok, i64 0, i64 %159
  store i32 0, ptr %160, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %156
  %162 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEi(ptr noundef nonnull align 8 dereferenceable(8) %18, i32 noundef 0) #6
  %163 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %20, i32 0, i32 0
  store ptr %162, ptr %163, align 8
  br label %145, !llvm.loop !13

164:                                              ; preds = %154, %150
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %7, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %364

168:                                              ; preds = %149
  %169 = load i32, ptr %10, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %171 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  %172 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %171, ptr %172, align 8
  br label %173

173:                                              ; preds = %186, %168
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %174 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  %175 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %174, ptr %175, align 8
  %176 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br i1 %176, label %178, label %177

177:                                              ; preds = %173
  store i32 17, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %193

178:                                              ; preds = %173
  %179 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  %180 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %179)
          to label %181 unwind label %189

181:                                              ; preds = %178
  %182 = getelementptr inbounds { ptr, i8 }, ptr %23, i32 0, i32 0
  %183 = extractvalue { ptr, i8 } %180, 0
  store ptr %183, ptr %182, align 8
  %184 = getelementptr inbounds { ptr, i8 }, ptr %23, i32 0, i32 1
  %185 = extractvalue { ptr, i8 } %180, 1
  store i8 %185, ptr %184, align 8
  br label %186

186:                                              ; preds = %181
  %187 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %21, i32 noundef 0) #6
  %188 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %187, ptr %188, align 8
  br label %173, !llvm.loop !14

189:                                              ; preds = %178
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %7, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %364

193:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %194 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %195 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %194, ptr %195, align 8
  br label %196

196:                                              ; preds = %205, %193
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %197 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %198 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %197, ptr %198, align 8
  %199 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br i1 %199, label %201, label %200

200:                                              ; preds = %196
  store i32 20, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %212

201:                                              ; preds = %196
  %202 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #6
  %203 = invoke noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %202)
          to label %204 unwind label %208

204:                                              ; preds = %201
  br label %205

205:                                              ; preds = %204
  %206 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %25, i32 noundef 0) #6
  %207 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  store ptr %206, ptr %207, align 8
  br label %196, !llvm.loop !15

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

212:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  store i32 1, ptr %28, align 4, !tbaa !5
  br label %213

213:                                              ; preds = %354, %212
  %214 = load i32, ptr %28, align 4, !tbaa !5
  %215 = sext i32 %214 to i64
  %216 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %217 = icmp ult i64 %215, %216
  br i1 %217, label %219, label %218

218:                                              ; preds = %213
  store i32 23, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  br label %359

219:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  %220 = load i32, ptr %28, align 4, !tbaa !5
  %221 = sext i32 %220 to i64
  %222 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %221) #6
  %223 = load i32, ptr %222, align 4, !tbaa !5
  store i32 %223, ptr %29, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %224 = load i32, ptr %29, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [500500 x %"class.std::vector"], ptr @g, i64 0, i64 %225
  %227 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %226) #6
  %228 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %30, i32 0, i32 0
  store ptr %227, ptr %228, align 8
  br label %229

229:                                              ; preds = %253, %219
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %230 = load i32, ptr %29, align 4, !tbaa !5
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds [500500 x %"class.std::vector"], ptr @g, i64 0, i64 %231
  %233 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %232) #6
  %234 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %31, i32 0, i32 0
  store ptr %233, ptr %234, align 8
  %235 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br i1 %235, label %237, label %236

236:                                              ; preds = %229
  store i32 26, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %256

237:                                              ; preds = %229
  %238 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #6
  %239 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %238)
          to label %240 unwind label %248

240:                                              ; preds = %237
  %241 = icmp ne i64 %239, 0
  br i1 %241, label %242, label %252

242:                                              ; preds = %240
  %243 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #6
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %243)
          to label %244 unwind label %248

244:                                              ; preds = %242
  %245 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #6
  %246 = invoke noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %245)
          to label %247 unwind label %248

247:                                              ; preds = %244
  br label %252

248:                                              ; preds = %244, %242, %237
  %249 = landingpad { ptr, i32 }
          cleanup
  %250 = extractvalue { ptr, i32 } %249, 0
  store ptr %250, ptr %7, align 8
  %251 = extractvalue { ptr, i32 } %249, 1
  store i32 %251, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %358

252:                                              ; preds = %247, %240
  br label %253

253:                                              ; preds = %252
  %254 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %30, i32 noundef 0) #6
  %255 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %32, i32 0, i32 0
  store ptr %254, ptr %255, align 8
  br label %229, !llvm.loop !16

256:                                              ; preds = %236
  call void @llvm.lifetime.start.p0(i64 24, ptr %33) #6
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  %257 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  %258 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %34, i32 0, i32 0
  store ptr %257, ptr %258, align 8
  br label %259

259:                                              ; preds = %289, %256
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  %260 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  %261 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %35, i32 0, i32 0
  store ptr %260, ptr %261, align 8
  %262 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 8 dereferenceable(8) %35) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  br i1 %262, label %264, label %263

263:                                              ; preds = %259
  store i32 29, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  br label %292

264:                                              ; preds = %259
  %265 = load i32, ptr %29, align 4, !tbaa !5
  %266 = invoke noundef i32 @_Z4findi(i32 noundef %265)
          to label %267 unwind label %284

267:                                              ; preds = %264
  %268 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #6
  %269 = load i32, ptr %268, align 4, !tbaa !5
  %270 = invoke noundef i32 @_Z4findi(i32 noundef %269)
          to label %271 unwind label %284

271:                                              ; preds = %267
  %272 = icmp ne i32 %266, %270
  br i1 %272, label %273, label %288

273:                                              ; preds = %271
  %274 = load i32, ptr %29, align 4, !tbaa !5
  %275 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #6
  %276 = load i32, ptr %275, align 4, !tbaa !5
  invoke void @_Z5mergeii(i32 noundef %274, i32 noundef %276)
          to label %277 unwind label %284

277:                                              ; preds = %273
  %278 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #6
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull align 4 dereferenceable(4) %278)
          to label %279 unwind label %284

279:                                              ; preds = %277
  %280 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #6
  %281 = load i32, ptr %280, align 4, !tbaa !5
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds [500500 x i32], ptr @ok, i64 0, i64 %282
  store i32 0, ptr %283, align 4, !tbaa !5
  br label %288

284:                                              ; preds = %277, %273, %267, %264
  %285 = landingpad { ptr, i32 }
          cleanup
  %286 = extractvalue { ptr, i32 } %285, 0
  store ptr %286, ptr %7, align 8
  %287 = extractvalue { ptr, i32 } %285, 1
  store i32 %287, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  br label %357

288:                                              ; preds = %279, %271
  br label %289

289:                                              ; preds = %288
  %290 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEi(ptr noundef nonnull align 8 dereferenceable(8) %34, i32 noundef 0) #6
  %291 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %36, i32 0, i32 0
  store ptr %290, ptr %291, align 8
  br label %259, !llvm.loop !17

292:                                              ; preds = %263
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #6
  %293 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %294 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %38, i32 0, i32 0
  store ptr %293, ptr %294, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(8) %38) #6
  %295 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %33) #6
  %296 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %39, i32 0, i32 0
  store ptr %295, ptr %296, align 8
  %297 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %33) #6
  %298 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %40, i32 0, i32 0
  store ptr %297, ptr %298, align 8
  %299 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.3", ptr %37, i32 0, i32 0
  %300 = load ptr, ptr %299, align 8
  %301 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %39, i32 0, i32 0
  %302 = load ptr, ptr %301, align 8
  %303 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %40, i32 0, i32 0
  %304 = load ptr, ptr %303, align 8
  %305 = invoke ptr @_ZNSt6vectorIiSaIiEE6insertIN9__gnu_cxx17__normal_iteratorIPiS1_EEvEES6_NS4_IPKiS1_EET_SA_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr %300, ptr %302, ptr %304)
          to label %306 unwind label %315

306:                                              ; preds = %292
  %307 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %41, i32 0, i32 0
  store ptr %305, ptr %307, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #6
  %308 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %33) #6
  %309 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %42, i32 0, i32 0
  store ptr %308, ptr %309, align 8
  br label %310

310:                                              ; preds = %323, %306
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #6
  %311 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %33) #6
  %312 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %43, i32 0, i32 0
  store ptr %311, ptr %312, align 8
  %313 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull align 8 dereferenceable(8) %43) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #6
  br i1 %313, label %319, label %314

314:                                              ; preds = %310
  store i32 32, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #6
  br label %330

315:                                              ; preds = %292
  %316 = landingpad { ptr, i32 }
          cleanup
  %317 = extractvalue { ptr, i32 } %316, 0
  store ptr %317, ptr %7, align 8
  %318 = extractvalue { ptr, i32 } %316, 1
  store i32 %318, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #6
  br label %357

319:                                              ; preds = %310
  %320 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %42) #6
  %321 = invoke noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %320)
          to label %322 unwind label %326

322:                                              ; preds = %319
  br label %323

323:                                              ; preds = %322
  %324 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %42, i32 noundef 0) #6
  %325 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %44, i32 0, i32 0
  store ptr %324, ptr %325, align 8
  br label %310, !llvm.loop !18

326:                                              ; preds = %319
  %327 = landingpad { ptr, i32 }
          cleanup
  %328 = extractvalue { ptr, i32 } %327, 0
  store ptr %328, ptr %7, align 8
  %329 = extractvalue { ptr, i32 } %327, 1
  store i32 %329, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #6
  br label %357

330:                                              ; preds = %314
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #6
  %331 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  %332 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %45, i32 0, i32 0
  store ptr %331, ptr %332, align 8
  br label %333

333:                                              ; preds = %346, %330
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #6
  %334 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  %335 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %46, i32 0, i32 0
  store ptr %334, ptr %335, align 8
  %336 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull align 8 dereferenceable(8) %46) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #6
  br i1 %336, label %338, label %337

337:                                              ; preds = %333
  store i32 35, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #6
  br label %353

338:                                              ; preds = %333
  %339 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %45) #6
  %340 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %339)
          to label %341 unwind label %349

341:                                              ; preds = %338
  %342 = getelementptr inbounds { ptr, i8 }, ptr %47, i32 0, i32 0
  %343 = extractvalue { ptr, i8 } %340, 0
  store ptr %343, ptr %342, align 8
  %344 = getelementptr inbounds { ptr, i8 }, ptr %47, i32 0, i32 1
  %345 = extractvalue { ptr, i8 } %340, 1
  store i8 %345, ptr %344, align 8
  br label %346

346:                                              ; preds = %341
  %347 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %45, i32 noundef 0) #6
  %348 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %48, i32 0, i32 0
  store ptr %347, ptr %348, align 8
  br label %333, !llvm.loop !19

349:                                              ; preds = %338
  %350 = landingpad { ptr, i32 }
          cleanup
  %351 = extractvalue { ptr, i32 } %350, 0
  store ptr %351, ptr %7, align 8
  %352 = extractvalue { ptr, i32 } %350, 1
  store i32 %352, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #6
  br label %357

353:                                              ; preds = %337
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %354

354:                                              ; preds = %353
  %355 = load i32, ptr %28, align 4, !tbaa !5
  %356 = add nsw i32 %355, 1
  store i32 %356, ptr %28, align 4, !tbaa !5
  br label %213, !llvm.loop !20

357:                                              ; preds = %349, %326, %315, %284
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %33) #6
  br label %358

358:                                              ; preds = %357, %248
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  br label %364

359:                                              ; preds = %218
  br label %360

360:                                              ; preds = %359, %103
  br label %361

361:                                              ; preds = %360
  %362 = load i32, ptr %13, align 4, !tbaa !5
  %363 = add nsw i32 %362, 1
  store i32 %363, ptr %13, align 4, !tbaa !5
  br label %98, !llvm.loop !21

364:                                              ; preds = %358, %208, %189, %164, %134
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %471

365:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #6
  store i32 1, ptr %49, align 4, !tbaa !5
  br label %366

366:                                              ; preds = %378, %365
  %367 = load i32, ptr %49, align 4, !tbaa !5
  %368 = load i32, ptr @n, align 4, !tbaa !5
  %369 = icmp sle i32 %367, %368
  br i1 %369, label %371, label %370

370:                                              ; preds = %366
  store i32 38, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #6
  br label %385

371:                                              ; preds = %366
  %372 = load i32, ptr %49, align 4, !tbaa !5
  %373 = invoke noundef i32 @_Z4findi(i32 noundef %372)
          to label %374 unwind label %381

374:                                              ; preds = %371
  %375 = sext i32 %373 to i64
  %376 = getelementptr inbounds [500500 x %"class.std::vector"], ptr @res, i64 0, i64 %375
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %376, ptr noundef nonnull align 4 dereferenceable(4) %49)
          to label %377 unwind label %381

377:                                              ; preds = %374
  br label %378

378:                                              ; preds = %377
  %379 = load i32, ptr %49, align 4, !tbaa !5
  %380 = add nsw i32 %379, 1
  store i32 %380, ptr %49, align 4, !tbaa !5
  br label %366, !llvm.loop !22

381:                                              ; preds = %374, %371
  %382 = landingpad { ptr, i32 }
          cleanup
  %383 = extractvalue { ptr, i32 } %382, 0
  store ptr %383, ptr %7, align 8
  %384 = extractvalue { ptr, i32 } %382, 1
  store i32 %384, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #6
  br label %471

385:                                              ; preds = %370
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #6
  store i32 0, ptr %50, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #6
  store i32 1, ptr %51, align 4, !tbaa !5
  br label %386

386:                                              ; preds = %401, %385
  %387 = load i32, ptr %51, align 4, !tbaa !5
  %388 = load i32, ptr @n, align 4, !tbaa !5
  %389 = icmp sle i32 %387, %388
  br i1 %389, label %391, label %390

390:                                              ; preds = %386
  store i32 41, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #6
  br label %404

391:                                              ; preds = %386
  %392 = load i32, ptr %51, align 4, !tbaa !5
  %393 = sext i32 %392 to i64
  %394 = getelementptr inbounds [500500 x %"class.std::vector"], ptr @res, i64 0, i64 %393
  %395 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %394) #6
  %396 = icmp ugt i64 %395, 0
  br i1 %396, label %397, label %400

397:                                              ; preds = %391
  %398 = load i32, ptr %50, align 4, !tbaa !5
  %399 = add nsw i32 %398, 1
  store i32 %399, ptr %50, align 4, !tbaa !5
  br label %400

400:                                              ; preds = %397, %391
  br label %401

401:                                              ; preds = %400
  %402 = load i32, ptr %51, align 4, !tbaa !5
  %403 = add nsw i32 %402, 1
  store i32 %403, ptr %51, align 4, !tbaa !5
  br label %386, !llvm.loop !23

404:                                              ; preds = %390
  %405 = load i32, ptr %50, align 4, !tbaa !5
  %406 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %405)
          to label %407 unwind label %413

407:                                              ; preds = %404
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #6
  store i32 1, ptr %52, align 4, !tbaa !5
  br label %408

408:                                              ; preds = %464, %407
  %409 = load i32, ptr %52, align 4, !tbaa !5
  %410 = load i32, ptr @n, align 4, !tbaa !5
  %411 = icmp sle i32 %409, %410
  br i1 %411, label %417, label %412

412:                                              ; preds = %408
  store i32 44, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #6
  br label %468

413:                                              ; preds = %404
  %414 = landingpad { ptr, i32 }
          cleanup
  %415 = extractvalue { ptr, i32 } %414, 0
  store ptr %415, ptr %7, align 8
  %416 = extractvalue { ptr, i32 } %414, 1
  store i32 %416, ptr %8, align 4
  br label %470

417:                                              ; preds = %408
  %418 = load i32, ptr %52, align 4, !tbaa !5
  %419 = sext i32 %418 to i64
  %420 = getelementptr inbounds [500500 x %"class.std::vector"], ptr @res, i64 0, i64 %419
  %421 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %420) #6
  %422 = icmp ugt i64 %421, 0
  br i1 %422, label %423, label %463

423:                                              ; preds = %417
  %424 = load i32, ptr %52, align 4, !tbaa !5
  %425 = sext i32 %424 to i64
  %426 = getelementptr inbounds [500500 x %"class.std::vector"], ptr @res, i64 0, i64 %425
  %427 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %426) #6
  %428 = trunc i64 %427 to i32
  %429 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %428)
          to label %430 unwind label %444

430:                                              ; preds = %423
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #6
  %431 = load i32, ptr %52, align 4, !tbaa !5
  %432 = sext i32 %431 to i64
  %433 = getelementptr inbounds [500500 x %"class.std::vector"], ptr @res, i64 0, i64 %432
  %434 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %433) #6
  %435 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %53, i32 0, i32 0
  store ptr %434, ptr %435, align 8
  br label %436

436:                                              ; preds = %453, %430
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #6
  %437 = load i32, ptr %52, align 4, !tbaa !5
  %438 = sext i32 %437 to i64
  %439 = getelementptr inbounds [500500 x %"class.std::vector"], ptr @res, i64 0, i64 %438
  %440 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %439) #6
  %441 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %54, i32 0, i32 0
  store ptr %440, ptr %441, align 8
  %442 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull align 8 dereferenceable(8) %54) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #6
  br i1 %442, label %448, label %443

443:                                              ; preds = %436
  store i32 47, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #6
  br label %460

444:                                              ; preds = %460, %423
  %445 = landingpad { ptr, i32 }
          cleanup
  %446 = extractvalue { ptr, i32 } %445, 0
  store ptr %446, ptr %7, align 8
  %447 = extractvalue { ptr, i32 } %445, 1
  store i32 %447, ptr %8, align 4
  br label %467

448:                                              ; preds = %436
  %449 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %53) #6
  %450 = load i32, ptr %449, align 4, !tbaa !5
  %451 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %450)
          to label %452 unwind label %456

452:                                              ; preds = %448
  br label %453

453:                                              ; preds = %452
  %454 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %53, i32 noundef 0) #6
  %455 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %55, i32 0, i32 0
  store ptr %454, ptr %455, align 8
  br label %436, !llvm.loop !24

456:                                              ; preds = %448
  %457 = landingpad { ptr, i32 }
          cleanup
  %458 = extractvalue { ptr, i32 } %457, 0
  store ptr %458, ptr %7, align 8
  %459 = extractvalue { ptr, i32 } %457, 1
  store i32 %459, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #6
  br label %467

460:                                              ; preds = %443
  %461 = invoke i32 @puts(ptr noundef @.str.6)
          to label %462 unwind label %444

462:                                              ; preds = %460
  br label %463

463:                                              ; preds = %462, %417
  br label %464

464:                                              ; preds = %463
  %465 = load i32, ptr %52, align 4, !tbaa !5
  %466 = add nsw i32 %465, 1
  store i32 %466, ptr %52, align 4, !tbaa !5
  br label %408, !llvm.loop !25

467:                                              ; preds = %456, %444
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #6
  br label %470

468:                                              ; preds = %412
  store i32 0, ptr %1, align 4
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %469 = load i32, ptr %1, align 4
  ret i32 %469

470:                                              ; preds = %467, %413
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #6
  br label %471

471:                                              ; preds = %470, %381, %364
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %472

472:                                              ; preds = %471, %93
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %473

473:                                              ; preds = %472
  %474 = load ptr, ptr %7, align 8
  %475 = load i32, ptr %8, align 4
  %476 = insertvalue { ptr, i32 } poison, ptr %474, 0
  %477 = insertvalue { ptr, i32 } %476, i32 %475, 1
  resume { ptr, i32 } %477
}

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

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

; 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 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

; 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 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: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #0 align 2

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

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

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

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

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

declare i32 @puts(ptr noundef) #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 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::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 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.3" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@g = external dso_local global [500500 x %"class.std::vector"], align 16
@res = external dso_local global [500500 x %"class.std::vector"], align 16
@ok = external dso_local local_unnamed_addr global [500500 x i32], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [1 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z4findi(i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5mergeii(i32 noundef, i32 noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::set", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %10 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.std::vector", align 8
  %18 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %19 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.3", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca i32, align 4
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %30 = load i32, ptr @m, align 4, !tbaa !5
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #6
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  store i32 1, ptr %4, align 4, !tbaa !5
  %32 = load i32, ptr @n, align 4, !tbaa !5
  %.not82 = icmp slt i32 %32, 1
  br i1 %.not82, label %._crit_edge86, label %.lr.ph85

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.04781 = phi i32 [ %40, %.lr.ph ], [ 0, %0 ]
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %34 = load i32, ptr %1, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [500500 x %"class.std::vector"], ptr @g, i64 0, i64 %35
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %36, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [500500 x %"class.std::vector"], ptr @g, i64 0, i64 %38
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %40 = add nuw nsw i32 %.04781, 1
  %41 = load i32, ptr @m, align 4, !tbaa !5
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge86:                                    ; preds = %47, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %43 = load i32, ptr @n, align 4, !tbaa !5
  %.not62114 = icmp slt i32 %43, 1
  br i1 %.not62114, label %._crit_edge120.thread, label %.lr.ph119

._crit_edge120.thread:                            ; preds = %._crit_edge86
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #6
  br label %._crit_edge125.thread

.lr.ph85:                                         ; preds = %._crit_edge, %47
  %storemerge83 = phi i32 [ %50, %47 ], [ 1, %._crit_edge ]
  %44 = sext i32 %storemerge83 to i64
  %45 = getelementptr inbounds [500500 x i32], ptr @ok, i64 0, i64 %44
  store i32 1, ptr %45, align 4, !tbaa !5
  %46 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %47 unwind label %52

47:                                               ; preds = %.lr.ph85
  %48 = load i32, ptr %4, align 4, !tbaa !5
  call void @_Z6createi(i32 noundef %48)
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %4, align 4, !tbaa !5
  %51 = load i32, ptr @n, align 4, !tbaa !5
  %.not.not = icmp slt i32 %49, %51
  br i1 %.not.not, label %.lr.ph85, label %._crit_edge86, !llvm.loop !11

52:                                               ; preds = %.lr.ph85
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  br label %237

._crit_edge120:                                   ; preds = %.loopexit
  %54 = icmp slt i32 %197, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #6
  store i32 1, ptr %26, align 4, !tbaa !5
  br i1 %54, label %._crit_edge125.thread, label %.lr.ph124

.lr.ph119:                                        ; preds = %._crit_edge86, %.loopexit
  %indvars.iv141 = phi i64 [ %indvars.iv.next142, %.loopexit ], [ 1, %._crit_edge86 ]
  %55 = getelementptr inbounds [500500 x i32], ptr @ok, i64 0, i64 %indvars.iv141
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %.not69 = icmp eq i32 %56, 0
  br i1 %.not69, label %.loopexit, label %57

57:                                               ; preds = %.lr.ph119
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %58 = getelementptr inbounds [500500 x %"class.std::vector"], ptr @g, i64 0, i64 %indvars.iv141
  %59 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %58) #6
  store ptr %59, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %60 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %58) #6
  store ptr %60, ptr %8, align 8
  %61 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br i1 %61, label %.lr.ph88, label %._crit_edge89

._crit_edge89:                                    ; preds = %76, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %62 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  store ptr %62, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %63 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  store ptr %63, ptr %10, align 8
  %64 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br i1 %64, label %.lr.ph91.preheader, label %._crit_edge92

.lr.ph91.preheader:                               ; preds = %._crit_edge89
  %65 = trunc nuw nsw i64 %indvars.iv141 to i32
  br label %.lr.ph91

.lr.ph88:                                         ; preds = %57, %76
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %67 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %66)
          to label %68 unwind label %74

68:                                               ; preds = %.lr.ph88
  %.not75 = icmp eq i64 %67, 0
  br i1 %.not75, label %76, label %69

69:                                               ; preds = %68
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %70)
          to label %71 unwind label %74

71:                                               ; preds = %69
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %73 = invoke noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %72)
          to label %76 unwind label %74

74:                                               ; preds = %71, %69, %.lr.ph88
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %236

76:                                               ; preds = %68, %71
  %77 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef 0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %78 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %58) #6
  store ptr %78, ptr %8, align 8
  %79 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br i1 %79, label %.lr.ph88, label %._crit_edge89, !llvm.loop !12

._crit_edge92:                                    ; preds = %87, %._crit_edge89
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %80 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  store ptr %80, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  %81 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  store ptr %81, ptr %12, align 8
  %82 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  br i1 %82, label %.lr.ph94, label %._crit_edge95

.lr.ph91:                                         ; preds = %.lr.ph91.preheader, %87
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %84 = load i32, ptr %83, align 4, !tbaa !5
  invoke void @_Z5mergeii(i32 noundef %65, i32 noundef %84)
          to label %85 unwind label %95

85:                                               ; preds = %.lr.ph91
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(4) %86)
          to label %87 unwind label %95

87:                                               ; preds = %85
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [500500 x i32], ptr @ok, i64 0, i64 %90
  store i32 0, ptr %91, align 4, !tbaa !5
  %92 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEi(ptr noundef nonnull align 8 dereferenceable(8) %9, i32 noundef 0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %93 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  store ptr %93, ptr %10, align 8
  %94 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br i1 %94, label %.lr.ph91, label %._crit_edge92, !llvm.loop !13

95:                                               ; preds = %85, %.lr.ph91
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %236

._crit_edge95:                                    ; preds = %102, %._crit_edge92
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %97 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  store ptr %97, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  %98 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  store ptr %98, ptr %14, align 8
  %99 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  br i1 %99, label %.lr.ph97, label %._crit_edge98

.lr.ph94:                                         ; preds = %._crit_edge92, %102
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  %101 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %100)
          to label %102 unwind label %106

102:                                              ; preds = %.lr.ph94
  %103 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  %104 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  store ptr %104, ptr %12, align 8
  %105 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  br i1 %105, label %.lr.ph94, label %._crit_edge95, !llvm.loop !14

106:                                              ; preds = %.lr.ph94
  %107 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br label %236

._crit_edge98:                                    ; preds = %112, %._crit_edge95
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  %108 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %109 = icmp ugt i64 %108, 1
  br i1 %109, label %.lr.ph113, label %.loopexit

.lr.ph97:                                         ; preds = %._crit_edge95, %112
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  %111 = invoke noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %110)
          to label %112 unwind label %116

112:                                              ; preds = %.lr.ph97
  %113 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %13, i32 noundef 0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  %114 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  store ptr %114, ptr %14, align 8
  %115 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  br i1 %115, label %.lr.ph97, label %._crit_edge98, !llvm.loop !15

116:                                              ; preds = %.lr.ph97
  %117 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  br label %236

.lr.ph113:                                        ; preds = %._crit_edge98, %._crit_edge110
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge110 ], [ 1, %._crit_edge98 ]
  %118 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv) #6
  %119 = load i32, ptr %118, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #6
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [500500 x %"class.std::vector"], ptr @g, i64 0, i64 %120
  %122 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %121) #6
  store ptr %122, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #6
  %123 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %121) #6
  store ptr %123, ptr %16, align 8
  %124 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  br i1 %124, label %.lr.ph100, label %._crit_edge101

._crit_edge101:                                   ; preds = %138, %.lr.ph113
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %17) #6
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #6
  %125 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  store ptr %125, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #6
  %126 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  store ptr %126, ptr %19, align 8
  %127 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  br i1 %127, label %.lr.ph103, label %._crit_edge104

.lr.ph100:                                        ; preds = %.lr.ph113, %138
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  %129 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %128)
          to label %130 unwind label %136

130:                                              ; preds = %.lr.ph100
  %.not72 = icmp eq i64 %129, 0
  br i1 %.not72, label %138, label %131

131:                                              ; preds = %130
  %132 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %132)
          to label %133 unwind label %136

133:                                              ; preds = %131
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  %135 = invoke noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %134)
          to label %138 unwind label %136

136:                                              ; preds = %133, %131, %.lr.ph100
  %137 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  br label %236

138:                                              ; preds = %130, %133
  %139 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %15, i32 noundef 0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #6
  %140 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %121) #6
  store ptr %140, ptr %16, align 8
  %141 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  br i1 %141, label %.lr.ph100, label %._crit_edge101, !llvm.loop !16

._crit_edge104:                                   ; preds = %165, %._crit_edge101
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #6
  %142 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  store ptr %142, ptr %21, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEC2IPivEERKNS0_IT_S5_EE(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  %143 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  %144 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  %145 = load ptr, ptr %20, align 8
  %146 = invoke ptr @_ZNSt6vectorIiSaIiEE6insertIN9__gnu_cxx17__normal_iteratorIPiS1_EEvEES6_NS4_IPKiS1_EET_SA_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr %145, ptr %143, ptr %144)
          to label %169 unwind label %176

.lr.ph103:                                        ; preds = %._crit_edge101, %165
  %147 = invoke noundef i32 @_Z4findi(i32 noundef %119)
          to label %148 unwind label %163

148:                                              ; preds = %.lr.ph103
  %149 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  %150 = load i32, ptr %149, align 4, !tbaa !5
  %151 = invoke noundef i32 @_Z4findi(i32 noundef %150)
          to label %152 unwind label %163

152:                                              ; preds = %148
  %.not70 = icmp eq i32 %147, %151
  br i1 %.not70, label %165, label %153

153:                                              ; preds = %152
  %154 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  %155 = load i32, ptr %154, align 4, !tbaa !5
  invoke void @_Z5mergeii(i32 noundef %119, i32 noundef %155)
          to label %156 unwind label %163

156:                                              ; preds = %153
  %157 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 4 dereferenceable(4) %157)
          to label %158 unwind label %163

158:                                              ; preds = %156
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  %160 = load i32, ptr %159, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [500500 x i32], ptr @ok, i64 0, i64 %161
  store i32 0, ptr %162, align 4, !tbaa !5
  br label %165

163:                                              ; preds = %156, %153, %148, %.lr.ph103
  %164 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  br label %196

165:                                              ; preds = %152, %158
  %166 = call ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEi(ptr noundef nonnull align 8 dereferenceable(8) %18, i32 noundef 0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #6
  %167 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  store ptr %167, ptr %19, align 8
  %168 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  br i1 %168, label %.lr.ph103, label %._crit_edge104, !llvm.loop !17

169:                                              ; preds = %._crit_edge104
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #6
  %170 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  store ptr %170, ptr %22, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #6
  %171 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  store ptr %171, ptr %23, align 8
  %172 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #6
  br i1 %172, label %.lr.ph106, label %._crit_edge107

._crit_edge107:                                   ; preds = %180, %169
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #6
  %173 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  store ptr %173, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #6
  %174 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  store ptr %174, ptr %25, align 8
  %175 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #6
  br i1 %175, label %.lr.ph109, label %._crit_edge110

176:                                              ; preds = %._crit_edge104
  %177 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #6
  br label %196

.lr.ph106:                                        ; preds = %169, %180
  %178 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  %179 = invoke noundef i64 @_ZNSt3setIiSt4lessIiESaIiEE5eraseERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %178)
          to label %180 unwind label %184

180:                                              ; preds = %.lr.ph106
  %181 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %22, i32 noundef 0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #6
  %182 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  store ptr %182, ptr %23, align 8
  %183 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #6
  br i1 %183, label %.lr.ph106, label %._crit_edge107, !llvm.loop !18

184:                                              ; preds = %.lr.ph106
  %185 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #6
  br label %196

._crit_edge110:                                   ; preds = %190, %._crit_edge107
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %186 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %187 = icmp ugt i64 %186, %indvars.iv.next
  br i1 %187, label %.lr.ph113, label %.loopexit, !llvm.loop !19

.lr.ph109:                                        ; preds = %._crit_edge107, %190
  %188 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  %189 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %188)
          to label %190 unwind label %194

190:                                              ; preds = %.lr.ph109
  %191 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %24, i32 noundef 0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #6
  %192 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  store ptr %192, ptr %25, align 8
  %193 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #6
  br i1 %193, label %.lr.ph109, label %._crit_edge110, !llvm.loop !20

194:                                              ; preds = %.lr.ph109
  %195 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #6
  br label %196

196:                                              ; preds = %194, %184, %176, %163
  %.pn = phi { ptr, i32 } [ %164, %163 ], [ %185, %184 ], [ %195, %194 ], [ %177, %176 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #6
  br label %236

.loopexit:                                        ; preds = %._crit_edge110, %._crit_edge98, %.lr.ph119
  %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1
  %197 = load i32, ptr @n, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %.not62.not = icmp slt i64 %indvars.iv141, %198
  br i1 %.not62.not, label %.lr.ph119, label %._crit_edge120, !llvm.loop !21

._crit_edge125.thread:                            ; preds = %._crit_edge120, %._crit_edge120.thread
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #6
  br label %._crit_edge131

._crit_edge125:                                   ; preds = %204
  %199 = icmp slt i32 %207, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #6
  br i1 %199, label %._crit_edge131, label %.lr.ph130

.lr.ph124:                                        ; preds = %._crit_edge120, %204
  %storemerge63122 = phi i32 [ %206, %204 ], [ 1, %._crit_edge120 ]
  %200 = invoke noundef i32 @_Z4findi(i32 noundef %storemerge63122)
          to label %201 unwind label %208

201:                                              ; preds = %.lr.ph124
  %202 = sext i32 %200 to i64
  %203 = getelementptr inbounds [500500 x %"class.std::vector"], ptr @res, i64 0, i64 %202
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %203, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %204 unwind label %208

204:                                              ; preds = %201
  %205 = load i32, ptr %26, align 4, !tbaa !5
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr %26, align 4, !tbaa !5
  %207 = load i32, ptr @n, align 4, !tbaa !5
  %.not64.not = icmp slt i32 %205, %207
  br i1 %.not64.not, label %.lr.ph124, label %._crit_edge125, !llvm.loop !22

208:                                              ; preds = %201, %.lr.ph124
  %209 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #6
  br label %236

._crit_edge131:                                   ; preds = %.lr.ph130, %._crit_edge125.thread, %._crit_edge125
  %.046.lcssa = phi i32 [ 0, %._crit_edge125 ], [ 0, %._crit_edge125.thread ], [ %spec.select, %.lr.ph130 ]
  %210 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %.046.lcssa)
  %211 = load i32, ptr @n, align 4, !tbaa !5
  %.not66135 = icmp slt i32 %211, 1
  br i1 %.not66135, label %._crit_edge139, label %.lr.ph138

.lr.ph130:                                        ; preds = %._crit_edge125, %.lr.ph130
  %indvars.iv144 = phi i64 [ %indvars.iv.next145, %.lr.ph130 ], [ 1, %._crit_edge125 ]
  %.046127 = phi i32 [ %spec.select, %.lr.ph130 ], [ 0, %._crit_edge125 ]
  %212 = getelementptr inbounds [500500 x %"class.std::vector"], ptr @res, i64 0, i64 %indvars.iv144
  %213 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %212) #6
  %.not68 = icmp ne i64 %213, 0
  %214 = zext i1 %.not68 to i32
  %spec.select = add nuw nsw i32 %.046127, %214
  %indvars.iv.next145 = add nuw nsw i64 %indvars.iv144, 1
  %215 = load i32, ptr @n, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %.not65.not = icmp slt i64 %indvars.iv144, %216
  br i1 %.not65.not, label %.lr.ph130, label %._crit_edge131, !llvm.loop !23

._crit_edge139:                                   ; preds = %233, %._crit_edge131
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

.lr.ph138:                                        ; preds = %._crit_edge131, %233
  %indvars.iv147 = phi i64 [ %indvars.iv.next148, %233 ], [ 1, %._crit_edge131 ]
  %217 = getelementptr inbounds [500500 x %"class.std::vector"], ptr @res, i64 0, i64 %indvars.iv147
  %218 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %217) #6
  %.not67 = icmp eq i64 %218, 0
  br i1 %.not67, label %233, label %219

219:                                              ; preds = %.lr.ph138
  %220 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %217) #6
  %221 = trunc i64 %220 to i32
  %222 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %221)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #6
  %223 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %217) #6
  store ptr %223, ptr %27, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #6
  %224 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %217) #6
  store ptr %224, ptr %28, align 8
  %225 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #6
  br i1 %225, label %.lr.ph133, label %._crit_edge134

._crit_edge134:                                   ; preds = %.lr.ph133, %219
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #6
  %226 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.6)
  br label %233

.lr.ph133:                                        ; preds = %219, %.lr.ph133
  %227 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %27) #6
  %228 = load i32, ptr %227, align 4, !tbaa !5
  %229 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %228)
  %230 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %27, i32 noundef 0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #6
  %231 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %217) #6
  store ptr %231, ptr %28, align 8
  %232 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #6
  br i1 %232, label %.lr.ph133, label %._crit_edge134, !llvm.loop !24

233:                                              ; preds = %.lr.ph138, %._crit_edge134
  %indvars.iv.next148 = add nuw nsw i64 %indvars.iv147, 1
  %234 = load i32, ptr @n, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %.not66.not = icmp slt i64 %indvars.iv147, %235
  br i1 %.not66.not, label %.lr.ph138, label %._crit_edge139, !llvm.loop !25

236:                                              ; preds = %74, %95, %106, %116, %196, %136, %208
  %.pn76.pn = phi { ptr, i32 } [ %209, %208 ], [ %75, %74 ], [ %96, %95 ], [ %107, %106 ], [ %117, %116 ], [ %137, %136 ], [ %.pn, %196 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  br label %237

237:                                              ; preds = %236, %52
  %.pn79 = phi { ptr, i32 } [ %53, %52 ], [ %.pn76.pn, %236 ]
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn79
}

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

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

; 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 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) 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 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}


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