; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/245 Division 1/D (D)

; 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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<point, point, std::_Identity<point>, std::less<point>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<point, point, std::_Identity<point>, std::less<point>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<point, std::allocator<point>>::_Vector_impl" }
%"struct.std::_Vector_base<point, std::allocator<point>>::_Vector_impl" = type { %"struct.std::_Vector_base<point, std::allocator<point>>::_Vector_impl_data" }
%"struct.std::_Vector_base<point, std::allocator<point>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.point = type { i64, i64 }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@a = external dso_local global [100100 x i32], align 16
@s = external dso_local global %"class.std::set", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

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

34:                                               ; preds = %54, %0
  %35 = load i32, ptr %3, align 4, !tbaa !8
  %36 = load i32, ptr %2, align 4, !tbaa !8
  %37 = icmp sle i32 %35, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %57

39:                                               ; preds = %34
  %40 = load i32, ptr %3, align 4, !tbaa !8
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %41
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %42)
  %44 = load i32, ptr %3, align 4, !tbaa !8
  %45 = sub nsw i32 %44, 1
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !8
  %49 = load i32, ptr %3, align 4, !tbaa !8
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !8
  %53 = add nsw i32 %52, %48
  store i32 %53, ptr %51, align 4, !tbaa !8
  br label %54

54:                                               ; preds = %39
  %55 = load i32, ptr %3, align 4, !tbaa !8
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %3, align 4, !tbaa !8
  br label %34, !llvm.loop !11

57:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #8
  call void @_ZNSt6vectorI5pointSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 1, ptr %5, align 4, !tbaa !8
  br label %58

58:                                               ; preds = %73, %57
  %59 = load i32, ptr %5, align 4, !tbaa !8
  %60 = load i32, ptr %2, align 4, !tbaa !8
  %61 = icmp sle i32 %59, %60
  br i1 %61, label %63, label %62

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

63:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #8
  %64 = load i32, ptr %5, align 4, !tbaa !8
  %65 = sext i32 %64 to i64
  %66 = load i32, ptr %5, align 4, !tbaa !8
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !8
  %70 = sext i32 %69 to i64
  invoke void @_ZN5pointC2Exx(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %65, i64 noundef %70)
          to label %71 unwind label %76

71:                                               ; preds = %63
  invoke void @_ZNSt6vectorI5pointSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %72 unwind label %76

72:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #8
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %5, align 4, !tbaa !8
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %5, align 4, !tbaa !8
  br label %58, !llvm.loop !13

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

80:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %81 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 0) #8
  %82 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 1) #8
  %83 = call noundef i64 @_Z3disR5pointS0_(ptr noundef nonnull align 8 dereferenceable(16) %81, ptr noundef nonnull align 8 dereferenceable(16) %82)
  store i64 %83, ptr %9, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 0, ptr %10, align 4, !tbaa !8
  %84 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 0) #8
  %85 = invoke { ptr, i8 } @_ZNSt3setI5pointSt4lessIS0_ESaIS0_EE6insertERKS0_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 8 dereferenceable(16) %84)
          to label %86 unwind label %96

86:                                               ; preds = %80
  %87 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 0
  %88 = extractvalue { ptr, i8 } %85, 0
  store ptr %88, ptr %87, align 8
  %89 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 1
  %90 = extractvalue { ptr, i8 } %85, 1
  store i8 %90, ptr %89, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 1, ptr %12, align 4, !tbaa !8
  br label %91

91:                                               ; preds = %207, %86
  %92 = load i32, ptr %12, align 4, !tbaa !8
  %93 = load i32, ptr %2, align 4, !tbaa !8
  %94 = icmp slt i32 %92, %93
  br i1 %94, label %100, label %95

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

96:                                               ; preds = %219, %216, %80
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %7, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %8, align 4
  br label %223

100:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %101 = load i32, ptr %12, align 4, !tbaa !8
  %102 = sext i32 %101 to i64
  %103 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %102) #8
  %104 = getelementptr inbounds %struct.point, ptr %103, i32 0, i32 0
  %105 = load i64, ptr %104, align 8, !tbaa !16
  store i64 %105, ptr %13, align 8, !tbaa !14
  br label %106

106:                                              ; preds = %128, %100
  %107 = load i32, ptr %10, align 4, !tbaa !8
  %108 = load i32, ptr %12, align 4, !tbaa !8
  %109 = icmp slt i32 %107, %108
  br i1 %109, label %110, label %121

