; LLVM IR from ShahjalalShohag/code-library :: Geometry/Geometry 2D.ll (Z11convex_hullRSt6vectorI2PTSaIS0_EE)

; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%struct.PT = type { double, double }

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z11orientation2PTS_S_(ptr noundef, ptr noundef, ptr noundef) #2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 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) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11convex_hullRSt6vectorI2PTSaIS0_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i1, align 1
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca ptr, align 8
  %16 = alloca %struct.PT, align 8
  %17 = alloca %struct.PT, align 8
  %18 = alloca %struct.PT, align 8
  %19 = alloca %struct.PT, align 8
  %20 = alloca %struct.PT, align 8
  %21 = alloca %struct.PT, 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 %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca ptr, align 8
  %28 = alloca %struct.PT, align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #5
  %31 = icmp ule i64 %30, 1
  br i1 %31, label %32, label %34

32:                                               ; preds = %2
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNSt6vectorI2PTSaIS0_EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %33)
  br label %163

34:                                               ; preds = %2
  store i1 false, ptr %5, align 1
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNSt6vectorI2PTSaIS0_EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %35)
  %36 = call ptr @_ZNSt6vectorI2PTSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %37 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %36, ptr %37, align 8
  %38 = call ptr @_ZNSt6vectorI2PTSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %39 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %38, ptr %39, align 8
  %40 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8
  %42 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %41, ptr %43)
          to label %44 unwind label %54

44:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #5
  call void @_ZNSt6vectorI2PTSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #5
  call void @_ZNSt6vectorI2PTSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store ptr %0, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  %46 = call ptr @_ZNSt6vectorI2PTSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %45) #5
  %47 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %46, ptr %47, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %48 = load ptr, ptr %12, align 8, !tbaa !5
  %49 = call ptr @_ZNSt6vectorI2PTSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #5
  %50 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %49, ptr %50, align 8
  br label %51

51:                                               ; preds = %106, %44
  %52 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP2PTSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br i1 %52, label %58, label %53

53:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %108

54:                                               ; preds = %34
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %8, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %9, align 4
  br label %162

58:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %59 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  store ptr %59, ptr %15, align 8, !tbaa !5
  br label %60

60:                                               ; preds = %77, %58
  %61 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %62 = icmp ugt i64 %61, 1
  br i1 %62, label %63, label %75

63:                                               ; preds = %60
  %64 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %65 = sub i64 %64, 2
  %66 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %65) #5
  invoke void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %66)
          to label %67 unwind label %78

67:                                               ; preds = %63
  %68 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  invoke void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %68)
          to label %69 unwind label %78

69:                                               ; preds = %67
  %70 = load ptr, ptr %15, align 8, !tbaa !5
  invoke void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %70)
          to label %71 unwind label %78

71:                                               ; preds = %69
  %72 = invoke noundef i32 @_Z11orientation2PTS_S_(ptr noundef %16, ptr noundef %17, ptr noundef %18)
          to label %73 unwind label %78

73:                                               ; preds = %71
  %74 = icmp sge i32 %72, 0
  br label %75

75:                                               ; preds = %73, %60
  %76 = phi i1 [ false, %60 ], [ %74, %73 ]
  br i1 %76, label %77, label %82

77:                                               ; preds = %75
  call void @_ZNSt6vectorI2PTSaIS0_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  br label %60, !llvm.loop !9

78:                                               ; preds = %103, %101, %94, %92, %90, %86, %71, %69, %67, %63
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %8, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %159

82:                                               ; preds = %75
  br label %83

83:                                               ; preds = %100, %82
  %84 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  %85 = icmp ugt i64 %84, 1
  br i1 %85, label %86, label %98

86:                                               ; preds = %83
  %87 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  %88 = sub i64 %87, 2
  %89 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %88) #5
  invoke void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %89)
          to label %90 unwind label %78

90:                                               ; preds = %86
  %91 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  invoke void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %91)
          to label %92 unwind label %78

92:                                               ; preds = %90
  %93 = load ptr, ptr %15, align 8, !tbaa !5
  invoke void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %93)
          to label %94 unwind label %78

94:                                               ; preds = %92
  %95 = invoke noundef i32 @_Z11orientation2PTS_S_(ptr noundef %19, ptr noundef %20, ptr noundef %21)
          to label %96 unwind label %78

96:                                               ; preds = %94
  %97 = icmp sle i32 %95, 0
  br label %98

98:                                               ; preds = %96, %83
  %99 = phi i1 [ false, %83 ], [ %97, %96 ]
  br i1 %99, label %100, label %101

100:                                              ; preds = %98
  call void @_ZNSt6vectorI2PTSaIS0_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  br label %83, !llvm.loop !11

101:                                              ; preds = %98
  %102 = load ptr, ptr %15, align 8, !tbaa !5
  invoke void @_ZNSt6vectorI2PTSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(16) %102)
          to label %103 unwind label %78

103:                                              ; preds = %101
  %104 = load ptr, ptr %15, align 8, !tbaa !5
  invoke void @_ZNSt6vectorI2PTSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(16) %104)
          to label %105 unwind label %78

105:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %106

106:                                              ; preds = %105
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  br label %51

108:                                              ; preds = %53
  %109 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI2PTSaIS0_EEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %110 unwind label %114

110:                                              ; preds = %108
  %111 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %112 = icmp ugt i64 %111, 1
  br i1 %112, label %113, label %118

113:                                              ; preds = %110
  call void @_ZNSt6vectorI2PTSaIS0_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %118

114:                                              ; preds = %153, %150, %118, %108
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %8, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %9, align 4
  br label %159

118:                                              ; preds = %113, %110
  %119 = call ptr @_ZNSt6vectorI2PTSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %120 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %119, ptr %120, align 8
  %121 = call ptr @_ZNSt6vectorI2PTSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %122 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %121, ptr %122, align 8
  %123 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  %124 = load ptr, ptr %123, align 8
  %125 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  %126 = load ptr, ptr %125, align 8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %124, ptr %126)
          to label %127 unwind label %114

127:                                              ; preds = %118
  call void @_ZNSt6vectorI2PTSaIS0_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  store ptr %10, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %128 = load ptr, ptr %24, align 8, !tbaa !5
  %129 = call ptr @_ZNSt6vectorI2PTSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %128) #5
  %130 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %129, ptr %130, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %131 = load ptr, ptr %24, align 8, !tbaa !5
  %132 = call ptr @_ZNSt6vectorI2PTSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %131) #5
  %133 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %132, ptr %133, align 8
  br label %134

134:                                              ; preds = %141, %127
  %135 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP2PTSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #5
  br i1 %135, label %137, label %136

136:                                              ; preds = %134
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %147

137:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %138 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #5
  store ptr %138, ptr %27, align 8, !tbaa !5
  %139 = load ptr, ptr %27, align 8, !tbaa !5
  invoke void @_ZNSt6vectorI2PTSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(16) %139)
          to label %140 unwind label %143

140:                                              ; preds = %137
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  br label %141

141:                                              ; preds = %140
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #5
  br label %134

143:                                              ; preds = %137
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %8, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %159

147:                                              ; preds = %136
  %148 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %149 = icmp eq i64 %148, 2
  br i1 %149, label %150, label %157

150:                                              ; preds = %147
  %151 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #5
  %152 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #5
  invoke void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(16) %152)
          to label %153 unwind label %114

153:                                              ; preds = %150
  %154 = invoke noundef zeroext i1 @_ZNK2PTeqES_(ptr noundef nonnull align 8 dereferenceable(16) %151, ptr noundef %28)
          to label %155 unwind label %114

155:                                              ; preds = %153
  br i1 %154, label %156, label %157

156:                                              ; preds = %155
  call void @_ZNSt6vectorI2PTSaIS0_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %157

157:                                              ; preds = %156, %155, %147
  store i1 true, ptr %5, align 1
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  %158 = load i1, ptr %5, align 1
  br i1 %158, label %161, label %160

159:                                              ; preds = %143, %114, %78
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  br label %162

160:                                              ; preds = %157
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %161

161:                                              ; preds = %160, %157
  br label %163

162:                                              ; preds = %159, %54
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %164

163:                                              ; preds = %161, %32
  ret void

164:                                              ; preds = %162
  %165 = load ptr, ptr %8, align 8
  %166 = load i32, ptr %9, align 4
  %167 = insertvalue { ptr, i32 } poison, ptr %165, 0
  %168 = insertvalue { ptr, i32 } %167, i32 %166, 1
  resume { ptr, i32 } %168
}

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI2PTSaIS0_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 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)) #1 align 2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 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 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 #5 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%struct.PT = type { double, double }

; 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 nounwind uwtable
declare dso_local void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK2PTeqES_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 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 #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11convex_hullRSt6vectorI2PTSaIS0_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %struct.PT, align 8
  %8 = alloca %struct.PT, align 8
  %9 = alloca %struct.PT, align 8
  %10 = alloca %struct.PT, align 8
  %11 = alloca %struct.PT, align 8
  %12 = alloca %struct.PT, align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %struct.PT, align 8
  %16 = tail call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %17 = icmp ult i64 %16, 2
  tail call void @_ZNSt6vectorI2PTSaIS0_EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1)
  br i1 %17, label %86, label %18

18:                                               ; preds = %2
  %19 = tail call ptr @_ZNSt6vectorI2PTSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %20 = tail call ptr @_ZNSt6vectorI2PTSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %19, ptr %20)
          to label %21 unwind label %26

21:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  call void @_ZNSt6vectorI2PTSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @_ZNSt6vectorI2PTSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %22 = call ptr @_ZNSt6vectorI2PTSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  store ptr %22, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %23 = call ptr @_ZNSt6vectorI2PTSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  store ptr %23, ptr %6, align 8
  %24 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP2PTSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %24, label %.lr.ph29, label %._crit_edge

._crit_edge:                                      ; preds = %54, %21
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  %25 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI2PTSaIS0_EEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %57 unwind label %61

26:                                               ; preds = %18
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %85

