; LLVM IR from ShahjalalShohag/code-library :: Geometry (Onion Decomposition)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl" }
%"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl" = type { %"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl_data" }
%"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<PT, std::pair<const PT, int>, std::_Select1st<std::pair<const PT, int>>, std::less<PT>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<PT, std::pair<const PT, int>, std::_Select1st<std::pair<const PT, int>>, std::less<PT>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%struct.PT = type { i64, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%struct.LeftHull = type <{ %"class.std::vector", %"class.std::vector.3", i32, [4 x i8] }>
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<LeftHull::node, std::allocator<LeftHull::node>>::_Vector_impl" }
%"struct.std::_Vector_base<LeftHull::node, std::allocator<LeftHull::node>>::_Vector_impl" = type { %"struct.std::_Vector_base<LeftHull::node, std::allocator<LeftHull::node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<LeftHull::node, std::allocator<LeftHull::node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree.8" }
%"class.std::_Rb_tree.8" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.18" = type { ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@pts = external dso_local global %"class.std::vector", align 8
@id = external dso_local global %"class.std::map", align 8
@layer = external dso_local global [300009 x i32], align 16
@ans = external dso_local global [300009 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [95 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

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

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

52:                                               ; preds = %73, %0
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = load i32, ptr %2, align 4, !tbaa !5
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  br label %76

57:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  %58 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %4, ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #9
  %59 = getelementptr inbounds %struct.PT, ptr %6, i32 0, i32 0
  %60 = load i32, ptr %4, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  store i64 %61, ptr %59, align 8, !tbaa !9
  %62 = getelementptr inbounds %struct.PT, ptr %6, i32 0, i32 1
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  store i64 %64, ptr %62, align 8, !tbaa !12
  call void @_ZNSt6vectorI2PTSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) @pts, ptr noundef nonnull align 8 dereferenceable(16) %6)
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #9
  %65 = load i32, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #9
  %66 = getelementptr inbounds %struct.PT, ptr %7, i32 0, i32 0
  %67 = load i32, ptr %4, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  store i64 %68, ptr %66, align 8, !tbaa !9
  %69 = getelementptr inbounds %struct.PT, ptr %7, i32 0, i32 1
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  store i64 %71, ptr %69, align 8, !tbaa !12
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapI2PTiSt4lessIS0_ESaISt4pairIKS0_iEEEixEOS0_(ptr noundef nonnull align 8 dereferenceable(48) @id, ptr noundef nonnull align 8 dereferenceable(16) %7)
  store i32 %65, ptr %72, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  br label %73

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

76:                                               ; preds = %56
  %77 = call ptr @_ZNSt6vectorI2PTSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #9
  %78 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %77, ptr %78, align 8
  %79 = call ptr @_ZNSt6vectorI2PTSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #9
  %80 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %79, ptr %80, align 8
  %81 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8
  %83 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %82, ptr %84)
  call void @llvm.lifetime.start.p0(i64 56, ptr %10) #9
  call void @_ZN8LeftHullC2ERKSt6vectorI2PTSaIS1_EE(ptr noundef nonnull align 8 dereferenceable(52) %10, ptr noundef nonnull align 8 dereferenceable(24) @pts)
  %85 = call ptr @_ZNSt6vectorI2PTSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #9
  %86 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %85, ptr %86, align 8
  %87 = call ptr @_ZNSt6vectorI2PTSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #9
  %88 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %87, ptr %88, align 8
  %89 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8
  %91 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %90, ptr %92)
          to label %93 unwind label %101

93:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  store ptr @pts, ptr %15, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %94 = call ptr @_ZNSt6vectorI2PTSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #9
  %95 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %94, ptr %95, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  %96 = call ptr @_ZNSt6vectorI2PTSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #9
  %97 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %96, ptr %97, align 8
  br label %98

98:                                               ; preds = %115, %93
  %99 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP2PTSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  br i1 %99, label %105, label %100

100:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  br label %121

101:                                              ; preds = %76
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %13, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %14, align 4
  br label %332

105:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  %106 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #9
  store ptr %106, ptr %18, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #9
  %107 = load ptr, ptr %18, align 8, !tbaa !15
  %108 = invoke { i64, i64 } @_ZNK2PTngEv(ptr noundef nonnull align 8 dereferenceable(16) %107)
          to label %109 unwind label %117