110:                                              ; preds = %106
  %111 = load i64, ptr %13, align 8, !tbaa !14
  %112 = load i32, ptr %10, align 4, !tbaa !8
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %113) #8
  %115 = getelementptr inbounds %struct.point, ptr %114, i32 0, i32 0
  %116 = load i64, ptr %115, align 8, !tbaa !16
  %117 = sub nsw i64 %111, %116
  %118 = call noundef i64 @_Z3sqrx(i64 noundef %117)
  %119 = load i64, ptr %9, align 8, !tbaa !14
  %120 = icmp sge i64 %118, %119
  br label %121

121:                                              ; preds = %110, %106
  %122 = phi i1 [ false, %106 ], [ %120, %110 ]
  br i1 %122, label %123, label %135

123:                                              ; preds = %121
  %124 = load i32, ptr %10, align 4, !tbaa !8
  %125 = sext i32 %124 to i64
  %126 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %125) #8
  %127 = invoke noundef i64 @_ZNSt3setI5pointSt4lessIS0_ESaIS0_EE5eraseERKS0_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 8 dereferenceable(16) %126)
          to label %128 unwind label %131

128:                                              ; preds = %123
  %129 = load i32, ptr %10, align 4, !tbaa !8
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %10, align 4, !tbaa !8
  br label %106, !llvm.loop !18

131:                                              ; preds = %123
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %7, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %8, align 4
  br label %215

135:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #8
  %136 = load i32, ptr %12, align 4, !tbaa !8
  %137 = sext i32 %136 to i64
  %138 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %137) #8
  %139 = getelementptr inbounds %struct.point, ptr %138, i32 0, i32 1
  %140 = load i64, ptr %139, align 8, !tbaa !19
  %141 = sitofp i64 %140 to double
  %142 = load i64, ptr %9, align 8, !tbaa !14
  %143 = invoke noundef double @_ZSt4sqrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef %142)
          to label %144 unwind label %185

144:                                              ; preds = %135
  %145 = fsub double %141, %143
  %146 = fptosi double %145 to i64
  invoke void @_ZN5pointC2Exx(ptr noundef nonnull align 8 dereferenceable(16) %16, i64 noundef 0, i64 noundef %146)
          to label %147 unwind label %185

147:                                              ; preds = %144
  %148 = invoke ptr @_ZNSt3setI5pointSt4lessIS0_ESaIS0_EE11lower_boundERKS0_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %149 unwind label %185

149:                                              ; preds = %147
  %150 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %15, i32 0, i32 0
  store ptr %148, ptr %150, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #8
  br label %151

151:                                              ; preds = %179, %149
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %152 = call ptr @_ZNKSt3setI5pointSt4lessIS0_ESaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @s) #8
  %153 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %17, i32 0, i32 0
  store ptr %152, ptr %153, align 8
  %154 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorI5pointES3_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  br i1 %154, label %155, label %170

155:                                              ; preds = %151
  %156 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorI5pointEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  %157 = getelementptr inbounds %struct.point, ptr %156, i32 0, i32 1
  %158 = load i64, ptr %157, align 8, !tbaa !19
  %159 = load i32, ptr %12, align 4, !tbaa !8
  %160 = sext i32 %159 to i64
  %161 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %160) #8
  %162 = getelementptr inbounds %struct.point, ptr %161, i32 0, i32 1
  %163 = load i64, ptr %162, align 8, !tbaa !19
  %164 = sub nsw i64 %158, %163
  %165 = invoke noundef i64 @_ZSt3absx(i64 noundef %164)
          to label %166 unwind label %189

166:                                              ; preds = %155
  %167 = call noundef i64 @_Z3sqrx(i64 noundef %165)
  %168 = load i64, ptr %9, align 8, !tbaa !14
  %169 = icmp slt i64 %167, %168
  br label %170

170:                                              ; preds = %166, %151
  %171 = phi i1 [ false, %151 ], [ %169, %166 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br i1 %171, label %172, label %197

172:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #8
  %173 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt23_Rb_tree_const_iteratorI5pointEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %173, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %174 = load i32, ptr %12, align 4, !tbaa !8
  %175 = sext i32 %174 to i64
  %176 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %175) #8
  %177 = call noundef i64 @_Z3disR5pointS0_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %176)
  store i64 %177, ptr %19, align 8, !tbaa !14
  %178 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %179 unwind label %193

