; LLVM IR from ritikbanger/Hacktoberfest2022-DSA :: 30. CPP Programs/Geometry/ConvexHull.ll (Z21convexHullJarvisMarchRSt6vectorI5PointSaIS0_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.Point = type { i64, i64, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl" }
%"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl" = type { %"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5PointmiES_(ptr dead_on_unwind noalias writable sret(%class.Point) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef byval(%class.Point) align 8) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z11orientation5PointS_S_(ptr noundef byval(%class.Point) align 8, ptr noundef byval(%class.Point) align 8, ptr noundef byval(%class.Point) align 8) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z3dot5PointS_(ptr noundef byval(%class.Point) align 8, ptr noundef byval(%class.Point) align 8) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z21convexHullJarvisMarchRSt6vectorI5PointSaIS0_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::vector.0", align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::allocator.2", align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i1, align 1
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %class.Point, align 8
  %18 = alloca %class.Point, align 8
  %19 = alloca %class.Point, align 8
  %20 = alloca %class.Point, align 8
  %21 = alloca %class.Point, align 8
  %22 = alloca %class.Point, align 8
  %23 = alloca %class.Point, align 8
  %24 = alloca %class.Point, align 8
  %25 = alloca %class.Point, align 8
  %26 = alloca %class.Point, align 8
  %27 = alloca %class.Point, align 8
  %28 = alloca %class.Point, align 8
  %29 = alloca %class.Point, align 8
  %30 = alloca %class.Point, align 8
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca %class.Point, align 8
  %34 = alloca %class.Point, align 8
  %35 = alloca %class.Point, align 8
  %36 = alloca %class.Point, align 8
  %37 = alloca i32, align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = call noundef i64 @_ZNKSt6vectorI5PointSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #4
  %40 = trunc i64 %39 to i32
  store i32 %40, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %91, %2
  %42 = load i32, ptr %7, align 4, !tbaa !9
  %43 = load i32, ptr %5, align 4, !tbaa !9
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %94

46:                                               ; preds = %41
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = load i32, ptr %7, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %49) #4
  %51 = getelementptr inbounds %class.Point, ptr %50, i32 0, i32 0
  %52 = load i64, ptr %51, align 8, !tbaa !11
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = load i32, ptr %6, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %55) #4
  %57 = getelementptr inbounds %class.Point, ptr %56, i32 0, i32 0
  %58 = load i64, ptr %57, align 8, !tbaa !11
  %59 = icmp slt i64 %52, %58
  br i1 %59, label %88, label %60

60:                                               ; preds = %46
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = load i32, ptr %7, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %63) #4
  %65 = getelementptr inbounds %class.Point, ptr %64, i32 0, i32 0
  %66 = load i64, ptr %65, align 8, !tbaa !11
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = load i32, ptr %6, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %67, i64 noundef %69) #4
  %71 = getelementptr inbounds %class.Point, ptr %70, i32 0, i32 0
  %72 = load i64, ptr %71, align 8, !tbaa !11
  %73 = icmp eq i64 %66, %72
  br i1 %73, label %74, label %90

74:                                               ; preds = %60
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = load i32, ptr %7, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %77) #4
  %79 = getelementptr inbounds %class.Point, ptr %78, i32 0, i32 1
  %80 = load i64, ptr %79, align 8, !tbaa !14
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = load i32, ptr %6, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %83) #4
  %85 = getelementptr inbounds %class.Point, ptr %84, i32 0, i32 1
  %86 = load i64, ptr %85, align 8, !tbaa !14
  %87 = icmp slt i64 %80, %86
  br i1 %87, label %88, label %90

88:                                               ; preds = %74, %46
  %89 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %89, ptr %6, align 4, !tbaa !9
  br label %90

90:                                               ; preds = %88, %74, %60
  br label %91

91:                                               ; preds = %90
  %92 = load i32, ptr %7, align 4, !tbaa !9
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %7, align 4, !tbaa !9
  br label %41, !llvm.loop !15

94:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #4
  %95 = load i32, ptr %5, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %96, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %97 unwind label %118

97:                                               ; preds = %94
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  store i1 false, ptr %13, align 1
  call void @_ZNSt6vectorI5PointSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %98 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %98, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = load i32, ptr %14, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %99, i64 noundef %101) #4
  invoke void @_ZNSt6vectorI5PointSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %102)
          to label %103 unwind label %122

103:                                              ; preds = %97
  %104 = load i32, ptr %14, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %105) #4
  store i32 1, ptr %106, align 4, !tbaa !9
  br label %107

107:                                              ; preds = %291, %103
  br label %108

108:                                              ; preds = %107
  %109 = load i32, ptr %14, align 4, !tbaa !9
  %110 = add nsw i32 %109, 1
  %111 = load i32, ptr %5, align 4, !tbaa !9
  %112 = srem i32 %110, %111
  store i32 %112, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %113

113:                                              ; preds = %205, %108
  %114 = load i32, ptr %16, align 4, !tbaa !9
  %115 = load i32, ptr %5, align 4, !tbaa !9
  %116 = icmp slt i32 %114, %115
  br i1 %116, label %126, label %117

117:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %208

118:                                              ; preds = %94
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %11, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %12, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %298

122:                                              ; preds = %97
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %11, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %12, align 4
  br label %295

126:                                              ; preds = %113
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = load i32, ptr %14, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %127, i64 noundef %129) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %130, i64 24, i1 false), !tbaa.struct !17
  %131 = load ptr, ptr %4, align 8, !tbaa !5
  %132 = load i32, ptr %15, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %131, i64 noundef %133) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %134, i64 24, i1 false), !tbaa.struct !17
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = load i32, ptr %16, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %135, i64 noundef %137) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %138, i64 24, i1 false), !tbaa.struct !17
  %139 = invoke noundef i32 @_Z11orientation5PointS_S_(ptr noundef byval(%class.Point) align 8 %17, ptr noundef byval(%class.Point) align 8 %18, ptr noundef byval(%class.Point) align 8 %19)
          to label %140 unwind label %200

140:                                              ; preds = %126
  %141 = icmp eq i32 %139, -1
  br i1 %141, label %198, label %142

142:                                              ; preds = %140
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = load i32, ptr %14, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %143, i64 noundef %145) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %146, i64 24, i1 false), !tbaa.struct !17
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = load i32, ptr %15, align 4, !tbaa !9
  %149 = sext i32 %148 to i64
  %150 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %147, i64 noundef %149) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %21, ptr align 8 %150, i64 24, i1 false), !tbaa.struct !17
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = load i32, ptr %16, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  %154 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %151, i64 noundef %153) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %154, i64 24, i1 false), !tbaa.struct !17
  %155 = invoke noundef i32 @_Z11orientation5PointS_S_(ptr noundef byval(%class.Point) align 8 %20, ptr noundef byval(%class.Point) align 8 %21, ptr noundef byval(%class.Point) align 8 %22)
          to label %156 unwind label %200

156:                                              ; preds = %142
  %157 = icmp eq i32 %155, 0
  br i1 %157, label %158, label %204

158:                                              ; preds = %156
  %159 = load ptr, ptr %4, align 8, !tbaa !5
  %160 = load i32, ptr %16, align 4, !tbaa !9
  %161 = sext i32 %160 to i64
  %162 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %159, i64 noundef %161) #4
  %163 = load ptr, ptr %4, align 8, !tbaa !5
  %164 = load i32, ptr %14, align 4, !tbaa !9
  %165 = sext i32 %164 to i64
  %166 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %163, i64 noundef %165) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %166, i64 24, i1 false), !tbaa.struct !17
  invoke void @_ZN5PointmiES_(ptr dead_on_unwind writable sret(%class.Point) align 8 %23, ptr noundef nonnull align 8 dereferenceable(24) %162, ptr noundef byval(%class.Point) align 8 %24)
          to label %167 unwind label %200