109:                                              ; preds = %105
  %110 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 0
  %111 = extractvalue { i64, i64 } %108, 0
  store i64 %111, ptr %110, align 8
  %112 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 1
  %113 = extractvalue { i64, i64 } %108, 1
  store i64 %113, ptr %112, align 8
  %114 = load ptr, ptr %18, align 8, !tbaa !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %114, ptr align 8 %19, i64 16, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %115

115:                                              ; preds = %109
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #9
  br label %98

117:                                              ; preds = %105
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %13, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  br label %332

121:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 56, ptr %20) #9
  invoke void @_ZN8LeftHullC2ERKSt6vectorI2PTSaIS1_EE(ptr noundef nonnull align 8 dereferenceable(52) %20, ptr noundef nonnull align 8 dereferenceable(24) @pts)
          to label %122 unwind label %130

122:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  store ptr @pts, ptr %21, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  %123 = call ptr @_ZNSt6vectorI2PTSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #9
  %124 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %123, ptr %124, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  %125 = call ptr @_ZNSt6vectorI2PTSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #9
  %126 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %125, ptr %126, align 8
  br label %127

127:                                              ; preds = %144, %122
  %128 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP2PTSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #9
  br i1 %128, label %134, label %129

129:                                              ; preds = %127
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  br label %150

130:                                              ; preds = %121
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %13, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %14, align 4
  br label %331

134:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  %135 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #9
  store ptr %135, ptr %24, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #9
  %136 = load ptr, ptr %24, align 8, !tbaa !15
  %137 = invoke { i64, i64 } @_ZNK2PTngEv(ptr noundef nonnull align 8 dereferenceable(16) %136)
          to label %138 unwind label %146

138:                                              ; preds = %134
  %139 = getelementptr inbounds { i64, i64 }, ptr %25, i32 0, i32 0
  %140 = extractvalue { i64, i64 } %137, 0
  store i64 %140, ptr %139, align 8
  %141 = getelementptr inbounds { i64, i64 }, ptr %25, i32 0, i32 1
  %142 = extractvalue { i64, i64 } %137, 1
  store i64 %142, ptr %141, align 8
  %143 = load ptr, ptr %24, align 8, !tbaa !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %143, ptr align 8 %25, i64 16, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  br label %144

144:                                              ; preds = %138
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #9
  br label %127

146:                                              ; preds = %134
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %13, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  br label %330

150:                                              ; preds = %129
  %151 = call ptr @_ZNSt6vectorI2PTSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #9
  %152 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %151, ptr %152, align 8
  %153 = call ptr @_ZNSt6vectorI2PTSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #9
  %154 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  store ptr %153, ptr %154, align 8
  %155 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  %156 = load ptr, ptr %155, align 8
  %157 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  %158 = load ptr, ptr %157, align 8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %156, ptr %158)
          to label %159 unwind label %165

159:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #9
  store i32 1, ptr %28, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #9
  store i32 0, ptr %29, align 4, !tbaa !5
  br label %160

160:                                              ; preds = %278, %159
  %161 = load i32, ptr %29, align 4, !tbaa !5
  %162 = load i32, ptr %2, align 4, !tbaa !5
  %163 = icmp slt i32 %161, %162
  br i1 %163, label %169, label %164

164:                                              ; preds = %160
  store i32 9, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  br label %282

165:                                              ; preds = %150
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %13, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %14, align 4
  br label %330

169:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 48, ptr %31) #9
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %31) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %33) #9
  invoke void @_ZN8LeftHull8get_hullEv(ptr dead_on_unwind writable sret(%"class.std::vector.13") align 8 %33, ptr noundef nonnull align 8 dereferenceable(52) %10)
          to label %170 unwind label %180

170:                                              ; preds = %169
  store ptr %33, ptr %32, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #9
  %171 = load ptr, ptr %32, align 8, !tbaa !15
  %172 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %171) #9
  %173 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.18", ptr %34, i32 0, i32 0
  store ptr %172, ptr %173, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #9
  %174 = load ptr, ptr %32, align 8, !tbaa !15
  %175 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %174) #9
  %176 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.18", ptr %35, i32 0, i32 0
  store ptr %175, ptr %176, align 8
  br label %177

177:                                              ; preds = %193, %170
  %178 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 8 dereferenceable(8) %35) #9
  br i1 %178, label %184, label %179

179:                                              ; preds = %177
  store i32 12, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  br label %200

180:                                              ; preds = %169
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %13, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %14, align 4
  br label %199

184:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #9
  %185 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #9
  %186 = load i32, ptr %185, align 4, !tbaa !5
  store i32 %186, ptr %36, align 4, !tbaa !5
  %187 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %31, ptr noundef nonnull align 4 dereferenceable(4) %36)
          to label %188 unwind label %195

188:                                              ; preds = %184
  %189 = getelementptr inbounds { ptr, i8 }, ptr %37, i32 0, i32 0
  %190 = extractvalue { ptr, i8 } %187, 0
  store ptr %190, ptr %189, align 8
  %191 = getelementptr inbounds { ptr, i8 }, ptr %37, i32 0, i32 1
  %192 = extractvalue { ptr, i8 } %187, 1
  store i8 %192, ptr %191, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  br label %193

193:                                              ; preds = %188
  %194 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #9
  br label %177

195:                                              ; preds = %184
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %13, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %33) #9
  br label %199

199:                                              ; preds = %195, %180
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  br label %281

200:                                              ; preds = %179
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %39) #9
  invoke void @_ZN8LeftHull8get_hullEv(ptr dead_on_unwind writable sret(%"class.std::vector.13") align 8 %39, ptr noundef nonnull align 8 dereferenceable(52) %20)
          to label %201 unwind label %211

201:                                              ; preds = %200
  store ptr %39, ptr %38, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #9
  %202 = load ptr, ptr %38, align 8, !tbaa !15
  %203 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %202) #9
  %204 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.18", ptr %40, i32 0, i32 0
  store ptr %203, ptr %204, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #9
  %205 = load ptr, ptr %38, align 8, !tbaa !15
  %206 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %205) #9
  %207 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.18", ptr %41, i32 0, i32 0
  store ptr %206, ptr %207, align 8
  br label %208

208:                                              ; preds = %228, %201
  %209 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull align 8 dereferenceable(8) %41) #9
  br i1 %209, label %215, label %210

210:                                              ; preds = %208
  store i32 14, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %39) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %39) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  br label %235

211:                                              ; preds = %200
  %212 = landingpad { ptr, i32 }
          cleanup
  %213 = extractvalue { ptr, i32 } %212, 0
  store ptr %213, ptr %13, align 8
  %214 = extractvalue { ptr, i32 } %212, 1
  store i32 %214, ptr %14, align 4
  br label %234

215:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #9
  %216 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %40) #9
  %217 = load i32, ptr %216, align 4, !tbaa !5
  store i32 %217, ptr %42, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #9
  %218 = load i32, ptr %2, align 4, !tbaa !5
  %219 = sub nsw i32 %218, 1
  %220 = load i32, ptr %42, align 4, !tbaa !5
  %221 = sub nsw i32 %219, %220
  store i32 %221, ptr %43, align 4, !tbaa !5
  %222 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) %31, ptr noundef nonnull align 4 dereferenceable(4) %43)
          to label %223 unwind label %230

223:                                              ; preds = %215
  %224 = getelementptr inbounds { ptr, i8 }, ptr %44, i32 0, i32 0
  %225 = extractvalue { ptr, i8 } %222, 0
  store ptr %225, ptr %224, align 8
  %226 = getelementptr inbounds { ptr, i8 }, ptr %44, i32 0, i32 1
  %227 = extractvalue { ptr, i8 } %222, 1
  store i8 %227, ptr %226, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #9
  br label %228

228:                                              ; preds = %223
  %229 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %40) #9
  br label %208

230:                                              ; preds = %215
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %13, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %39) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %39) #9
  br label %234

234:                                              ; preds = %230, %211
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  br label %281

235:                                              ; preds = %210
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #9
  store ptr %31, ptr %45, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #9
  %236 = load ptr, ptr %45, align 8, !tbaa !15
  %237 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %236) #9
  %238 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %46, i32 0, i32 0
  store ptr %237, ptr %238, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #9
  %239 = load ptr, ptr %45, align 8, !tbaa !15
  %240 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %239) #9
  %241 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %47, i32 0, i32 0
  store ptr %240, ptr %241, align 8
  br label %242

242:                                              ; preds = %271, %235
  %243 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull align 8 dereferenceable(8) %47) #9
  br i1 %243, label %245, label %244

244:                                              ; preds = %242
  store i32 16, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #9
  br label %277

