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

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

%"class.std::basic_ostream" = type { ptr, %"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::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 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%struct.point = type { i64, i64 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@p = external dso_local global %"class.std::vector", align 8
@q = external dso_local global %"class.std::vector", align 8
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5pointSt6vectorIS2_SaIS2_EEEEPFbRKS2_S9_EEvT_SC_T0_(ptr, ptr, ptr noundef) #3

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

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

; 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: 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) #4

; 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() #5 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %11 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %12 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %13 = getelementptr i8, ptr %12, i64 -24
  %14 = load i64, ptr %13, align 8
  %15 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %14
  %16 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %15, ptr noundef null)
  %17 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %18 = getelementptr i8, ptr %17, i64 -24
  %19 = load i64, ptr %18, align 8
  %20 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %19
  %21 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %20, ptr noundef null)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %23 = load i32, ptr @n, align 4, !tbaa !8
  %24 = sext i32 %23 to i64
  call void @_ZNSt6vectorI5pointSaIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %24)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !8
  br label %25

25:                                               ; preds = %41, %0
  %26 = load i32, ptr %2, align 4, !tbaa !8
  %27 = load i32, ptr @n, align 4, !tbaa !8
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %44

30:                                               ; preds = %25
  %31 = load i32, ptr %2, align 4, !tbaa !8
  %32 = sext i32 %31 to i64
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %32) #7
  %34 = getelementptr inbounds %struct.point, ptr %33, i32 0, i32 0
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %34)
  %36 = load i32, ptr %2, align 4, !tbaa !8
  %37 = sext i32 %36 to i64
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %37) #7
  %39 = getelementptr inbounds %struct.point, ptr %38, i32 0, i32 1
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(8) %39)
  br label %41

41:                                               ; preds = %30
  %42 = load i32, ptr %2, align 4, !tbaa !8
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %2, align 4, !tbaa !8
  br label %25, !llvm.loop !11

44:                                               ; preds = %29
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %46 = load i32, ptr @n, align 4, !tbaa !8
  %47 = load i32, ptr @m, align 4, !tbaa !8
  %48 = add nsw i32 %46, %47
  %49 = sext i32 %48 to i64
  call void @_ZNSt6vectorI5pointSaIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @q, i64 noundef %49)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !8
  br label %50

50:                                               ; preds = %62, %44
  %51 = load i32, ptr %3, align 4, !tbaa !8
  %52 = load i32, ptr @n, align 4, !tbaa !8
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %65

55:                                               ; preds = %50
  %56 = load i32, ptr %3, align 4, !tbaa !8
  %57 = sext i32 %56 to i64
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %57) #7
  %59 = load i32, ptr %3, align 4, !tbaa !8
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @q, i64 noundef %60) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %61, ptr align 8 %58, i64 16, i1 false), !tbaa.struct !13
  br label %62

62:                                               ; preds = %55
  %63 = load i32, ptr %3, align 4, !tbaa !8
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %3, align 4, !tbaa !8
  br label %50, !llvm.loop !16

65:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !8
  br label %66

66:                                               ; preds = %86, %65
  %67 = load i32, ptr %4, align 4, !tbaa !8
  %68 = load i32, ptr @m, align 4, !tbaa !8
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %89

71:                                               ; preds = %66
  %72 = load i32, ptr @n, align 4, !tbaa !8
  %73 = load i32, ptr %4, align 4, !tbaa !8
  %74 = add nsw i32 %72, %73
  %75 = sext i32 %74 to i64
  %76 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @q, i64 noundef %75) #7
  %77 = getelementptr inbounds %struct.point, ptr %76, i32 0, i32 0
  %78 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %77)
  %79 = load i32, ptr @n, align 4, !tbaa !8
  %80 = load i32, ptr %4, align 4, !tbaa !8
  %81 = add nsw i32 %79, %80
  %82 = sext i32 %81 to i64
  %83 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @q, i64 noundef %82) #7
  %84 = getelementptr inbounds %struct.point, ptr %83, i32 0, i32 1
  %85 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %78, ptr noundef nonnull align 8 dereferenceable(8) %84)
  br label %86