167:                                              ; preds = %158
  %168 = load ptr, ptr %4, align 8, !tbaa !5
  %169 = load i32, ptr %16, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %168, i64 noundef %170) #4
  %172 = load ptr, ptr %4, align 8, !tbaa !5
  %173 = load i32, ptr %14, align 4, !tbaa !9
  %174 = sext i32 %173 to i64
  %175 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %172, i64 noundef %174) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %175, i64 24, i1 false), !tbaa.struct !17
  invoke void @_ZN5PointmiES_(ptr dead_on_unwind writable sret(%class.Point) align 8 %25, ptr noundef nonnull align 8 dereferenceable(24) %171, ptr noundef byval(%class.Point) align 8 %26)
          to label %176 unwind label %200

176:                                              ; preds = %167
  %177 = call noundef i64 @_Z3dot5PointS_(ptr noundef byval(%class.Point) align 8 %23, ptr noundef byval(%class.Point) align 8 %25)
  %178 = load ptr, ptr %4, align 8, !tbaa !5
  %179 = load i32, ptr %15, align 4, !tbaa !9
  %180 = sext i32 %179 to i64
  %181 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %178, i64 noundef %180) #4
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = load i32, ptr %14, align 4, !tbaa !9
  %184 = sext i32 %183 to i64
  %185 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %182, i64 noundef %184) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %28, ptr align 8 %185, i64 24, i1 false), !tbaa.struct !17
  invoke void @_ZN5PointmiES_(ptr dead_on_unwind writable sret(%class.Point) align 8 %27, ptr noundef nonnull align 8 dereferenceable(24) %181, ptr noundef byval(%class.Point) align 8 %28)
          to label %186 unwind label %200

186:                                              ; preds = %176
  %187 = load ptr, ptr %4, align 8, !tbaa !5
  %188 = load i32, ptr %15, align 4, !tbaa !9
  %189 = sext i32 %188 to i64
  %190 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %187, i64 noundef %189) #4
  %191 = load ptr, ptr %4, align 8, !tbaa !5
  %192 = load i32, ptr %14, align 4, !tbaa !9
  %193 = sext i32 %192 to i64
  %194 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %191, i64 noundef %193) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %30, ptr align 8 %194, i64 24, i1 false), !tbaa.struct !17
  invoke void @_ZN5PointmiES_(ptr dead_on_unwind writable sret(%class.Point) align 8 %29, ptr noundef nonnull align 8 dereferenceable(24) %190, ptr noundef byval(%class.Point) align 8 %30)
          to label %195 unwind label %200

195:                                              ; preds = %186
  %196 = call noundef i64 @_Z3dot5PointS_(ptr noundef byval(%class.Point) align 8 %27, ptr noundef byval(%class.Point) align 8 %29)
  %197 = icmp sgt i64 %177, %196
  br i1 %197, label %198, label %204

198:                                              ; preds = %195, %140
  %199 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %199, ptr %15, align 4, !tbaa !9
  br label %204

200:                                              ; preds = %186, %176, %167, %158, %142, %126
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %11, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %295

204:                                              ; preds = %198, %195, %156
  br label %205

205:                                              ; preds = %204
  %206 = load i32, ptr %16, align 4, !tbaa !9
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr %16, align 4, !tbaa !9
  br label %113, !llvm.loop !19

208:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #4
  %209 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %209, ptr %31, align 4, !tbaa !9
  %210 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %210, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #4
  store i32 0, ptr %32, align 4, !tbaa !9
  br label %211

211:                                              ; preds = %260, %208
  %212 = load i32, ptr %32, align 4, !tbaa !9
  %213 = load i32, ptr %5, align 4, !tbaa !9
  %214 = icmp slt i32 %212, %213
  br i1 %214, label %216, label %215

215:                                              ; preds = %211
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #4
  br label %263