179:                                              ; preds = %172
  %180 = load i64, ptr %178, align 8, !tbaa !14
  store i64 %180, ptr %9, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  %181 = call ptr @_ZNSt23_Rb_tree_const_iteratorI5pointEppEi(ptr noundef nonnull align 8 dereferenceable(8) %15, i32 noundef 0) #8
  %182 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %20, i32 0, i32 0
  store ptr %181, ptr %182, align 8
  %183 = load i32, ptr %14, align 4, !tbaa !8
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %14, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #8
  br label %151, !llvm.loop !21

185:                                              ; preds = %147, %144, %135
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %7, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #8
  br label %214

189:                                              ; preds = %155
  %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 %17) #8
  br label %214

193:                                              ; preds = %172
  %194 = landingpad { ptr, i32 }
          cleanup
  %195 = extractvalue { ptr, i32 } %194, 0
  store ptr %195, ptr %7, align 8
  %196 = extractvalue { ptr, i32 } %194, 1
  store i32 %196, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #8
  br label %214

197:                                              ; preds = %170
  %198 = load i32, ptr %12, align 4, !tbaa !8
  %199 = sext i32 %198 to i64
  %200 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %199) #8
  %201 = invoke { ptr, i8 } @_ZNSt3setI5pointSt4lessIS0_ESaIS0_EE6insertERKS0_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 8 dereferenceable(16) %200)
          to label %202 unwind label %210

202:                                              ; preds = %197
  %203 = getelementptr inbounds { ptr, i8 }, ptr %21, i32 0, i32 0
  %204 = extractvalue { ptr, i8 } %201, 0
  store ptr %204, ptr %203, align 8
  %205 = getelementptr inbounds { ptr, i8 }, ptr %21, i32 0, i32 1
  %206 = extractvalue { ptr, i8 } %201, 1
  store i8 %206, ptr %205, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %207

207:                                              ; preds = %202
  %208 = load i32, ptr %12, align 4, !tbaa !8
  %209 = add nsw i32 %208, 1
  store i32 %209, ptr %12, align 4, !tbaa !8
  br label %91, !llvm.loop !22

210:                                              ; preds = %197
  %211 = landingpad { ptr, i32 }
          cleanup
  %212 = extractvalue { ptr, i32 } %211, 0
  store ptr %212, ptr %7, align 8
  %213 = extractvalue { ptr, i32 } %211, 1
  store i32 %213, ptr %8, align 4
  br label %214

214:                                              ; preds = %210, %193, %189, %185
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %215

215:                                              ; preds = %214, %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %223

216:                                              ; preds = %95
  %217 = load i64, ptr %9, align 8, !tbaa !14
  %218 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %217)
          to label %219 unwind label %96

219:                                              ; preds = %216
  %220 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %218, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %221 unwind label %96

221:                                              ; preds = %219
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @_ZNSt6vectorI5pointSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %222 = load i32, ptr %1, align 4
  ret i32 %222

223:                                              ; preds = %215, %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %224

224:                                              ; preds = %223, %76
  call void @_ZNSt6vectorI5pointSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %225

225:                                              ; preds = %224
  %226 = load ptr, ptr %7, align 8
  %227 = load i32, ptr %8, align 4
  %228 = insertvalue { ptr, i32 } poison, ptr %226, 0
  %229 = insertvalue { ptr, i32 } %228, i32 %227, 1
  resume { ptr, i32 } %229
}

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

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<point, point, std::_Identity<point>, std::less<point>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<point, point, std::_Identity<point>, std::less<point>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<point, std::allocator<point>>::_Vector_impl" }
%"struct.std::_Vector_base<point, std::allocator<point>>::_Vector_impl" = type { %"struct.std::_Vector_base<point, std::allocator<point>>::_Vector_impl_data" }
%"struct.std::_Vector_base<point, std::allocator<point>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.point = type { i64, i64 }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@a = external dso_local global [100100 x i32], align 16
@s = external dso_local global %"class.std::set", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %struct.point, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %6 = alloca %struct.point, align 8
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %8 = alloca %struct.point, align 8
  %9 = alloca i64, align 8
  %10 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %11 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %13
  %15 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  %16 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %17 = getelementptr i8, ptr %16, i64 -24
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %18
  %20 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %19, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %22 = load i32, ptr %1, align 4, !tbaa !8
  %.not49 = icmp slt i32 %22, 1
  br i1 %.not49, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #8
  call void @_ZNSt6vectorI5pointSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  %23 = load i32, ptr %1, align 4, !tbaa !8
  %.not4051 = icmp slt i32 %23, 1
  br i1 %.not4051, label %._crit_edge55, label %.lr.ph54

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %24 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %indvars.iv
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %26 = add nsw i64 %indvars.iv, -1
  %27 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %26
  %28 = load i32, ptr %27, align 4, !tbaa !8
  %29 = load i32, ptr %24, align 4, !tbaa !8
  %30 = add nsw i32 %29, %28
  store i32 %30, ptr %24, align 4, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %31 = load i32, ptr %1, align 4, !tbaa !8
  %32 = sext i32 %31 to i64
  %.not.not = icmp slt i64 %indvars.iv, %32
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge55:                                    ; preds = %43, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #8
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 1) #8
  %35 = call noundef i64 @_Z3disR5pointS0_(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 8 dereferenceable(16) %34)
  store i64 %35, ptr %4, align 8, !tbaa !13
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #8
  %37 = invoke { ptr, i8 } @_ZNSt3setI5pointSt4lessIS0_ESaIS0_EE6insertERKS0_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 8 dereferenceable(16) %36)
          to label %.preheader unwind label %50