86:                                               ; preds = %71
  %87 = load i32, ptr %4, align 4, !tbaa !8
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %4, align 4, !tbaa !8
  br label %66, !llvm.loop !17

89:                                               ; preds = %70
  call void @_Z17computeConvexHullRSt6vectorI5pointSaIS0_EE(ptr noundef nonnull align 8 dereferenceable(24) @q)
  %90 = call ptr @_ZNSt6vectorI5pointSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #7
  %91 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  store ptr %90, ptr %91, align 8
  %92 = call ptr @_ZNSt6vectorI5pointSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #7
  %93 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %92, ptr %93, align 8
  %94 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8
  %96 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5pointSt6vectorIS2_SaIS2_EEEEPFbRKS2_S9_EEvT_SC_T0_(ptr %95, ptr %97, ptr noundef @_Z3cmpRK5pointS1_)
  %98 = call ptr @_ZNSt6vectorI5pointSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @q) #7
  %99 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %98, ptr %99, align 8
  %100 = call ptr @_ZNSt6vectorI5pointSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @q) #7
  %101 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %100, ptr %101, align 8
  %102 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  %103 = load ptr, ptr %102, align 8
  %104 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5pointSt6vectorIS2_SaIS2_EEEEPFbRKS2_S9_EEvT_SC_T0_(ptr %103, ptr %105, ptr noundef @_Z3cmpRK5pointS1_)
  %106 = call noundef i64 @_ZNKSt6vectorI5pointSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #7
  %107 = call noundef i64 @_ZNKSt6vectorI5pointSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @q) #7
  %108 = icmp eq i64 %106, %107
  br i1 %108, label %109, label %150

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

110:                                              ; preds = %143, %109
  %111 = load i32, ptr %9, align 4, !tbaa !8
  %112 = sext i32 %111 to i64
  %113 = call noundef i64 @_ZNKSt6vectorI5pointSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #7
  %114 = icmp ult i64 %112, %113
  br i1 %114, label %116, label %115

115:                                              ; preds = %110
  store i32 11, ptr %10, align 4
  br label %146

116:                                              ; preds = %110
  %117 = load i32, ptr %9, align 4, !tbaa !8
  %118 = sext i32 %117 to i64
  %119 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %118) #7
  %120 = getelementptr inbounds %struct.point, ptr %119, i32 0, i32 0
  %121 = load i64, ptr %120, align 8, !tbaa !18
  %122 = load i32, ptr %9, align 4, !tbaa !8
  %123 = sext i32 %122 to i64
  %124 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @q, i64 noundef %123) #7
  %125 = getelementptr inbounds %struct.point, ptr %124, i32 0, i32 0
  %126 = load i64, ptr %125, align 8, !tbaa !18
  %127 = icmp ne i64 %121, %126
  br i1 %127, label %140, label %128

128:                                              ; preds = %116
  %129 = load i32, ptr %9, align 4, !tbaa !8
  %130 = sext i32 %129 to i64
  %131 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %130) #7
  %132 = getelementptr inbounds %struct.point, ptr %131, i32 0, i32 1
  %133 = load i64, ptr %132, align 8, !tbaa !20
  %134 = load i32, ptr %9, align 4, !tbaa !8
  %135 = sext i32 %134 to i64
  %136 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @q, i64 noundef %135) #7
  %137 = getelementptr inbounds %struct.point, ptr %136, i32 0, i32 1
  %138 = load i64, ptr %137, align 8, !tbaa !20
  %139 = icmp ne i64 %133, %138
  br i1 %139, label %140, label %142

140:                                              ; preds = %128, %116
  %141 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %10, align 4
  br label %146

142:                                              ; preds = %128
  br label %143

143:                                              ; preds = %142
  %144 = load i32, ptr %9, align 4, !tbaa !8
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %9, align 4, !tbaa !8
  br label %110, !llvm.loop !21