216:                                              ; preds = %211
  %217 = load i32, ptr %32, align 4, !tbaa !9
  %218 = sext i32 %217 to i64
  %219 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %218) #4
  %220 = load i32, ptr %219, align 4, !tbaa !9
  %221 = icmp ne i32 %220, 0
  br i1 %221, label %259, label %222

222:                                              ; preds = %216
  %223 = load i32, ptr %32, align 4, !tbaa !9
  %224 = load i32, ptr %31, align 4, !tbaa !9
  %225 = icmp ne i32 %223, %224
  br i1 %225, label %226, label %259

226:                                              ; preds = %222
  %227 = load i32, ptr %32, align 4, !tbaa !9
  %228 = load i32, ptr %15, align 4, !tbaa !9
  %229 = icmp ne i32 %227, %228
  br i1 %229, label %230, label %259

230:                                              ; preds = %226
  %231 = load ptr, ptr %4, align 8, !tbaa !5
  %232 = load i32, ptr %31, align 4, !tbaa !9
  %233 = sext i32 %232 to i64
  %234 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %231, i64 noundef %233) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %33, ptr align 8 %234, i64 24, i1 false), !tbaa.struct !17
  %235 = load ptr, ptr %4, align 8, !tbaa !5
  %236 = load i32, ptr %15, align 4, !tbaa !9
  %237 = sext i32 %236 to i64
  %238 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %235, i64 noundef %237) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %34, ptr align 8 %238, i64 24, i1 false), !tbaa.struct !17
  %239 = load ptr, ptr %4, align 8, !tbaa !5
  %240 = load i32, ptr %32, align 4, !tbaa !9
  %241 = sext i32 %240 to i64
  %242 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %239, i64 noundef %241) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %35, ptr align 8 %242, i64 24, i1 false), !tbaa.struct !17
  %243 = invoke noundef i32 @_Z11orientation5PointS_S_(ptr noundef byval(%class.Point) align 8 %33, ptr noundef byval(%class.Point) align 8 %34, ptr noundef byval(%class.Point) align 8 %35)
          to label %244 unwind label %255

244:                                              ; preds = %230
  %245 = icmp eq i32 %243, 0
  br i1 %245, label %246, label %259

246:                                              ; preds = %244
  %247 = load ptr, ptr %4, align 8, !tbaa !5
  %248 = load i32, ptr %32, align 4, !tbaa !9
  %249 = sext i32 %248 to i64
  %250 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %247, i64 noundef %249) #4
  invoke void @_ZNSt6vectorI5PointSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %250)
          to label %251 unwind label %255

251:                                              ; preds = %246
  %252 = load i32, ptr %32, align 4, !tbaa !9
  %253 = sext i32 %252 to i64
  %254 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %253) #4
  store i32 1, ptr %254, align 4, !tbaa !9
  br label %259

255:                                              ; preds = %246, %230
  %256 = landingpad { ptr, i32 }
          cleanup
  %257 = extractvalue { ptr, i32 } %256, 0
  store ptr %257, ptr %11, align 8
  %258 = extractvalue { ptr, i32 } %256, 1
  store i32 %258, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #4
  br label %292

259:                                              ; preds = %251, %244, %226, %222, %216
  br label %260

260:                                              ; preds = %259
  %261 = load i32, ptr %32, align 4, !tbaa !9
  %262 = add nsw i32 %261, 1
  store i32 %262, ptr %32, align 4, !tbaa !9
  br label %211, !llvm.loop !20

263:                                              ; preds = %215
  %264 = load ptr, ptr %4, align 8, !tbaa !5
  %265 = load i32, ptr %14, align 4, !tbaa !9
  %266 = sext i32 %265 to i64
  %267 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %264, i64 noundef %266) #4
  %268 = load ptr, ptr %4, align 8, !tbaa !5
  %269 = load i32, ptr %6, align 4, !tbaa !9
  %270 = sext i32 %269 to i64
  %271 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %268, i64 noundef %270) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %36, ptr align 8 %271, i64 24, i1 false), !tbaa.struct !17
  %272 = invoke noundef zeroext i1 @_ZN5PointeqES_(ptr noundef nonnull align 8 dereferenceable(24) %267, ptr noundef byval(%class.Point) align 8 %36)
          to label %273 unwind label %275

