; LLVM IR from sgtlaugh/algovault :: code_library/convex_hull.ll (Z15get_convex_hullSt6vectorI5PointSaIS0_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<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::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z15get_convex_hullSt6vectorI5PointSaIS0_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef %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 i32, align 4
  %9 = alloca i1, align 1
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  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) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %15 = call noundef i64 @_ZNKSt6vectorI5PointSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %16 = trunc i64 %15 to i32
  store i32 %16, ptr %8, align 4, !tbaa !9
  store i1 false, ptr %9, align 1
  %17 = load i32, ptr %8, align 4, !tbaa !9
  %18 = shl i32 %17, 1
  %19 = sext i32 %18 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  call void @_ZNSaI5PointEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  invoke void @_ZNSt6vectorI5PointSaIS0_EEC2EmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %19, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %20 unwind label %57

20:                                               ; preds = %2
  call void @_ZNSt15__new_allocatorI5PointED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  %21 = call ptr @_ZNSt6vectorI5PointSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %22 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %21, ptr %22, align 8
  %23 = call ptr @_ZNSt6vectorI5PointSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %24 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %23, ptr %24, align 8
  %25 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  %26 = load ptr, ptr %25, align 8
  %27 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  %28 = load ptr, ptr %27, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5PointSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %26, ptr %28)
          to label %29 unwind label %61

29:                                               ; preds = %20
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %30

30:                                               ; preds = %73, %29
  %31 = load i32, ptr %5, align 4, !tbaa !9
  %32 = load i32, ptr %8, align 4, !tbaa !9
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %34, label %76

34:                                               ; preds = %30
  br label %35

35:                                               ; preds = %54, %34
  %36 = load i32, ptr %7, align 4, !tbaa !9
  %37 = icmp sge i32 %36, 2
  br i1 %37, label %38, label %52

38:                                               ; preds = %35
  %39 = load i32, ptr %7, align 4, !tbaa !9
  %40 = sub nsw i32 %39, 2
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %41) #5
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = sub nsw i32 %43, 1
  %45 = sext i32 %44 to i64
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %45) #5
  %47 = load i32, ptr %5, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %48) #5
  %50 = call noundef i64 @_Z5crossRK5PointS1_S1_(ptr noundef nonnull align 8 dereferenceable(16) %42, ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 8 dereferenceable(16) %49)
  %51 = icmp slt i64 %50, 0
  br label %52

52:                                               ; preds = %38, %35
  %53 = phi i1 [ false, %35 ], [ %51, %38 ]
  br i1 %53, label %54, label %65

54:                                               ; preds = %52
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = add nsw i32 %55, -1
  store i32 %56, ptr %7, align 4, !tbaa !9
  br label %35, !llvm.loop !11

57:                                               ; preds = %2
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %11, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %12, align 4
  call void @_ZNSt15__new_allocatorI5PointED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  br label %127

61:                                               ; preds = %119, %20
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %11, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %12, align 4
  call void @_ZNSt6vectorI5PointSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %127

65:                                               ; preds = %52
  %66 = load i32, ptr %5, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %67) #5
  %69 = load i32, ptr %7, align 4, !tbaa !9
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %7, align 4, !tbaa !9
  %71 = sext i32 %69 to i64
  %72 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %71) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %72, ptr align 8 %68, i64 16, i1 false), !tbaa.struct !13
  br label %73

73:                                               ; preds = %65
  %74 = load i32, ptr %5, align 4, !tbaa !9
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %5, align 4, !tbaa !9
  br label %30, !llvm.loop !16

76:                                               ; preds = %30
  %77 = load i32, ptr %8, align 4, !tbaa !9
  %78 = sub nsw i32 %77, 2
  store i32 %78, ptr %5, align 4, !tbaa !9
  %79 = load i32, ptr %7, align 4, !tbaa !9
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %6, align 4, !tbaa !9
  br label %81

81:                                               ; preds = %116, %76
  %82 = load i32, ptr %5, align 4, !tbaa !9
  %83 = icmp sge i32 %82, 0
  br i1 %83, label %84, label %119

84:                                               ; preds = %81
  br label %85

85:                                               ; preds = %105, %84
  %86 = load i32, ptr %7, align 4, !tbaa !9
  %87 = load i32, ptr %6, align 4, !tbaa !9
  %88 = icmp sge i32 %86, %87
  br i1 %88, label %89, label %103

