; LLVM IR from tangjz/acm-icpc :: codeforces/gym/101201E.ll (Z11convex_hulliPiRiS_)

; 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.Point = type { i32, i32 }

@p = external dso_local global [100001 x %struct.Point], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11convex_hulliPiRiS_(i32 noundef %0, ptr noundef %1, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %struct.Point, align 4
  %11 = alloca %struct.Point, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.Point, align 4
  %15 = alloca %struct.Point, align 4
  store i32 %0, ptr %5, align 4, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !9
  %16 = load ptr, ptr %7, align 8, !tbaa !9
  store i32 0, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %85, %4
  %18 = load i32, ptr %9, align 4, !tbaa !5
  %19 = load i32, ptr %5, align 4, !tbaa !5
  %20 = icmp slt i32 %18, %19
  br i1 %20, label %22, label %21

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

22:                                               ; preds = %17
  br label %23

23:                                               ; preds = %69, %22
  %24 = load ptr, ptr %7, align 8, !tbaa !9
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = icmp sgt i32 %25, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  br i1 %26, label %27, label %66

27:                                               ; preds = %23
  %28 = load ptr, ptr %8, align 8, !tbaa !9
  %29 = load ptr, ptr %7, align 8, !tbaa !9
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = sub nsw i32 %30, 1
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds i32, ptr %28, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %35
  %37 = load ptr, ptr %8, align 8, !tbaa !9
  %38 = load ptr, ptr %7, align 8, !tbaa !9
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = sub nsw i32 %39, 2
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds i32, ptr %37, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %44
  %46 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %36, ptr noundef nonnull align 4 dereferenceable(8) %45)
  store i64 %46, ptr %10, align 4
  %47 = load ptr, ptr %6, align 8, !tbaa !9
  %48 = load i32, ptr %9, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds i32, ptr %47, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %52
  %54 = load ptr, ptr %8, align 8, !tbaa !9
  %55 = load ptr, ptr %7, align 8, !tbaa !9
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = sub nsw i32 %56, 2
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i32, ptr %54, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %61
  %63 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %53, ptr noundef nonnull align 4 dereferenceable(8) %62)
  store i64 %63, ptr %11, align 4
  %64 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(8) %11)
  %65 = icmp sle i64 %64, 0
  br label %66

66:                                               ; preds = %27, %23
  %67 = phi i1 [ false, %23 ], [ %65, %27 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br i1 %67, label %68, label %73

68:                                               ; preds = %66
  br label %69

69:                                               ; preds = %68
  %70 = load ptr, ptr %7, align 8, !tbaa !9
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = add nsw i32 %71, -1
  store i32 %72, ptr %70, align 4, !tbaa !5
  br label %23, !llvm.loop !11

73:                                               ; preds = %66
  %74 = load ptr, ptr %6, align 8, !tbaa !9
  %75 = load i32, ptr %9, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds i32, ptr %74, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = load ptr, ptr %8, align 8, !tbaa !9
  %80 = load ptr, ptr %7, align 8, !tbaa !9
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %80, align 4, !tbaa !5
  %83 = sext i32 %81 to i64
  %84 = getelementptr inbounds i32, ptr %79, i64 %83
  store i32 %78, ptr %84, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %73
  %86 = load i32, ptr %9, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %9, align 4, !tbaa !5
  br label %17, !llvm.loop !13

88:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = sub nsw i32 %89, 2
  store i32 %90, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %91 = load ptr, ptr %7, align 8, !tbaa !9
  %92 = load i32, ptr %91, align 4, !tbaa !5
  store i32 %92, ptr %13, align 4, !tbaa !5
  br label %93

93:                                               ; preds = %161, %88
  %94 = load i32, ptr %12, align 4, !tbaa !5
  %95 = icmp sge i32 %94, 0
  br i1 %95, label %97, label %96

96:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %164

97:                                               ; preds = %93
  br label %98

98:                                               ; preds = %145, %97
  %99 = load ptr, ptr %7, align 8, !tbaa !9
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = load i32, ptr %13, align 4, !tbaa !5
  %102 = icmp sgt i32 %100, %101
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  br i1 %102, label %103, label %142

103:                                              ; preds = %98
  %104 = load ptr, ptr %8, align 8, !tbaa !9
  %105 = load ptr, ptr %7, align 8, !tbaa !9
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = sub nsw i32 %106, 1
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds i32, ptr %104, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %111
  %113 = load ptr, ptr %8, align 8, !tbaa !9
  %114 = load ptr, ptr %7, align 8, !tbaa !9
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = sub nsw i32 %115, 2
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds i32, ptr %113, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %120
  %122 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %112, ptr noundef nonnull align 4 dereferenceable(8) %121)
  store i64 %122, ptr %14, align 4
  %123 = load ptr, ptr %6, align 8, !tbaa !9
  %124 = load i32, ptr %12, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds i32, ptr %123, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %128
  %130 = load ptr, ptr %8, align 8, !tbaa !9
  %131 = load ptr, ptr %7, align 8, !tbaa !9
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = sub nsw i32 %132, 2
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds i32, ptr %130, i64 %134
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %137
  %139 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %129, ptr noundef nonnull align 4 dereferenceable(8) %138)
  store i64 %139, ptr %15, align 4
  %140 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(8) %15)
  %141 = icmp sle i64 %140, 0
  br label %142