146:                                              ; preds = %140, %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  %147 = load i32, ptr %10, align 4
  switch i32 %147, label %154 [
    i32 11, label %148
    i32 1, label %152
  ]

148:                                              ; preds = %146
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  store i32 0, ptr %1, align 4
  br label %152

150:                                              ; preds = %89
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  store i32 0, ptr %1, align 4
  br label %152

152:                                              ; preds = %150, %148, %146
  %153 = load i32, ptr %1, align 4
  ret i32 %153

154:                                              ; preds = %146
  unreachable
}

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

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

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

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

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

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

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

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

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


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

%"class.std::basic_ostream" = type { ptr, %"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::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 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@p = external dso_local global %"class.std::vector", align 8
@q = external dso_local global %"class.std::vector", align 8
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5pointSt6vectorIS2_SaIS2_EEEEPFbRKS2_S9_EEvT_SC_T0_(ptr, ptr, ptr noundef) local_unnamed_addr #2

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

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

; 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 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) #3

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 {
  %1 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %2 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %3 = getelementptr i8, ptr %2, i64 -24
  %4 = load i64, ptr %3, align 8
  %5 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %4
  %6 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %5, ptr noundef null)
  %7 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %13 = load i32, ptr @n, align 4, !tbaa !8
  %14 = sext i32 %13 to i64
  tail call void @_ZNSt6vectorI5pointSaIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %14)
  %15 = load i32, ptr @n, align 4, !tbaa !8
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %17 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %18 = load i32, ptr @n, align 4, !tbaa !8
  %19 = load i32, ptr @m, align 4, !tbaa !8
  %20 = add nsw i32 %19, %18
  %21 = sext i32 %20 to i64
  tail call void @_ZNSt6vectorI5pointSaIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @q, i64 noundef %21)
  %22 = load i32, ptr @n, align 4, !tbaa !8
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph37, label %.preheader33

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %24 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %indvars.iv) #6
  %25 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %24)
  %26 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %indvars.iv) #6
  %27 = getelementptr inbounds i8, ptr %26, i64 8
  %28 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 8 dereferenceable(8) %27)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %29 = load i32, ptr @n, align 4, !tbaa !8
  %30 = sext i32 %29 to i64
  %31 = icmp slt i64 %indvars.iv.next, %30
  br i1 %31, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.preheader33:                                     ; preds = %.lr.ph37, %._crit_edge
  %32 = load i32, ptr @m, align 4, !tbaa !8
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.lr.ph39, label %._crit_edge40

.lr.ph37:                                         ; preds = %._crit_edge, %.lr.ph37
  %indvars.iv46 = phi i64 [ %indvars.iv.next47, %.lr.ph37 ], [ 0, %._crit_edge ]
  %34 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %indvars.iv46) #6
  %35 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @q, i64 noundef %indvars.iv46) #6
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(16) %34, i64 16, i1 false), !tbaa.struct !13
  %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1
  %36 = load i32, ptr @n, align 4, !tbaa !8
  %37 = sext i32 %36 to i64
  %38 = icmp slt i64 %indvars.iv.next47, %37
  br i1 %38, label %.lr.ph37, label %.preheader33, !llvm.loop !16

._crit_edge40:                                    ; preds = %.lr.ph39, %.preheader33
  tail call void @_Z17computeConvexHullRSt6vectorI5pointSaIS0_EE(ptr noundef nonnull align 8 dereferenceable(24) @q)
  %39 = tail call ptr @_ZNSt6vectorI5pointSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #6
  %40 = tail call ptr @_ZNSt6vectorI5pointSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #6
  tail call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5pointSt6vectorIS2_SaIS2_EEEEPFbRKS2_S9_EEvT_SC_T0_(ptr %39, ptr %40, ptr noundef nonnull @_Z3cmpRK5pointS1_)
  %41 = tail call ptr @_ZNSt6vectorI5pointSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @q) #6
  %42 = tail call ptr @_ZNSt6vectorI5pointSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @q) #6
  tail call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5pointSt6vectorIS2_SaIS2_EEEEPFbRKS2_S9_EEvT_SC_T0_(ptr %41, ptr %42, ptr noundef nonnull @_Z3cmpRK5pointS1_)
  %43 = tail call noundef i64 @_ZNKSt6vectorI5pointSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #6
  %44 = tail call noundef i64 @_ZNKSt6vectorI5pointSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @q) #6
  %45 = icmp eq i64 %43, %44
  br i1 %45, label %.preheader, label %._crit_edge43