.preheader:                                       ; preds = %._crit_edge55
  %38 = load i32, ptr %1, align 4, !tbaa !8
  %39 = icmp sgt i32 %38, 1
  br i1 %39, label %.lr.ph65, label %._crit_edge66

.lr.ph54:                                         ; preds = %._crit_edge, %43
  %indvars.iv68 = phi i64 [ %indvars.iv.next69, %43 ], [ 1, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  %40 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %indvars.iv68
  %41 = load i32, ptr %40, align 4, !tbaa !8
  %42 = sext i32 %41 to i64
  call void @_ZN5pointC2Exx(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %indvars.iv68, i64 noundef %42)
  invoke void @_ZNSt6vectorI5pointSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %43 unwind label %46

43:                                               ; preds = %.lr.ph54
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %44 = load i32, ptr %1, align 4, !tbaa !8
  %45 = sext i32 %44 to i64
  %.not40.not = icmp slt i64 %indvars.iv68, %45
  br i1 %.not40.not, label %.lr.ph54, label %._crit_edge55, !llvm.loop !15

46:                                               ; preds = %.lr.ph54
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  br label %114

._crit_edge66.loopexit:                           ; preds = %103
  %.pre = load i64, ptr %4, align 8, !tbaa !13
  br label %._crit_edge66

._crit_edge66:                                    ; preds = %._crit_edge66.loopexit, %.preheader
  %48 = phi i64 [ %.pre, %._crit_edge66.loopexit ], [ %35, %.preheader ]
  %49 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %48)
          to label %110 unwind label %50

50:                                               ; preds = %110, %._crit_edge66, %._crit_edge55
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %113

.lr.ph65:                                         ; preds = %.preheader, %103
  %indvars.iv74 = phi i64 [ %indvars.iv.next75, %103 ], [ 1, %.preheader ]
  %.03863 = phi i32 [ %.139.lcssa, %103 ], [ 0, %.preheader ]
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv74) #8
  %53 = load i64, ptr %52, align 8, !tbaa !16
  %54 = sext i32 %.03863 to i64
  %55 = icmp sgt i64 %indvars.iv74, %54
  br i1 %55, label %.lr.ph58, label %.critedge

.lr.ph58:                                         ; preds = %.lr.ph65, %64
  %indvars.iv71 = phi i64 [ %indvars.iv.next72, %64 ], [ %54, %.lr.ph65 ]
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv71) #8
  %57 = load i64, ptr %56, align 8, !tbaa !16
  %58 = sub nsw i64 %53, %57
  %59 = call noundef i64 @_Z3sqrx(i64 noundef %58)
  %60 = load i64, ptr %4, align 8, !tbaa !13
  %.not41 = icmp slt i64 %59, %60
  br i1 %.not41, label %.critedge.loopexit, label %61

61:                                               ; preds = %.lr.ph58
  %62 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv71) #8
  %63 = invoke noundef i64 @_ZNSt3setI5pointSt4lessIS0_ESaIS0_EE5eraseERKS0_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 8 dereferenceable(16) %62)
          to label %64 unwind label %65

64:                                               ; preds = %61
  %indvars.iv.next72 = add nsw i64 %indvars.iv71, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next72, %indvars.iv74
  br i1 %exitcond.not, label %.critedge.loopexit, label %.lr.ph58, !llvm.loop !18

65:                                               ; preds = %61
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %113