273:                                              ; preds = %263
  br i1 %272, label %274, label %279

274:                                              ; preds = %273
  store i32 6, ptr %37, align 4
  br label %289

275:                                              ; preds = %279, %263
  %276 = landingpad { ptr, i32 }
          cleanup
  %277 = extractvalue { ptr, i32 } %276, 0
  store ptr %277, ptr %11, align 8
  %278 = extractvalue { ptr, i32 } %276, 1
  store i32 %278, ptr %12, align 4
  br label %292

279:                                              ; preds = %273
  %280 = load ptr, ptr %4, align 8, !tbaa !5
  %281 = load i32, ptr %14, align 4, !tbaa !9
  %282 = sext i32 %281 to i64
  %283 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %280, i64 noundef %282) #4
  invoke void @_ZNSt6vectorI5PointSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %283)
          to label %284 unwind label %275

284:                                              ; preds = %279
  %285 = load i32, ptr %14, align 4, !tbaa !9
  %286 = sext i32 %285 to i64
  %287 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %286) #4
  store i32 1, ptr %287, align 4, !tbaa !9
  br label %288

288:                                              ; preds = %284
  store i32 0, ptr %37, align 4
  br label %289

289:                                              ; preds = %288, %274
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #4
  %290 = load i32, ptr %37, align 4
  switch i32 %290, label %304 [
    i32 0, label %291
    i32 6, label %293
  ]

291:                                              ; preds = %289
  br label %107, !llvm.loop !21

292:                                              ; preds = %275, %255
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #4
  br label %295

293:                                              ; preds = %289
  store i1 true, ptr %13, align 1
  store i32 1, ptr %37, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  %294 = load i1, ptr %13, align 1
  br i1 %294, label %297, label %296

295:                                              ; preds = %292, %200, %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @_ZNSt6vectorI5PointSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  br label %298

296:                                              ; preds = %293
  call void @_ZNSt6vectorI5PointSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  br label %297

297:                                              ; preds = %296, %293
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret void

298:                                              ; preds = %295, %118
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %299

299:                                              ; preds = %298
  %300 = load ptr, ptr %11, align 8
  %301 = load i32, ptr %12, align 4
  %302 = insertvalue { ptr, i32 } poison, ptr %300, 0
  %303 = insertvalue { ptr, i32 } %302, i32 %301, 1
  resume { ptr, i32 } %303

304:                                              ; preds = %289
  unreachable
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN5PointeqES_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef byval(%class.Point) align 8) #3 align 2

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTS5Point", !13, i64 0, !13, i64 8, !13, i64 16}
!13 = !{!"long long", !7, i64 0}
!14 = !{!12, !13, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{i64 0, i64 8, !18, i64 8, i64 8, !18, i64 16, i64 8, !18}
!18 = !{!13, !13, i64 0}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !16}