245:                                              ; preds = %242
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #9
  %246 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %46) #9
  %247 = load i32, ptr %246, align 4, !tbaa !5
  store i32 %247, ptr %48, align 4, !tbaa !5
  %248 = load i32, ptr %48, align 4, !tbaa !5
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [300009 x i32], ptr @layer, i64 0, i64 %249
  %251 = load i32, ptr %250, align 4, !tbaa !5
  %252 = icmp ne i32 %251, 0
  %253 = xor i1 %252, true
  br i1 %253, label %254, label %255

254:                                              ; preds = %245
  br label %257

255:                                              ; preds = %245
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.5, i32 noundef 145, ptr noundef @__PRETTY_FUNCTION__.main) #10
  unreachable

256:                                              ; No predecessors!
  br label %257

257:                                              ; preds = %256, %254
  %258 = load i32, ptr %29, align 4, !tbaa !5
  %259 = add nsw i32 %258, 1
  store i32 %259, ptr %29, align 4, !tbaa !5
  %260 = load i32, ptr %28, align 4, !tbaa !5
  %261 = load i32, ptr %48, align 4, !tbaa !5
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [300009 x i32], ptr @layer, i64 0, i64 %262
  store i32 %260, ptr %263, align 4, !tbaa !5
  %264 = load i32, ptr %48, align 4, !tbaa !5
  invoke void @_ZN8LeftHull5eraseEi(ptr noundef nonnull align 8 dereferenceable(52) %10, i32 noundef %264)
          to label %265 unwind label %273

265:                                              ; preds = %257
  %266 = load i32, ptr %2, align 4, !tbaa !5
  %267 = sub nsw i32 %266, 1
  %268 = load i32, ptr %48, align 4, !tbaa !5
  %269 = sub nsw i32 %267, %268
  invoke void @_ZN8LeftHull5eraseEi(ptr noundef nonnull align 8 dereferenceable(52) %20, i32 noundef %269)
          to label %270 unwind label %273

270:                                              ; preds = %265
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #9
  br label %271

271:                                              ; preds = %270
  %272 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %46) #9
  br label %242

273:                                              ; preds = %265, %257
  %274 = landingpad { ptr, i32 }
          cleanup
  %275 = extractvalue { ptr, i32 } %274, 0
  store ptr %275, ptr %13, align 8
  %276 = extractvalue { ptr, i32 } %274, 1
  store i32 %276, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #9
  br label %281

277:                                              ; preds = %244
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %31) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr %31) #9
  br label %278

278:                                              ; preds = %277
  %279 = load i32, ptr %28, align 4, !tbaa !5
  %280 = add nsw i32 %279, 1
  store i32 %280, ptr %28, align 4, !tbaa !5
  br label %160, !llvm.loop !19

281:                                              ; preds = %273, %234, %199
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %31) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  br label %330

282:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #9
  store i32 0, ptr %49, align 4, !tbaa !5
  br label %283

283:                                              ; preds = %301, %282
  %284 = load i32, ptr %49, align 4, !tbaa !5
  %285 = load i32, ptr %2, align 4, !tbaa !5
  %286 = icmp slt i32 %284, %285
  br i1 %286, label %288, label %287

287:                                              ; preds = %283
  store i32 18, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #9
  br label %308

288:                                              ; preds = %283
  %289 = load i32, ptr %49, align 4, !tbaa !5
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds [300009 x i32], ptr @layer, i64 0, i64 %290
  %292 = load i32, ptr %291, align 4, !tbaa !5
  %293 = load i32, ptr %49, align 4, !tbaa !5
  %294 = sext i32 %293 to i64
  %295 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @pts, i64 noundef %294) #9
  %296 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapI2PTiSt4lessIS0_ESaISt4pairIKS0_iEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) @id, ptr noundef nonnull align 8 dereferenceable(16) %295)
          to label %297 unwind label %304

297:                                              ; preds = %288
  %298 = load i32, ptr %296, align 4, !tbaa !5
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds [300009 x i32], ptr @ans, i64 0, i64 %299
  store i32 %292, ptr %300, align 4, !tbaa !5
  br label %301

301:                                              ; preds = %297
  %302 = load i32, ptr %49, align 4, !tbaa !5
  %303 = add nsw i32 %302, 1
  store i32 %303, ptr %49, align 4, !tbaa !5
  br label %283, !llvm.loop !20

304:                                              ; preds = %288
  %305 = landingpad { ptr, i32 }
          cleanup
  %306 = extractvalue { ptr, i32 } %305, 0
  store ptr %306, ptr %13, align 8
  %307 = extractvalue { ptr, i32 } %305, 1
  store i32 %307, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #9
  br label %330