142:                                              ; preds = %103, %98
  %143 = phi i1 [ false, %98 ], [ %141, %103 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  br i1 %143, label %144, label %149

144:                                              ; preds = %142
  br label %145

145:                                              ; preds = %144
  %146 = load ptr, ptr %7, align 8, !tbaa !9
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = add nsw i32 %147, -1
  store i32 %148, ptr %146, align 4, !tbaa !5
  br label %98, !llvm.loop !14

149:                                              ; preds = %142
  %150 = load ptr, ptr %6, align 8, !tbaa !9
  %151 = load i32, ptr %12, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds i32, ptr %150, i64 %152
  %154 = load i32, ptr %153, align 4, !tbaa !5
  %155 = load ptr, ptr %8, align 8, !tbaa !9
  %156 = load ptr, ptr %7, align 8, !tbaa !9
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %156, align 4, !tbaa !5
  %159 = sext i32 %157 to i64
  %160 = getelementptr inbounds i32, ptr %155, i64 %159
  store i32 %154, ptr %160, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %149
  %162 = load i32, ptr %12, align 4, !tbaa !5
  %163 = add nsw i32 %162, -1
  store i32 %163, ptr %12, align 4, !tbaa !5
  br label %93, !llvm.loop !15

164:                                              ; preds = %96
  %165 = load i32, ptr %5, align 4, !tbaa !5
  %166 = icmp sgt i32 %165, 1
  br i1 %166, label %167, label %171

167:                                              ; preds = %164
  %168 = load ptr, ptr %7, align 8, !tbaa !9
  %169 = load i32, ptr %168, align 4, !tbaa !5
  %170 = add nsw i32 %169, -1
  store i32 %170, ptr %168, align 4, !tbaa !5
  br label %171

171:                                              ; preds = %167, %164
  ret void
}

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !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"

%struct.Point = type { i32, i32 }

@p = external dso_local global [100001 x %struct.Point], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z11convex_hulliPiRiS_(i32 noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef nonnull align 4 dereferenceable(4) %2, ptr nocapture noundef %3) local_unnamed_addr #0 {
  %5 = alloca %struct.Point, align 8
  %6 = alloca %struct.Point, align 8
  %7 = alloca %struct.Point, align 8
  %8 = alloca %struct.Point, align 8
  store i32 0, ptr %2, align 4, !tbaa !5
  %9 = icmp sgt i32 %0, 0
  br i1 %9, label %thread-pre-split.lr.ph, label %._crit_edge48.thread

thread-pre-split.lr.ph:                           ; preds = %4
  %invariant.gep = getelementptr i8, ptr %3, i64 -8
  %wide.trip.count = zext nneg i32 %0 to i64
  br label %thread-pre-split

._crit_edge:                                      ; preds = %.loopexit42
  %.not = icmp eq i32 %0, 1
  br i1 %.not, label %._crit_edge48.thread, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %._crit_edge
  %10 = add nsw i32 %0, -2
  %invariant.gep44 = getelementptr i8, ptr %3, i64 -8
  %11 = zext nneg i32 %10 to i64
  br label %.preheader

thread-pre-split:                                 ; preds = %.loopexit42, %thread-pre-split.lr.ph
  %.pr = phi i32 [ 0, %thread-pre-split.lr.ph ], [ %.pre53, %.loopexit42 ]
  %indvars.iv = phi i64 [ 0, %thread-pre-split.lr.ph ], [ %indvars.iv.next, %.loopexit42 ]
  %12 = icmp sgt i32 %.pr, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #2
  br i1 %12, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %thread-pre-split
  %13 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv
  br label %14

14:                                               ; preds = %.lr.ph, %39
  %15 = phi i32 [ %.pr, %.lr.ph ], [ %40, %39 ]
  %16 = zext nneg i32 %15 to i64
  %17 = getelementptr i32, ptr %3, i64 %16
  %18 = getelementptr i8, ptr %17, i64 -4
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %20
  %22 = getelementptr i8, ptr %17, i64 -8
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %24
  %26 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(8) %25)
  store i64 %26, ptr %5, align 8
  %27 = load i32, ptr %13, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %28
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %gep = getelementptr i32, ptr %invariant.gep, i64 %31
  %32 = load i32, ptr %gep, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %33
  %35 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(8) %34)
  store i64 %35, ptr %6, align 8
  %36 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %6)
  %37 = icmp slt i64 %36, 1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #2
  %38 = load i32, ptr %2, align 4, !tbaa !5
  br i1 %37, label %39, label %.loopexit42

