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

; 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"

%struct.PT = type { double, double }

@.str.5 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [7 x i8], align 1
@__PRETTY_FUNCTION__._Z18is_point_in_convexRSt6vectorI2PTSaIS0_EERKS0_ = external hidden unnamed_addr constant [49 x i8], align 1

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

; Function Attrs: 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

; 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
define dso_local noundef i32 @_Z18is_point_in_convexRSt6vectorI2PTSaIS0_EERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(16) %1) #4 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %struct.PT, align 8
  %9 = alloca %struct.PT, align 8
  %10 = alloca %struct.PT, align 8
  %11 = alloca i32, align 4
  %12 = alloca %struct.PT, align 8
  %13 = alloca %struct.PT, align 8
  %14 = alloca %struct.PT, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %struct.PT, align 8
  %20 = alloca %struct.PT, align 8
  %21 = alloca %struct.PT, align 8
  %22 = alloca i32, align 4
  %23 = alloca %struct.PT, align 8
  %24 = alloca %struct.PT, align 8
  %25 = alloca %struct.PT, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  %28 = trunc i64 %27 to i32
  store i32 %28, ptr %6, align 4, !tbaa !9
  %29 = load i32, ptr %6, align 4, !tbaa !9
  %30 = icmp sge i32 %29, 3
  br i1 %30, label %31, label %32

31:                                               ; preds = %2
  br label %34

32:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.5, i32 noundef 673, ptr noundef @__PRETTY_FUNCTION__._Z18is_point_in_convexRSt6vectorI2PTSaIS0_EERKS0_) #6
  unreachable

33:                                               ; No predecessors!
  br label %34

34:                                               ; preds = %33, %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef 0) #5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %36)
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef 1) #5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %38)
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %39)
  %40 = call noundef i32 @_Z11orientation2PTS_S_(ptr noundef %8, ptr noundef %9, ptr noundef %10)
  store i32 %40, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef 0) #5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %42)
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = load i32, ptr %6, align 4, !tbaa !9
  %45 = sub nsw i32 %44, 1
  %46 = sext i32 %45 to i64
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %46) #5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %47)
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %48)
  %49 = call noundef i32 @_Z11orientation2PTS_S_(ptr noundef %12, ptr noundef %13, ptr noundef %14)
  store i32 %49, ptr %11, align 4, !tbaa !9
  %50 = load i32, ptr %7, align 4, !tbaa !9
  %51 = icmp slt i32 %50, 0
  br i1 %51, label %55, label %52

52:                                               ; preds = %34
  %53 = load i32, ptr %11, align 4, !tbaa !9
  %54 = icmp sgt i32 %53, 0
  br i1 %54, label %55, label %56

55:                                               ; preds = %52, %34
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %117

56:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 1, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %57 = load i32, ptr %6, align 4, !tbaa !9
  %58 = sub nsw i32 %57, 1
  store i32 %58, ptr %17, align 4, !tbaa !9
  br label %59

59:                                               ; preds = %82, %56
  %60 = load i32, ptr %16, align 4, !tbaa !9
  %61 = add nsw i32 %60, 1
  %62 = load i32, ptr %17, align 4, !tbaa !9
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %64, label %83

64:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %65 = load i32, ptr %16, align 4, !tbaa !9
  %66 = load i32, ptr %17, align 4, !tbaa !9
  %67 = add nsw i32 %65, %66
  %68 = ashr i32 %67, 1
  store i32 %68, ptr %18, align 4, !tbaa !9
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef 0) #5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %70)
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = load i32, ptr %18, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %71, i64 noundef %73) #5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %74)
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %75)
  %76 = call noundef i32 @_Z11orientation2PTS_S_(ptr noundef %19, ptr noundef %20, ptr noundef %21)
  %77 = icmp sge i32 %76, 0
  br i1 %77, label %78, label %80

78:                                               ; preds = %64
  %79 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %79, ptr %16, align 4, !tbaa !9
  br label %82

80:                                               ; preds = %64
  %81 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %81, ptr %17, align 4, !tbaa !9
  br label %82

82:                                               ; preds = %80, %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %59, !llvm.loop !11

83:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = load i32, ptr %16, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %84, i64 noundef %86) #5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %87)
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = load i32, ptr %17, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %88, i64 noundef %90) #5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(16) %91)
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 8 dereferenceable(16) %92)
  %93 = call noundef i32 @_Z11orientation2PTS_S_(ptr noundef %23, ptr noundef %24, ptr noundef %25)
  store i32 %93, ptr %22, align 4, !tbaa !9
  %94 = load i32, ptr %22, align 4, !tbaa !9
  %95 = icmp sle i32 %94, 0
  br i1 %95, label %96, label %99

96:                                               ; preds = %83
  %97 = load i32, ptr %22, align 4, !tbaa !9
  %98 = sub nsw i32 0, %97
  store i32 %98, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %116

99:                                               ; preds = %83
  %100 = load i32, ptr %16, align 4, !tbaa !9
  %101 = icmp eq i32 %100, 1
  br i1 %101, label %102, label %106