89:                                               ; preds = %85
  %90 = load i32, ptr %7, align 4, !tbaa !9
  %91 = sub nsw i32 %90, 2
  %92 = sext i32 %91 to i64
  %93 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %92) #5
  %94 = load i32, ptr %7, align 4, !tbaa !9
  %95 = sub nsw i32 %94, 1
  %96 = sext i32 %95 to i64
  %97 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %96) #5
  %98 = load i32, ptr %5, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %99) #5
  %101 = call noundef i64 @_Z5crossRK5PointS1_S1_(ptr noundef nonnull align 8 dereferenceable(16) %93, ptr noundef nonnull align 8 dereferenceable(16) %97, ptr noundef nonnull align 8 dereferenceable(16) %100)
  %102 = icmp slt i64 %101, 0
  br label %103

103:                                              ; preds = %89, %85
  %104 = phi i1 [ false, %85 ], [ %102, %89 ]
  br i1 %104, label %105, label %108

105:                                              ; preds = %103
  %106 = load i32, ptr %7, align 4, !tbaa !9
  %107 = add nsw i32 %106, -1
  store i32 %107, ptr %7, align 4, !tbaa !9
  br label %85, !llvm.loop !17

108:                                              ; preds = %103
  %109 = load i32, ptr %5, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %110) #5
  %112 = load i32, ptr %7, align 4, !tbaa !9
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %7, align 4, !tbaa !9
  %114 = sext i32 %112 to i64
  %115 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %114) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %115, ptr align 8 %111, i64 16, i1 false), !tbaa.struct !13
  br label %116

116:                                              ; preds = %108
  %117 = load i32, ptr %5, align 4, !tbaa !9
  %118 = add nsw i32 %117, -1
  store i32 %118, ptr %5, align 4, !tbaa !9
  br label %81, !llvm.loop !18

119:                                              ; preds = %81
  %120 = load i32, ptr %7, align 4, !tbaa !9
  %121 = sub nsw i32 %120, 1
  %122 = sext i32 %121 to i64
  invoke void @_ZNSt6vectorI5PointSaIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %122)
          to label %123 unwind label %61

123:                                              ; preds = %119
  store i1 true, ptr %9, align 1
  %124 = load i1, ptr %9, align 1
  br i1 %124, label %126, label %125

125:                                              ; preds = %123
  call void @_ZNSt6vectorI5PointSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %126

126:                                              ; preds = %125, %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret void

127:                                              ; preds = %61, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %128

128:                                              ; preds = %127
  %129 = load ptr, ptr %11, align 8
  %130 = load i32, ptr %12, align 4
  %131 = insertvalue { ptr, i32 } poison, ptr %129, 0
  %132 = insertvalue { ptr, i32 } %131, i32 %130, 1
  resume { ptr, i32 } %132
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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


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

%"class.std::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::allocator" = type { i8 }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z15get_convex_hullSt6vectorI5PointSaIS0_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull %1) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::allocator", align 1
  %4 = tail call noundef i64 @_ZNKSt6vectorI5PointSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %5 = trunc i64 %4 to i32
  %6 = shl i32 %5, 1
  %7 = sext i32 %6 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #6
  call void @_ZNSaI5PointEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  invoke void @_ZNSt6vectorI5PointSaIS0_EEC2EmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %7, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %8 unwind label %24

8:                                                ; preds = %2
  call void @_ZNSt15__new_allocatorI5PointED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  %9 = call ptr @_ZNSt6vectorI5PointSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %10 = call ptr @_ZNSt6vectorI5PointSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5PointSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %9, ptr %10)
          to label %.preheader36 unwind label %26

.preheader36:                                     ; preds = %8
  %11 = icmp sgt i32 %5, 0
  br i1 %11, label %.preheader35.preheader, label %._crit_edge41

.preheader35.preheader:                           ; preds = %.preheader36
  %wide.trip.count = and i64 %4, 2147483647
  br label %.preheader35

.preheader35:                                     ; preds = %.preheader35.preheader, %.critedge
  %indvars.iv45 = phi i64 [ 0, %.preheader35.preheader ], [ %indvars.iv.next46, %.critedge ]
  %.02937 = phi i32 [ 0, %.preheader35.preheader ], [ %29, %.critedge ]
  %12 = zext i32 %.02937 to i64
  %smin = call i32 @llvm.smin.i32(i32 %.02937, i32 1)
  br label %13