39:                                               ; preds = %14
  %40 = add nsw i32 %38, -1
  store i32 %40, ptr %2, align 4, !tbaa !5
  %41 = icmp sgt i32 %38, 2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #2
  br i1 %41, label %14, label %.critedge, !llvm.loop !9

.critedge:                                        ; preds = %39, %thread-pre-split
  %42 = phi i32 [ %.pr, %thread-pre-split ], [ %40, %39 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #2
  br label %.loopexit42

.loopexit42:                                      ; preds = %14, %.critedge
  %43 = phi i32 [ %42, %.critedge ], [ %38, %14 ]
  %44 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = add nsw i32 %43, 1
  store i32 %46, ptr %2, align 4, !tbaa !5
  %47 = sext i32 %43 to i64
  %48 = getelementptr inbounds i32, ptr %3, i64 %47
  store i32 %45, ptr %48, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  %.pre53 = load i32, ptr %2, align 4, !tbaa !5
  br i1 %exitcond.not, label %._crit_edge, label %thread-pre-split, !llvm.loop !11

.preheader:                                       ; preds = %.preheader.lr.ph, %.loopexit
  %indvars.iv50 = phi i64 [ %11, %.preheader.lr.ph ], [ %indvars.iv.next51, %.loopexit ]
  %49 = load i32, ptr %2, align 4, !tbaa !5
  %50 = icmp sgt i32 %49, %.pre53
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #2
  br i1 %50, label %.lr.ph46, label %.critedge2

.lr.ph46:                                         ; preds = %.preheader
  %51 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv50
  br label %52

._crit_edge48:                                    ; preds = %.loopexit
  br i1 %.not, label %._crit_edge48.thread, label %88

52:                                               ; preds = %.lr.ph46, %77
  %53 = phi i32 [ %49, %.lr.ph46 ], [ %78, %77 ]
  %54 = sext i32 %53 to i64
  %55 = getelementptr i32, ptr %3, i64 %54
  %56 = getelementptr i8, ptr %55, i64 -4
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %58
  %60 = getelementptr i8, ptr %55, i64 -8
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %62
  %64 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %59, ptr noundef nonnull align 4 dereferenceable(8) %63)
  store i64 %64, ptr %7, align 8
  %65 = load i32, ptr %51, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %66
  %68 = load i32, ptr %2, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %gep45 = getelementptr i32, ptr %invariant.gep44, i64 %69
  %70 = load i32, ptr %gep45, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [100001 x %struct.Point], ptr @p, i64 0, i64 %71
  %73 = call i64 @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %67, ptr noundef nonnull align 4 dereferenceable(8) %72)
  store i64 %73, ptr %8, align 8
  %74 = call noundef i64 @_ZNK5Point3detERKS_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %8)
  %75 = icmp slt i64 %74, 1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #2
  %76 = load i32, ptr %2, align 4, !tbaa !5
  br i1 %75, label %77, label %.loopexit

77:                                               ; preds = %52
  %78 = add nsw i32 %76, -1
  store i32 %78, ptr %2, align 4, !tbaa !5
  %79 = icmp sgt i32 %78, %.pre53
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #2
  br i1 %79, label %52, label %.critedge2, !llvm.loop !12

.critedge2:                                       ; preds = %77, %.preheader
  %80 = phi i32 [ %49, %.preheader ], [ %78, %77 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #2
  br label %.loopexit

.loopexit:                                        ; preds = %52, %.critedge2
  %81 = phi i32 [ %80, %.critedge2 ], [ %76, %52 ]
  %82 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv50
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = add nsw i32 %81, 1
  store i32 %84, ptr %2, align 4, !tbaa !5
  %85 = sext i32 %81 to i64
  %86 = getelementptr inbounds i32, ptr %3, i64 %85
  store i32 %83, ptr %86, align 4, !tbaa !5
  %indvars.iv.next51 = add nsw i64 %indvars.iv50, -1
  %87 = icmp sgt i64 %indvars.iv50, 0
  br i1 %87, label %.preheader, label %._crit_edge48, !llvm.loop !13

88:                                               ; preds = %._crit_edge48
  %89 = load i32, ptr %2, align 4, !tbaa !5
  %90 = add nsw i32 %89, -1
  store i32 %90, ptr %2, align 4, !tbaa !5
  br label %._crit_edge48.thread

._crit_edge48.thread:                             ; preds = %4, %._crit_edge, %88, %._crit_edge48
  ret void
}

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


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