308:                                              ; preds = %287
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #9
  store i32 0, ptr %50, align 4, !tbaa !5
  br label %309

309:                                              ; preds = %321, %308
  %310 = load i32, ptr %50, align 4, !tbaa !5
  %311 = load i32, ptr %2, align 4, !tbaa !5
  %312 = icmp slt i32 %310, %311
  br i1 %312, label %314, label %313

313:                                              ; preds = %309
  store i32 21, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #9
  br label %328

314:                                              ; preds = %309
  %315 = load i32, ptr %50, align 4, !tbaa !5
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds [300009 x i32], ptr @ans, i64 0, i64 %316
  %318 = load i32, ptr %317, align 4, !tbaa !5
  %319 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %318)
          to label %320 unwind label %324

320:                                              ; preds = %314
  br label %321

321:                                              ; preds = %320
  %322 = load i32, ptr %50, align 4, !tbaa !5
  %323 = add nsw i32 %322, 1
  store i32 %323, ptr %50, align 4, !tbaa !5
  br label %309, !llvm.loop !21

324:                                              ; preds = %314
  %325 = landingpad { ptr, i32 }
          cleanup
  %326 = extractvalue { ptr, i32 } %325, 0
  store ptr %326, ptr %13, align 8
  %327 = extractvalue { ptr, i32 } %325, 1
  store i32 %327, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #9
  br label %330

328:                                              ; preds = %313
  call void @_ZN8LeftHullD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %20) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %20) #9
  call void @_ZN8LeftHullD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %10) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  %329 = load i32, ptr %1, align 4
  ret i32 %329

330:                                              ; preds = %324, %304, %281, %165, %146
  call void @_ZN8LeftHullD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %20) #9
  br label %331

331:                                              ; preds = %330, %130
  call void @llvm.lifetime.end.p0(i64 56, ptr %20) #9
  br label %332

332:                                              ; preds = %331, %117, %101
  call void @_ZN8LeftHullD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %10) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  br label %333

333:                                              ; preds = %332
  %334 = load ptr, ptr %13, align 8
  %335 = load i32, ptr %14, align 4
  %336 = insertvalue { ptr, i32 } poison, ptr %334, 0
  %337 = insertvalue { ptr, i32 } %336, i32 %335, 1
  resume { ptr, i32 } %337
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr, ptr) #5

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr, ptr) #5

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_ZNK2PTngEv(ptr noundef nonnull align 8 dereferenceable(16)) #6 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8LeftHull8get_hullEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.13") align 8, ptr noundef nonnull align 8 dereferenceable(52)) #4 align 2

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #8

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8LeftHullD2Ev(ptr noundef nonnull align 8 dereferenceable(52)) unnamed_addr #7 align 2

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

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

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


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl" }
%"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl" = type { %"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl_data" }
%"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<PT, std::pair<const PT, int>, std::_Select1st<std::pair<const PT, int>>, std::less<PT>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<PT, std::pair<const PT, int>, std::_Select1st<std::pair<const PT, int>>, std::less<PT>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%struct.PT = type { i64, i64 }
%struct.LeftHull = type <{ %"class.std::vector", %"class.std::vector.3", i32, [4 x i8] }>
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<LeftHull::node, std::allocator<LeftHull::node>>::_Vector_impl" }
%"struct.std::_Vector_base<LeftHull::node, std::allocator<LeftHull::node>>::_Vector_impl" = type { %"struct.std::_Vector_base<LeftHull::node, std::allocator<LeftHull::node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<LeftHull::node, std::allocator<LeftHull::node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::set" = type { %"class.std::_Rb_tree.8" }
%"class.std::_Rb_tree.8" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.18" = type { ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@pts = external dso_local global %"class.std::vector", align 8
@id = external dso_local global %"class.std::map", align 8
@layer = external dso_local local_unnamed_addr global [300009 x i32], align 16
@ans = external dso_local local_unnamed_addr global [300009 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [95 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %struct.PT, align 8
  %5 = alloca %struct.PT, align 8
  %6 = alloca %struct.LeftHull, align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %struct.LeftHull, align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.std::set", align 8
  %13 = alloca %"class.std::vector.13", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.18", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.18", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::vector.13", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.18", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.18", align 8
  %20 = alloca i32, align 4
  %21 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %22 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %24 = load i32, ptr %1, align 4, !tbaa !5
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0
  %26 = getelementptr inbounds i8, ptr %4, i64 8
  %27 = getelementptr inbounds i8, ptr %5, i64 8
  br label %32

._crit_edge:                                      ; preds = %32, %0
  %28 = call ptr @_ZNSt6vectorI2PTSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #8
  %29 = call ptr @_ZNSt6vectorI2PTSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %28, ptr %29)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %6) #8
  call void @_ZN8LeftHullC2ERKSt6vectorI2PTSaIS1_EE(ptr noundef nonnull align 8 dereferenceable(52) %6, ptr noundef nonnull align 8 dereferenceable(24) @pts)
  %30 = call ptr @_ZNSt6vectorI2PTSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #8
  %31 = call ptr @_ZNSt6vectorI2PTSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %30, ptr %31)
          to label %46 unwind label %50