13:                                               ; preds = %.preheader35, %16
  %indvars.iv = phi i64 [ %12, %.preheader35 ], [ %19, %16 ]
  %14 = trunc nuw i64 %indvars.iv to i32
  %15 = icmp sgt i32 %14, 1
  br i1 %15, label %16, label %.critedge

16:                                               ; preds = %13
  %17 = add nsw i64 %indvars.iv, -2
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %17) #6
  %19 = add nsw i64 %indvars.iv, -1
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %19) #6
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv45) #6
  %22 = call noundef i64 @_Z5crossRK5PointS1_S1_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %21)
  %23 = icmp slt i64 %22, 0
  br i1 %23, label %13, label %.critedge, !llvm.loop !5

24:                                               ; preds = %2
  %25 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorI5PointED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  br label %52

26:                                               ; preds = %._crit_edge41, %8
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorI5PointSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %52

.critedge:                                        ; preds = %13, %16
  %.130.lcssa = phi i32 [ %smin, %13 ], [ %14, %16 ]
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv45) #6
  %29 = add nsw i32 %.130.lcssa, 1
  %30 = sext i32 %.130.lcssa to i64
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %30) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 8 dereferenceable(16) %28, i64 16, i1 false), !tbaa.struct !7
  %indvars.iv.next46 = add nuw nsw i64 %indvars.iv45, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next46, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.preheader35, !llvm.loop !12

._crit_edge:                                      ; preds = %.critedge
  %.not = icmp eq i32 %5, 1
  br i1 %.not, label %._crit_edge41, label %.preheader.preheader

.preheader.preheader:                             ; preds = %._crit_edge
  %32 = add i64 %4, 4294967294
  %33 = sext i32 %29 to i64
  %34 = and i64 %32, 4294967295
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.critedge2
  %indvars.iv52 = phi i64 [ %34, %.preheader.preheader ], [ %indvars.iv.next53, %.critedge2 ]
  %.239 = phi i32 [ %29, %.preheader.preheader ], [ %46, %.critedge2 ]
  %35 = sext i32 %.239 to i64
  %smin50 = call i32 @llvm.smin.i32(i32 %.239, i32 %29)
  br label %36

36:                                               ; preds = %.preheader, %37
  %indvars.iv48 = phi i64 [ %35, %.preheader ], [ %indvars.iv.next49, %37 ]
  %.not.not = icmp sgt i64 %indvars.iv48, %33
  br i1 %.not.not, label %37, label %.critedge2

37:                                               ; preds = %36
  %38 = add nsw i64 %indvars.iv48, -2
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %38) #6
  %indvars.iv.next49 = add nsw i64 %indvars.iv48, -1
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv.next49) #6
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv52) #6
  %42 = call noundef i64 @_Z5crossRK5PointS1_S1_(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 8 dereferenceable(16) %41)
  %43 = icmp slt i64 %42, 0
  br i1 %43, label %36, label %.critedge2.split.loop.exit57, !llvm.loop !13

.critedge2.split.loop.exit57:                     ; preds = %37
  %44 = trunc nsw i64 %indvars.iv48 to i32
  br label %.critedge2

.critedge2:                                       ; preds = %36, %.critedge2.split.loop.exit57
  %.3.lcssa = phi i32 [ %44, %.critedge2.split.loop.exit57 ], [ %smin50, %36 ]
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv52) #6
  %46 = add nsw i32 %.3.lcssa, 1
  %47 = sext i32 %.3.lcssa to i64
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI5PointSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %47) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %48, ptr noundef nonnull align 8 dereferenceable(16) %45, i64 16, i1 false), !tbaa.struct !7
  %indvars.iv.next53 = add nsw i64 %indvars.iv52, -1
  %49 = icmp sgt i64 %indvars.iv52, 0
  br i1 %49, label %.preheader, label %._crit_edge41, !llvm.loop !14

._crit_edge41:                                    ; preds = %.critedge2, %.preheader36, %._crit_edge
  %.2.lcssa = phi i32 [ %.130.lcssa, %._crit_edge ], [ -1, %.preheader36 ], [ %.3.lcssa, %.critedge2 ]
  %50 = sext i32 %.2.lcssa to i64
  invoke void @_ZNSt6vectorI5PointSaIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %50)
          to label %51 unwind label %26

51:                                               ; preds = %._crit_edge41
  ret void

52:                                               ; preds = %26, %24
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %25, %24 ]
  resume { ptr, i32 } %.pn
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #5

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

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

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


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