.lr.ph29:                                         ; preds = %21, %54
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %29 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %30 = icmp ugt i64 %29, 1
  br i1 %30, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %.lr.ph29, %38
  %31 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %32 = add i64 %31, -2
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %32) #5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %33)
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %34)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %28)
  %35 = invoke noundef i32 @_Z11orientation2PTS_S_(ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9)
          to label %36 unwind label %.loopexit.split-lp.loopexit

36:                                               ; preds = %.lr.ph
  %37 = icmp sgt i32 %35, -1
  br i1 %37, label %38, label %.critedge

38:                                               ; preds = %36
  call void @_ZNSt6vectorI2PTSaIS0_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %39 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %40 = icmp ugt i64 %39, 1
  br i1 %40, label %.lr.ph, label %.critedge, !llvm.loop !5

.loopexit:                                        ; preds = %.lr.ph27
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %.lr.ph
  %lpad.loopexit23 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp:             ; preds = %53, %.critedge2
  %lpad.loopexit.split-lp24 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp:                               ; preds = %.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit23, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp24, %.loopexit.split-lp.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %84

.critedge:                                        ; preds = %36, %38, %.lr.ph29
  %41 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %42 = icmp ugt i64 %41, 1
  br i1 %42, label %.lr.ph27, label %.critedge2

.lr.ph27:                                         ; preds = %.critedge, %50
  %43 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %44 = add i64 %43, -2
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %44) #5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %45)
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %46)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %28)
  %47 = invoke noundef i32 @_Z11orientation2PTS_S_(ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12)
          to label %48 unwind label %.loopexit

48:                                               ; preds = %.lr.ph27
  %49 = icmp slt i32 %47, 1
  br i1 %49, label %50, label %.critedge2

50:                                               ; preds = %48
  call void @_ZNSt6vectorI2PTSaIS0_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %51 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %52 = icmp ugt i64 %51, 1
  br i1 %52, label %.lr.ph27, label %.critedge2, !llvm.loop !7

.critedge2:                                       ; preds = %48, %50, %.critedge
  invoke void @_ZNSt6vectorI2PTSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(16) %28)
          to label %53 unwind label %.loopexit.split-lp.loopexit.split-lp

53:                                               ; preds = %.critedge2
  invoke void @_ZNSt6vectorI2PTSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(16) %28)
          to label %54 unwind label %.loopexit.split-lp.loopexit.split-lp

54:                                               ; preds = %53
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %56 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP2PTSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %56, label %.lr.ph29, label %._crit_edge

57:                                               ; preds = %._crit_edge
  %58 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %59 = icmp ugt i64 %58, 1
  br i1 %59, label %60, label %63

60:                                               ; preds = %57
  call void @_ZNSt6vectorI2PTSaIS0_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %63

61:                                               ; preds = %63, %._crit_edge
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %84

63:                                               ; preds = %60, %57
  %64 = call ptr @_ZNSt6vectorI2PTSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %65 = call ptr @_ZNSt6vectorI2PTSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %64, ptr %65)
          to label %66 unwind label %61

66:                                               ; preds = %63
  call void @_ZNSt6vectorI2PTSaIS0_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #5
  %67 = call ptr @_ZNSt6vectorI2PTSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  store ptr %67, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  %68 = call ptr @_ZNSt6vectorI2PTSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  store ptr %68, ptr %14, align 8
  %69 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP2PTSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br i1 %69, label %.lr.ph31, label %._crit_edge32

._crit_edge32:                                    ; preds = %73, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  %70 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %71 = icmp eq i64 %70, 2
  br i1 %71, label %78, label %83

.lr.ph31:                                         ; preds = %66, %73
  %72 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  invoke void @_ZNSt6vectorI2PTSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(16) %72)
          to label %73 unwind label %76

73:                                               ; preds = %.lr.ph31
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP2PTSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  %75 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP2PTSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br i1 %75, label %.lr.ph31, label %._crit_edge32

76:                                               ; preds = %.lr.ph31
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  br label %84

78:                                               ; preds = %._crit_edge32
  %79 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #5
  %80 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %80)
  %81 = call noundef zeroext i1 @_ZNK2PTeqES_(ptr noundef nonnull align 8 dereferenceable(16) %79, ptr noundef nonnull %15)
  br i1 %81, label %82, label %83

82:                                               ; preds = %78
  call void @_ZNSt6vectorI2PTSaIS0_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %83

83:                                               ; preds = %82, %78, %._crit_edge32
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  br label %86

84:                                               ; preds = %76, %61, %.loopexit.split-lp
  %.pn = phi { ptr, i32 } [ %lpad.phi, %.loopexit.split-lp ], [ %77, %76 ], [ %62, %61 ]
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  br label %85

85:                                               ; preds = %84, %26
  %.pn.pn = phi { ptr, i32 } [ %.pn, %84 ], [ %27, %26 ]
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  resume { ptr, i32 } %.pn.pn

86:                                               ; preds = %2, %83
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI2PTSaIS0_EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) 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 #2

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

; 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 #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI2PTSaIS0_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 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 #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI2PTSaIS0_EEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_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 #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 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 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 #5 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}


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