.preheader:                                       ; preds = %._crit_edge40
  %46 = tail call noundef i64 @_ZNKSt6vectorI5pointSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #6
  %.not44 = icmp eq i64 %46, 0
  br i1 %.not44, label %._crit_edge43, label %.lr.ph42

.lr.ph39:                                         ; preds = %.preheader33, %.lr.ph39
  %.02738 = phi i32 [ %58, %.lr.ph39 ], [ 0, %.preheader33 ]
  %47 = load i32, ptr @n, align 4, !tbaa !8
  %48 = add nsw i32 %47, %.02738
  %49 = sext i32 %48 to i64
  %50 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @q, i64 noundef %49) #6
  %51 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %50)
  %52 = load i32, ptr @n, align 4, !tbaa !8
  %53 = add nsw i32 %52, %.02738
  %54 = sext i32 %53 to i64
  %55 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @q, i64 noundef %54) #6
  %56 = getelementptr inbounds i8, ptr %55, i64 8
  %57 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 8 dereferenceable(8) %56)
  %58 = add nuw nsw i32 %.02738, 1
  %59 = load i32, ptr @m, align 4, !tbaa !8
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %.lr.ph39, label %._crit_edge40, !llvm.loop !17

61:                                               ; preds = %68
  %indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1
  %62 = tail call noundef i64 @_ZNKSt6vectorI5pointSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #6
  %63 = icmp ugt i64 %62, %indvars.iv.next50
  br i1 %63, label %.lr.ph42, label %._crit_edge43, !llvm.loop !18

.lr.ph42:                                         ; preds = %.preheader, %61
  %indvars.iv49 = phi i64 [ %indvars.iv.next50, %61 ], [ 0, %.preheader ]
  %64 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %indvars.iv49) #6
  %65 = load i64, ptr %64, align 8, !tbaa !19
  %66 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @q, i64 noundef %indvars.iv49) #6
  %67 = load i64, ptr %66, align 8, !tbaa !19
  %.not = icmp eq i64 %65, %67
  br i1 %.not, label %68, label %._crit_edge43

68:                                               ; preds = %.lr.ph42
  %69 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @p, i64 noundef %indvars.iv49) #6
  %70 = getelementptr inbounds i8, ptr %69, i64 8
  %71 = load i64, ptr %70, align 8, !tbaa !21
  %72 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5pointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @q, i64 noundef %indvars.iv49) #6
  %73 = getelementptr inbounds i8, ptr %72, i64 8
  %74 = load i64, ptr %73, align 8, !tbaa !21
  %.not29 = icmp eq i64 %71, %74
  br i1 %.not29, label %61, label %._crit_edge43

._crit_edge43:                                    ; preds = %61, %68, %.lr.ph42, %._crit_edge40, %.preheader
  %.str.sink = phi ptr [ @.str.3, %.preheader ], [ @.str, %._crit_edge40 ], [ @.str, %.lr.ph42 ], [ @.str, %68 ], [ @.str.3, %61 ]
  %75 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull %.str.sink)
  ret i32 0
}

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #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 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { "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 = !{!"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 = !{i64 0, i64 8, !14, i64 8, i64 8, !14}
!14 = !{!15, !15, i64 0}
!15 = !{!"long long", !10, i64 0}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = !{!20, !15, i64 0}
!20 = !{!"_ZTS5point", !15, i64 0, !15, i64 8}
!21 = !{!20, !15, i64 8}


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