32:                                               ; preds = %.lr.ph, %32
  %.04365 = phi i32 [ 0, %.lr.ph ], [ %43, %32 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %2, ptr noundef nonnull %3)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #8
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  store i64 %35, ptr %4, align 8, !tbaa !9
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  store i64 %37, ptr %26, align 8, !tbaa !12
  call void @_ZNSt6vectorI2PTSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) @pts, ptr noundef nonnull align 8 dereferenceable(16) %4)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #8
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  store i64 %39, ptr %5, align 8, !tbaa !9
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  store i64 %41, ptr %27, align 8, !tbaa !12
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapI2PTiSt4lessIS0_ESaISt4pairIKS0_iEEEixEOS0_(ptr noundef nonnull align 8 dereferenceable(48) @id, ptr noundef nonnull align 8 dereferenceable(16) %5)
  store i32 %.04365, ptr %42, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  %43 = add nuw nsw i32 %.04365, 1
  %44 = load i32, ptr %1, align 4, !tbaa !5
  %45 = icmp slt i32 %43, %44
  br i1 %45, label %32, label %._crit_edge, !llvm.loop !13

46:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %47 = call ptr @_ZNSt6vectorI2PTSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #8
  store ptr %47, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %48 = call ptr @_ZNSt6vectorI2PTSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #8
  store ptr %48, ptr %8, align 8
  %49 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP2PTSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  br i1 %49, label %.lr.ph67, label %._crit_edge68

._crit_edge68:                                    ; preds = %.lr.ph67, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %9) #8
  invoke void @_ZN8LeftHullC2ERKSt6vectorI2PTSaIS1_EE(ptr noundef nonnull align 8 dereferenceable(52) %9, ptr noundef nonnull align 8 dereferenceable(24) @pts)
          to label %58 unwind label %66

50:                                               ; preds = %._crit_edge
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %154

.lr.ph67:                                         ; preds = %46, %.lr.ph67
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  %53 = call { i64, i64 } @_ZNK2PTngEv(ptr noundef nonnull align 8 dereferenceable(16) %52)
  %54 = extractvalue { i64, i64 } %53, 0
  %55 = extractvalue { i64, i64 } %53, 1
  store i64 %54, ptr %52, align 8, !tbaa !15
  %.sroa.429.0..sroa_idx = getelementptr inbounds i8, ptr %52, i64 8
  store i64 %55, ptr %.sroa.429.0..sroa_idx, align 8, !tbaa !15
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  %57 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP2PTSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  br i1 %57, label %.lr.ph67, label %._crit_edge68

58:                                               ; preds = %._crit_edge68
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %59 = call ptr @_ZNSt6vectorI2PTSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #8
  store ptr %59, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  %60 = call ptr @_ZNSt6vectorI2PTSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #8
  store ptr %60, ptr %11, align 8
  %61 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP2PTSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  br i1 %61, label %.lr.ph70, label %._crit_edge71

._crit_edge71:                                    ; preds = %.lr.ph70, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  %62 = call ptr @_ZNSt6vectorI2PTSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #8
  %63 = call ptr @_ZNSt6vectorI2PTSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @pts) #8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %62, ptr %63)
          to label %.preheader62 unwind label %75

.preheader62:                                     ; preds = %._crit_edge71
  %64 = load i32, ptr %1, align 4, !tbaa !5
  %65 = icmp sgt i32 %64, 0
  br i1 %65, label %.lr.ph84, label %._crit_edge89

66:                                               ; preds = %._crit_edge68
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %153