; 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.Point = type { i64, i64, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl" }
%"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl" = type { %"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }

; 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 uwtable
declare dso_local void @_ZN5PointmiES_(ptr dead_on_unwind noalias writable sret(%class.Point) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef byval(%class.Point) align 8) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #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: mustprogress uwtable
declare dso_local noundef i32 @_Z11orientation5PointS_S_(ptr noundef byval(%class.Point) align 8, ptr noundef byval(%class.Point) align 8, ptr noundef byval(%class.Point) align 8) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z3dot5PointS_(ptr noundef byval(%class.Point) align 8, ptr noundef byval(%class.Point) align 8) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z21convexHullJarvisMarchRSt6vectorI5PointSaIS0_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 #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector.0", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::allocator.2", align 1
  %6 = alloca %class.Point, align 8
  %7 = alloca %class.Point, align 8
  %8 = alloca %class.Point, align 8
  %9 = alloca %class.Point, align 8
  %10 = alloca %class.Point, align 8
  %11 = alloca %class.Point, align 8
  %12 = alloca %class.Point, align 8
  %13 = alloca %class.Point, align 8
  %14 = alloca %class.Point, align 8
  %15 = alloca %class.Point, align 8
  %16 = tail call noundef i64 @_ZNKSt6vectorI5PointSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %17 = trunc i64 %16 to i32
  %18 = icmp sgt i32 %17, 1
  br i1 %18, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %2
  %wide.trip.count = and i64 %16, 2147483647
  br label %.lr.ph

._crit_edge:                                      ; preds = %42, %2
  %.086.lcssa = phi i32 [ 0, %2 ], [ %.1, %42 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  %sext = shl i64 %16, 32
  %19 = ashr exact i64 %sext, 32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %19, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %43 unwind label %57

.lr.ph:                                           ; preds = %.lr.ph.preheader, %42
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %42 ]
  %.086109 = phi i32 [ 0, %.lr.ph.preheader ], [ %.1, %42 ]
  %20 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #4
  %21 = load i64, ptr %20, align 8, !tbaa !9
  %22 = sext i32 %.086109 to i64
  %23 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %22) #4
  %24 = load i64, ptr %23, align 8, !tbaa !9
  %25 = icmp slt i64 %21, %24
  br i1 %25, label %40, label %26

26:                                               ; preds = %.lr.ph
  %27 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #4
  %28 = load i64, ptr %27, align 8, !tbaa !9
  %29 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %22) #4
  %30 = load i64, ptr %29, align 8, !tbaa !9
  %31 = icmp eq i64 %28, %30
  br i1 %31, label %32, label %42

32:                                               ; preds = %26
  %33 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #4
  %34 = getelementptr inbounds i8, ptr %33, i64 8
  %35 = load i64, ptr %34, align 8, !tbaa !12
  %36 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %22) #4
  %37 = getelementptr inbounds i8, ptr %36, i64 8
  %38 = load i64, ptr %37, align 8, !tbaa !12
  %39 = icmp slt i64 %35, %38
  br i1 %39, label %40, label %42

40:                                               ; preds = %32, %.lr.ph
  %41 = trunc nuw nsw i64 %indvars.iv to i32
  br label %42

42:                                               ; preds = %26, %32, %40
  %.1 = phi i32 [ %41, %40 ], [ %.086109, %32 ], [ %.086109, %26 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !13

43:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @_ZNSt6vectorI5PointSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %44 = sext i32 %.086.lcssa to i64
  %45 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %44) #4
  invoke void @_ZNSt6vectorI5PointSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %45)
          to label %46 unwind label %59

46:                                               ; preds = %43
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %44) #4
  store i32 1, ptr %47, align 4, !tbaa !5
  %48 = icmp sgt i32 %17, 0
  %wide.trip.count122 = and i64 %16, 2147483647
  %wide.trip.count127 = and i64 %16, 2147483647
  br label %49

49:                                               ; preds = %121, %46
  %.090 = phi i32 [ %.086.lcssa, %46 ], [ %.088.lcssa130, %121 ]
  %50 = add nsw i32 %.090, 1
  %51 = srem i32 %50, %17
  br i1 %48, label %.lr.ph113, label %.preheader.._crit_edge117_crit_edge

.lr.ph113:                                        ; preds = %49
  %52 = sext i32 %.090 to i64
  br label %61

.preheader:                                       ; preds = %96
  br i1 %48, label %.lr.ph116, label %.preheader.._crit_edge117_crit_edge

.preheader.._crit_edge117_crit_edge:              ; preds = %49, %.preheader
  %.088.lcssa131 = phi i32 [ %.189, %.preheader ], [ %51, %49 ]
  %.pre = sext i32 %.088.lcssa131 to i64
  br label %._crit_edge117

.lr.ph116:                                        ; preds = %.preheader
  %53 = sext i32 %.090 to i64
  %54 = sext i32 %.189 to i64
  %55 = zext i32 %.189 to i64
  %56 = zext i32 %.090 to i64
  br label %100