.critedge.loopexit:                               ; preds = %64, %.lr.ph58
  %.139.lcssa.ph.in = phi i64 [ %indvars.iv71, %.lr.ph58 ], [ %indvars.iv74, %64 ]
  %.139.lcssa.ph = trunc i64 %.139.lcssa.ph.in to i32
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %.lr.ph65
  %.139.lcssa = phi i32 [ %.03863, %.lr.ph65 ], [ %.139.lcssa.ph, %.critedge.loopexit ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #8
  %67 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv74) #8
  %68 = getelementptr inbounds i8, ptr %67, i64 8
  %69 = load i64, ptr %68, align 8, !tbaa !19
  %70 = sitofp i64 %69 to double
  %71 = load i64, ptr %4, align 8, !tbaa !13
  %72 = call noundef double @_ZSt4sqrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef %71)
  %73 = fsub double %70, %72
  %74 = fptosi double %73 to i64
  call void @_ZN5pointC2Exx(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef 0, i64 noundef %74)
  %75 = invoke ptr @_ZNSt3setI5pointSt4lessIS0_ESaIS0_EE11lower_boundERKS0_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %76 unwind label %99

76:                                               ; preds = %.critedge
  store ptr %75, ptr %5, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %77 = call ptr @_ZNKSt3setI5pointSt4lessIS0_ESaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @s) #8
  store ptr %77, ptr %7, align 8
  %78 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorI5pointES3_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  br i1 %78, label %.lr.ph62, label %.critedge2

.lr.ph62:                                         ; preds = %76, %90
  %79 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorI5pointEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  %80 = getelementptr inbounds i8, ptr %79, i64 8
  %81 = load i64, ptr %80, align 8, !tbaa !19
  %82 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv74) #8
  %83 = getelementptr inbounds i8, ptr %82, i64 8
  %84 = load i64, ptr %83, align 8, !tbaa !19
  %85 = sub nsw i64 %81, %84
  %86 = call noundef i64 @_ZSt3absx(i64 noundef %85)
  %87 = call noundef i64 @_Z3sqrx(i64 noundef %86)
  %88 = load i64, ptr %4, align 8, !tbaa !13
  %89 = icmp slt i64 %87, %88
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br i1 %89, label %90, label %.loopexit

90:                                               ; preds = %.lr.ph62
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #8
  %91 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt23_Rb_tree_const_iteratorI5pointEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %91, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %92 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv74) #8
  %93 = call noundef i64 @_Z3disR5pointS0_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %92)
  store i64 %93, ptr %9, align 8, !tbaa !13
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %95 = load i64, ptr %94, align 8, !tbaa !13
  store i64 %95, ptr %4, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  %96 = call ptr @_ZNSt23_Rb_tree_const_iteratorI5pointEppEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef 0) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %97 = call ptr @_ZNKSt3setI5pointSt4lessIS0_ESaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @s) #8
  store ptr %97, ptr %7, align 8
  %98 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorI5pointES3_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  br i1 %98, label %.lr.ph62, label %.critedge2, !llvm.loop !21

99:                                               ; preds = %.critedge
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  br label %109

.critedge2:                                       ; preds = %90, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph62, %.critedge2
  %101 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv74) #8
  %102 = invoke { ptr, i8 } @_ZNSt3setI5pointSt4lessIS0_ESaIS0_EE6insertERKS0_(ptr noundef nonnull align 8 dereferenceable(48) @s, ptr noundef nonnull align 8 dereferenceable(16) %101)
          to label %103 unwind label %107

103:                                              ; preds = %.loopexit
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %104 = load i32, ptr %1, align 4, !tbaa !8
  %105 = sext i32 %104 to i64
  %106 = icmp slt i64 %indvars.iv.next75, %105
  br i1 %106, label %.lr.ph65, label %._crit_edge66.loopexit, !llvm.loop !22

107:                                              ; preds = %.loopexit
  %108 = landingpad { ptr, i32 }
          cleanup
  br label %109

109:                                              ; preds = %107, %99
  %.pn = phi { ptr, i32 } [ %108, %107 ], [ %100, %99 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  br label %113

110:                                              ; preds = %._crit_edge66
  %111 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %112 unwind label %50

112:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @_ZNSt6vectorI5pointSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0

113:                                              ; preds = %65, %109, %50
  %.pn43.pn = phi { ptr, i32 } [ %51, %50 ], [ %66, %65 ], [ %.pn, %109 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %114

114:                                              ; preds = %113, %46
  %.pn46 = phi { ptr, i32 } [ %47, %46 ], [ %.pn43.pn, %113 ]
  call void @_ZNSt6vectorI5pointSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn46
}

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

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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