102:                                              ; preds = %99
  %103 = load i32, ptr %7, align 4, !tbaa !9
  %104 = icmp eq i32 %103, 0
  br i1 %104, label %105, label %106

105:                                              ; preds = %102
  store i32 0, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %116

106:                                              ; preds = %102, %99
  %107 = load i32, ptr %17, align 4, !tbaa !9
  %108 = load i32, ptr %6, align 4, !tbaa !9
  %109 = sub nsw i32 %108, 1
  %110 = icmp eq i32 %107, %109
  br i1 %110, label %111, label %115

111:                                              ; preds = %106
  %112 = load i32, ptr %11, align 4, !tbaa !9
  %113 = icmp eq i32 %112, 0
  br i1 %113, label %114, label %115

114:                                              ; preds = %111
  store i32 0, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %116

115:                                              ; preds = %111, %106
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %116

116:                                              ; preds = %115, %114, %105, %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %117

117:                                              ; preds = %116, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %118 = load i32, ptr %3, align 4
  ret i32 %118
}

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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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"}


; 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"

%struct.PT = type { double, double }

@.str.5 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [7 x i8], align 1
@__PRETTY_FUNCTION__._Z18is_point_in_convexRSt6vectorI2PTSaIS0_EERKS0_ = external hidden unnamed_addr constant [49 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 -1, -2147483648) i32 @_Z18is_point_in_convexRSt6vectorI2PTSaIS0_EERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(16) %1) local_unnamed_addr #3 {
  %3 = alloca %struct.PT, align 8
  %4 = alloca %struct.PT, align 8
  %5 = alloca %struct.PT, align 8
  %6 = alloca %struct.PT, 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 %struct.PT, align 8
  %14 = alloca %struct.PT, align 8
  %15 = tail call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %16 = trunc i64 %15 to i32
  %17 = icmp sgt i32 %16, 2
  br i1 %17, label %19, label %18

18:                                               ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.5, i32 noundef 673, ptr noundef nonnull @__PRETTY_FUNCTION__._Z18is_point_in_convexRSt6vectorI2PTSaIS0_EERKS0_) #5
  unreachable

19:                                               ; preds = %2
  %20 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #4
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %20)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #4
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %21)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %22 = call noundef i32 @_Z11orientation2PTS_S_(ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %5)
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #4
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %23)
  %24 = add nsw i32 %16, -1
  %25 = zext nneg i32 %24 to i64
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %25) #4
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %26)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %27 = call noundef i32 @_Z11orientation2PTS_S_(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %28 = icmp slt i32 %22, 0
  %29 = icmp sgt i32 %27, 0
  %or.cond = or i1 %28, %29
  br i1 %or.cond, label %52, label %.preheader

.preheader:                                       ; preds = %19
  %.not = icmp eq i32 %16, 3
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.03949 = phi i32 [ %.039., %.lr.ph ], [ %24, %.preheader ]
  %.04148 = phi i32 [ %..041, %.lr.ph ], [ 1, %.preheader ]
  %30 = add nuw nsw i32 %.03949, %.04148
  %31 = lshr i32 %30, 1
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #4
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %32)
  %33 = zext nneg i32 %31 to i64
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %33) #4
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %34)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %35 = call noundef i32 @_Z11orientation2PTS_S_(ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11)
  %36 = icmp sgt i32 %35, -1
  %..041 = select i1 %36, i32 %31, i32 %.04148
  %.039. = select i1 %36, i32 %.03949, i32 %31
  %37 = add nuw nsw i32 %..041, 1
  %38 = icmp slt i32 %37, %.039.
  br i1 %38, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !5

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = zext nneg i32 %.039. to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %.pre-phi = phi i64 [ %.pre, %._crit_edge.loopexit ], [ 2, %.preheader ]
  %.041.lcssa = phi i32 [ %..041, %._crit_edge.loopexit ], [ 1, %.preheader ]
  %.039.lcssa = phi i32 [ %.039., %._crit_edge.loopexit ], [ 2, %.preheader ]
  %39 = zext nneg i32 %.041.lcssa to i64
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %39) #4
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %40)
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.pre-phi) #4
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %41)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %42 = call noundef i32 @_Z11orientation2PTS_S_(ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %14)
  %43 = icmp slt i32 %42, 1
  br i1 %43, label %44, label %46

44:                                               ; preds = %._crit_edge
  %45 = sub nsw i32 0, %42
  br label %52

46:                                               ; preds = %._crit_edge
  %47 = icmp eq i32 %.041.lcssa, 1
  %48 = icmp eq i32 %22, 0
  %or.cond3 = and i1 %48, %47
  br i1 %or.cond3, label %52, label %49

49:                                               ; preds = %46
  %50 = icmp ne i32 %.039.lcssa, %24
  %51 = icmp ne i32 %27, 0
  %or.cond5.not = or i1 %51, %50
  %. = sext i1 %or.cond5.not to i32
  br label %52

52:                                               ; preds = %44, %46, %49, %19
  %.1 = phi i32 [ 1, %19 ], [ %45, %44 ], [ 0, %46 ], [ %., %49 ]
  ret i32 %.1
}

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 = { 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 #2 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { nounwind }
attributes #5 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


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