.lr.ph70:                                         ; preds = %58, %.lr.ph70
  %68 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  %69 = call { i64, i64 } @_ZNK2PTngEv(ptr noundef nonnull align 8 dereferenceable(16) %68)
  %70 = extractvalue { i64, i64 } %69, 0
  %71 = extractvalue { i64, i64 } %69, 1
  store i64 %70, ptr %68, align 8, !tbaa !15
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %68, i64 8
  store i64 %71, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !15
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  %73 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP2PTSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  br i1 %73, label %.lr.ph70, label %._crit_edge71

.preheader61:                                     ; preds = %._crit_edge81
  %74 = icmp sgt i32 %112, 0
  br i1 %74, label %.lr.ph86, label %._crit_edge89

75:                                               ; preds = %._crit_edge71
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %152

.lr.ph84:                                         ; preds = %.preheader62, %._crit_edge81
  %.05183 = phi i32 [ %111, %._crit_edge81 ], [ 1, %.preheader62 ]
  %.05282 = phi i32 [ %.153.lcssa, %._crit_edge81 ], [ 0, %.preheader62 ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %12) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #8
  invoke void @_ZN8LeftHull8get_hullEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.13") align 8 %13, ptr noundef nonnull align 8 dereferenceable(52) %6)
          to label %77 unwind label %81

77:                                               ; preds = %.lr.ph84
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  %78 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  store ptr %78, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #8
  %79 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  store ptr %79, ptr %15, align 8
  %80 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  br i1 %80, label %.lr.ph73, label %._crit_edge74

._crit_edge74:                                    ; preds = %86, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %17) #8
  invoke void @_ZN8LeftHull8get_hullEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.13") align 8 %17, ptr noundef nonnull align 8 dereferenceable(52) %9)
          to label %91 unwind label %98

81:                                               ; preds = %.lr.ph84
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %131

.lr.ph73:                                         ; preds = %77, %86
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #8
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  %84 = load i32, ptr %83, align 4, !tbaa !5
  store i32 %84, ptr %16, align 4, !tbaa !5
  %85 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %86 unwind label %89

86:                                               ; preds = %.lr.ph73
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #8
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  %88 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  br i1 %88, label %.lr.ph73, label %._crit_edge74

89:                                               ; preds = %.lr.ph73
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  br label %131

91:                                               ; preds = %._crit_edge74
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #8
  %92 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  store ptr %92, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #8
  %93 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  store ptr %93, ptr %19, align 8
  %94 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  br i1 %94, label %.lr.ph76, label %._crit_edge77

._crit_edge77:                                    ; preds = %106, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #8
  %95 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %12) #8
  store ptr %95, ptr %21, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #8
  %96 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %12) #8
  store ptr %96, ptr %22, align 8
  %97 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #8
  br i1 %97, label %.lr.ph80, label %._crit_edge81

98:                                               ; preds = %._crit_edge74
  %99 = landingpad { ptr, i32 }
          cleanup
  br label %131

.lr.ph76:                                         ; preds = %91, %106
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  %101 = load i32, ptr %100, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #8
  %102 = load i32, ptr %1, align 4, !tbaa !5
  %103 = xor i32 %101, -1
  %104 = add i32 %102, %103
  store i32 %104, ptr %20, align 4, !tbaa !5
  %105 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertEOi(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %106 unwind label %109

106:                                              ; preds = %.lr.ph76
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #8
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  %108 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  br i1 %108, label %.lr.ph76, label %._crit_edge77

109:                                              ; preds = %.lr.ph76
  %110 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #8
  br label %131

._crit_edge81:                                    ; preds = %126, %._crit_edge77
  %.153.lcssa = phi i32 [ %.05282, %._crit_edge77 ], [ %121, %126 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #8
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %12) #8
  %111 = add nuw nsw i32 %.05183, 1
  %112 = load i32, ptr %1, align 4, !tbaa !5
  %113 = icmp slt i32 %.153.lcssa, %112
  br i1 %113, label %.lr.ph84, label %.preheader61, !llvm.loop !16

.lr.ph80:                                         ; preds = %._crit_edge77, %126
  %.15378 = phi i32 [ %121, %126 ], [ %.05282, %._crit_edge77 ]
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #8
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [300009 x i32], ptr @layer, i64 0, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %.not = icmp eq i32 %118, 0
  br i1 %.not, label %120, label %119

119:                                              ; preds = %.lr.ph80
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5, i32 noundef 145, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

120:                                              ; preds = %.lr.ph80
  %121 = add nsw i32 %.15378, 1
  store i32 %.05183, ptr %117, align 4, !tbaa !5
  invoke void @_ZN8LeftHull5eraseEi(ptr noundef nonnull align 8 dereferenceable(52) %6, i32 noundef %115)
          to label %122 unwind label %129

122:                                              ; preds = %120
  %123 = load i32, ptr %1, align 4, !tbaa !5
  %124 = xor i32 %115, -1
  %125 = add i32 %123, %124
  invoke void @_ZN8LeftHull5eraseEi(ptr noundef nonnull align 8 dereferenceable(52) %9, i32 noundef %125)
          to label %126 unwind label %129

126:                                              ; preds = %122
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #8
  %128 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #8
  br i1 %128, label %.lr.ph80, label %._crit_edge81

129:                                              ; preds = %122, %120
  %130 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #8
  br label %131

131:                                              ; preds = %98, %109, %81, %89, %129
  %.pn55.pn = phi { ptr, i32 } [ %130, %129 ], [ %90, %89 ], [ %82, %81 ], [ %110, %109 ], [ %99, %98 ]
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %12) #8
  br label %152