57:                                               ; preds = %._crit_edge
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  br label %125

59:                                               ; preds = %43
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %123

61:                                               ; preds = %.lr.ph113, %96
  %indvars.iv119 = phi i64 [ 0, %.lr.ph113 ], [ %indvars.iv.next120, %96 ]
  %.088110 = phi i32 [ %51, %.lr.ph113 ], [ %.189, %96 ]
  %62 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %52) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %62, i64 24, i1 false), !tbaa.struct !15
  %63 = sext i32 %.088110 to i64
  %64 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %63) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %64, i64 24, i1 false), !tbaa.struct !15
  %65 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv119) #4
  %66 = invoke noundef i32 @_Z11orientation5PointS_S_(ptr noundef nonnull byval(%class.Point) align 8 %6, ptr noundef nonnull byval(%class.Point) align 8 %7, ptr noundef nonnull byval(%class.Point) align 8 %65)
          to label %67 unwind label %94

67:                                               ; preds = %61
  %68 = icmp eq i32 %66, -1
  br i1 %68, label %92, label %69

69:                                               ; preds = %67
  %70 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %52) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %70, i64 24, i1 false), !tbaa.struct !15
  %71 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %63) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %71, i64 24, i1 false), !tbaa.struct !15
  %72 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv119) #4
  %73 = invoke noundef i32 @_Z11orientation5PointS_S_(ptr noundef nonnull byval(%class.Point) align 8 %8, ptr noundef nonnull byval(%class.Point) align 8 %9, ptr noundef nonnull byval(%class.Point) align 8 %72)
          to label %74 unwind label %94

74:                                               ; preds = %69
  %75 = icmp eq i32 %73, 0
  br i1 %75, label %76, label %96

76:                                               ; preds = %74
  %77 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv119) #4
  %78 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %52) #4
  invoke void @_ZN5PointmiES_(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %77, ptr noundef nonnull byval(%class.Point) align 8 %78)
          to label %79 unwind label %94

79:                                               ; preds = %76
  %80 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv119) #4
  %81 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %52) #4
  invoke void @_ZN5PointmiES_(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %11, ptr noundef nonnull align 8 dereferenceable(24) %80, ptr noundef nonnull byval(%class.Point) align 8 %81)
          to label %82 unwind label %94

82:                                               ; preds = %79
  %83 = call noundef i64 @_Z3dot5PointS_(ptr noundef nonnull byval(%class.Point) align 8 %10, ptr noundef nonnull byval(%class.Point) align 8 %11)
  %84 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %63) #4
  %85 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %52) #4
  invoke void @_ZN5PointmiES_(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %84, ptr noundef nonnull byval(%class.Point) align 8 %85)
          to label %86 unwind label %94

86:                                               ; preds = %82
  %87 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %63) #4
  %88 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %52) #4
  invoke void @_ZN5PointmiES_(ptr dead_on_unwind nonnull writable sret(%class.Point) align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %87, ptr noundef nonnull byval(%class.Point) align 8 %88)
          to label %89 unwind label %94

89:                                               ; preds = %86
  %90 = call noundef i64 @_Z3dot5PointS_(ptr noundef nonnull byval(%class.Point) align 8 %12, ptr noundef nonnull byval(%class.Point) align 8 %13)
  %91 = icmp sgt i64 %83, %90
  br i1 %91, label %92, label %96

92:                                               ; preds = %89, %67
  %93 = trunc nuw nsw i64 %indvars.iv119 to i32
  br label %96

94:                                               ; preds = %86, %82, %79, %76, %69, %61
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %123

96:                                               ; preds = %74, %89, %92
  %.189 = phi i32 [ %93, %92 ], [ %.088110, %89 ], [ %.088110, %74 ]
  %indvars.iv.next120 = add nuw nsw i64 %indvars.iv119, 1
  %exitcond123.not = icmp eq i64 %indvars.iv.next120, %wide.trip.count122
  br i1 %exitcond123.not, label %.preheader, label %61, !llvm.loop !17

._crit_edge117:                                   ; preds = %116, %.preheader.._crit_edge117_crit_edge
  %.088.lcssa130 = phi i32 [ %.088.lcssa131, %.preheader.._crit_edge117_crit_edge ], [ %.189, %116 ]
  %.pre-phi = phi i64 [ %.pre, %.preheader.._crit_edge117_crit_edge ], [ %54, %116 ]
  %97 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.pre-phi) #4
  %98 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %44) #4
  %99 = call noundef zeroext i1 @_ZN5PointeqES_(ptr noundef nonnull align 8 dereferenceable(24) %97, ptr noundef nonnull byval(%class.Point) align 8 %98)
  br i1 %99, label %124, label %119

100:                                              ; preds = %.lr.ph116, %116
  %indvars.iv124 = phi i64 [ 0, %.lr.ph116 ], [ %indvars.iv.next125, %116 ]
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv124) #4
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %.not = icmp ne i32 %102, 0
  %.not98 = icmp eq i64 %indvars.iv124, %56
  %or.cond = select i1 %.not, i1 true, i1 %.not98
  %.not99 = icmp eq i64 %indvars.iv124, %55
  %or.cond104 = select i1 %or.cond, i1 true, i1 %.not99
  br i1 %or.cond104, label %116, label %103

103:                                              ; preds = %100
  %104 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %53) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %104, i64 24, i1 false), !tbaa.struct !15
  %105 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %54) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %105, i64 24, i1 false), !tbaa.struct !15
  %106 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv124) #4
  %107 = invoke noundef i32 @_Z11orientation5PointS_S_(ptr noundef nonnull byval(%class.Point) align 8 %14, ptr noundef nonnull byval(%class.Point) align 8 %15, ptr noundef nonnull byval(%class.Point) align 8 %106)
          to label %108 unwind label %114

108:                                              ; preds = %103
  %109 = icmp eq i32 %107, 0
  br i1 %109, label %110, label %116

110:                                              ; preds = %108
  %111 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv124) #4
  invoke void @_ZNSt6vectorI5PointSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %111)
          to label %112 unwind label %114

112:                                              ; preds = %110
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv124) #4
  store i32 1, ptr %113, align 4, !tbaa !5
  br label %116

114:                                              ; preds = %110, %103
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %123

116:                                              ; preds = %100, %108, %112
  %indvars.iv.next125 = add nuw nsw i64 %indvars.iv124, 1
  %exitcond128.not = icmp eq i64 %indvars.iv.next125, %wide.trip.count127
  br i1 %exitcond128.not, label %._crit_edge117, label %100, !llvm.loop !18

117:                                              ; preds = %119
  %118 = landingpad { ptr, i32 }
          cleanup
  br label %123

119:                                              ; preds = %._crit_edge117
  %120 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.pre-phi) #4
  invoke void @_ZNSt6vectorI5PointSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %120)
          to label %121 unwind label %117

121:                                              ; preds = %119
  %122 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.pre-phi) #4
  store i32 1, ptr %122, align 4, !tbaa !5
  br label %49

123:                                              ; preds = %114, %117, %94, %59
  %.pn101 = phi { ptr, i32 } [ %95, %94 ], [ %60, %59 ], [ %115, %114 ], [ %118, %117 ]
  call void @_ZNSt6vectorI5PointSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  br label %125

124:                                              ; preds = %._crit_edge117
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  ret void

125:                                              ; preds = %123, %57
  %.pn101.pn = phi { ptr, i32 } [ %.pn101, %123 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn101.pn
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN5PointeqES_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef byval(%class.Point) align 8) local_unnamed_addr #3 align 2

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 = !{!"_ZTS5Point", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"long long", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{i64 0, i64 8, !16, i64 8, i64 8, !16, i64 16, i64 8, !16}
!16 = !{!11, !11, i64 0}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}


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