.preheader:                                       ; preds = %137
  %132 = icmp sgt i32 %141, 0
  br i1 %132, label %.lr.ph88, label %._crit_edge89

.lr.ph86:                                         ; preds = %.preheader61, %137
  %indvars.iv = phi i64 [ %indvars.iv.next, %137 ], [ 0, %.preheader61 ]
  %133 = getelementptr inbounds [300009 x i32], ptr @layer, i64 0, i64 %indvars.iv
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @pts, i64 noundef %indvars.iv) #8
  %136 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapI2PTiSt4lessIS0_ESaISt4pairIKS0_iEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) @id, ptr noundef nonnull align 8 dereferenceable(16) %135)
          to label %137 unwind label %144

137:                                              ; preds = %.lr.ph86
  %138 = load i32, ptr %136, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [300009 x i32], ptr @ans, i64 0, i64 %139
  store i32 %134, ptr %140, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %141 = load i32, ptr %1, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = icmp slt i64 %indvars.iv.next, %142
  br i1 %143, label %.lr.ph86, label %.preheader, !llvm.loop !17

144:                                              ; preds = %.lr.ph86
  %145 = landingpad { ptr, i32 }
          cleanup
  br label %152

._crit_edge89:                                    ; preds = %.lr.ph88, %.preheader62, %.preheader61, %.preheader
  call void @_ZN8LeftHullD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %9) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #8
  call void @_ZN8LeftHullD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %6) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0

.lr.ph88:                                         ; preds = %.preheader, %.lr.ph88
  %indvars.iv92 = phi i64 [ %indvars.iv.next93, %.lr.ph88 ], [ 0, %.preheader ]
  %146 = getelementptr inbounds [300009 x i32], ptr @ans, i64 0, i64 %indvars.iv92
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %147)
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %149 = load i32, ptr %1, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = icmp slt i64 %indvars.iv.next93, %150
  br i1 %151, label %.lr.ph88, label %._crit_edge89, !llvm.loop !18

152:                                              ; preds = %144, %131, %75
  %.pn55.pn.pn = phi { ptr, i32 } [ %.pn55.pn, %131 ], [ %145, %144 ], [ %76, %75 ]
  call void @_ZN8LeftHullD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %9) #8
  br label %153

153:                                              ; preds = %152, %66
  %.pn55.pn.pn.pn = phi { ptr, i32 } [ %.pn55.pn.pn, %152 ], [ %67, %66 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #8
  br label %154

154:                                              ; preds = %153, %50
  %.pn55.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn55.pn.pn.pn, %153 ], [ %51, %50 ]
  call void @_ZN8LeftHullD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %6) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn55.pn.pn.pn.pn
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr, ptr) local_unnamed_addr #4

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr, ptr) local_unnamed_addr #4

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_ZNK2PTngEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8LeftHull8get_hullEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.13") align 8, ptr noundef nonnull align 8 dereferenceable(52)) local_unnamed_addr #3 align 2

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8LeftHull5eraseEi(ptr noundef nonnull align 8 dereferenceable(52), i32 noundef) local_unnamed_addr #3 align 2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8LeftHullD2Ev(ptr noundef nonnull align 8 dereferenceable(52)) unnamed_addr #6 align 2

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

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

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


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