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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z14extreme_vertexRSt6vectorI2PTSaIS0_EERKS0_i(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, i32 noundef %2) #3 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca %struct.PT, align 8
  %12 = alloca %struct.PT, align 8
  %13 = alloca i32, align 4
  %14 = alloca %struct.PT, align 8
  %15 = alloca %struct.PT, align 8
  %16 = alloca %struct.PT, align 8
  %17 = alloca %struct.PT, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %struct.PT, align 8
  %22 = alloca %struct.PT, align 8
  %23 = alloca %struct.PT, align 8
  %24 = alloca %struct.PT, align 8
  %25 = alloca %struct.PT, align 8
  %26 = alloca %struct.PT, align 8
  %27 = alloca %struct.PT, align 8
  %28 = alloca %struct.PT, align 8
  %29 = alloca i32, align 4
  %30 = alloca %struct.PT, align 8
  %31 = alloca %struct.PT, align 8
  %32 = alloca %struct.PT, align 8
  %33 = alloca %struct.PT, align 8
  %34 = alloca %struct.PT, align 8
  %35 = alloca %struct.PT, align 8
  %36 = alloca %struct.PT, align 8
  %37 = alloca %struct.PT, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #4
  %40 = trunc i64 %39 to i32
  store i32 %40, ptr %8, align 4, !tbaa !9
  %41 = load i32, ptr %8, align 4, !tbaa !9
  %42 = icmp eq i32 %41, 1
  br i1 %42, label %43, label %44

43:                                               ; preds = %3
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %172

44:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef 0) #4
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %46)
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %47)
  %48 = call noundef double @_Z3dot2PTS_(ptr noundef %11, ptr noundef %12)
  store double %48, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !9
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = load i32, ptr %7, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %51) #4
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %52)
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %53)
  %54 = call noundef double @_Z3dot2PTS_(ptr noundef %14, ptr noundef %15)
  %55 = load double, ptr %10, align 8, !tbaa !11
  %56 = fcmp ogt double %54, %55
  br i1 %56, label %57, label %65

57:                                               ; preds = %44
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %60) #4
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %61)
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %62)
  %63 = call noundef double @_Z3dot2PTS_(ptr noundef %16, ptr noundef %17)
  store double %63, ptr %10, align 8, !tbaa !11
  %64 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %64, ptr %13, align 4, !tbaa !9
  br label %65

65:                                               ; preds = %57, %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 1, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %66 = load i32, ptr %7, align 4, !tbaa !9
  %67 = sub nsw i32 %66, 1
  store i32 %67, ptr %19, align 4, !tbaa !9
  br label %68

68:                                               ; preds = %96, %65
  %69 = load i32, ptr %18, align 4, !tbaa !9
  %70 = load i32, ptr %19, align 4, !tbaa !9
  %71 = icmp slt i32 %69, %70
  br i1 %71, label %72, label %97

72:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %73 = load i32, ptr %18, align 4, !tbaa !9
  %74 = load i32, ptr %19, align 4, !tbaa !9
  %75 = add nsw i32 %73, %74
  %76 = ashr i32 %75, 1
  store i32 %76, ptr %20, align 4, !tbaa !9
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = load i32, ptr %20, align 4, !tbaa !9
  %79 = add nsw i32 %78, 1
  %80 = sext i32 %79 to i64
  %81 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %77, i64 noundef %80) #4
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %81)
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %82)
  %83 = call noundef double @_Z3dot2PTS_(ptr noundef %21, ptr noundef %22)
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = load i32, ptr %20, 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) #4
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %87)
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(16) %88)
  %89 = call noundef double @_Z3dot2PTS_(ptr noundef %23, ptr noundef %24)
  %90 = fcmp oge double %83, %89
  br i1 %90, label %91, label %94

91:                                               ; preds = %72
  %92 = load i32, ptr %20, align 4, !tbaa !9
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %18, align 4, !tbaa !9
  br label %96

94:                                               ; preds = %72
  %95 = load i32, ptr %20, align 4, !tbaa !9
  store i32 %95, ptr %19, align 4, !tbaa !9
  br label %96

96:                                               ; preds = %94, %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %68, !llvm.loop !13

97:                                               ; preds = %68
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = load i32, ptr %18, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %98, i64 noundef %100) #4
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 8 dereferenceable(16) %101)
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(16) %102)
  %103 = call noundef double @_Z3dot2PTS_(ptr noundef %25, ptr noundef %26)
  %104 = load double, ptr %10, align 8, !tbaa !11
  %105 = fcmp ogt double %103, %104
  br i1 %105, label %106, label %114

106:                                              ; preds = %97
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = load i32, ptr %18, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  %110 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %107, i64 noundef %109) #4
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(16) %110)
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(16) %111)
  %112 = call noundef double @_Z3dot2PTS_(ptr noundef %27, ptr noundef %28)
  store double %112, ptr %10, align 8, !tbaa !11
  %113 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %113, ptr %13, align 4, !tbaa !9
  br label %114

114:                                              ; preds = %106, %97
  %115 = load i32, ptr %7, align 4, !tbaa !9
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %18, align 4, !tbaa !9
  %117 = load i32, ptr %8, align 4, !tbaa !9
  %118 = sub nsw i32 %117, 1
  store i32 %118, ptr %19, align 4, !tbaa !9
  br label %119

119:                                              ; preds = %149, %114
  %120 = load i32, ptr %18, align 4, !tbaa !9
  %121 = load i32, ptr %19, align 4, !tbaa !9
  %122 = icmp slt i32 %120, %121
  br i1 %122, label %123, label %150

123:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  %124 = load i32, ptr %18, align 4, !tbaa !9
  %125 = load i32, ptr %19, align 4, !tbaa !9
  %126 = add nsw i32 %124, %125
  %127 = ashr i32 %126, 1
  store i32 %127, ptr %29, align 4, !tbaa !9
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = load i32, ptr %29, align 4, !tbaa !9
  %130 = add nsw i32 %129, 1
  %131 = load i32, ptr %8, align 4, !tbaa !9
  %132 = srem i32 %130, %131
  %133 = sext i32 %132 to i64
  %134 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %128, i64 noundef %133) #4
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(16) %134)
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 8 dereferenceable(16) %135)
  %136 = call noundef double @_Z3dot2PTS_(ptr noundef %30, ptr noundef %31)
  %137 = load ptr, ptr %5, align 8, !tbaa !5
  %138 = load i32, ptr %29, align 4, !tbaa !9
  %139 = sext i32 %138 to i64
  %140 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %137, i64 noundef %139) #4
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 8 dereferenceable(16) %140)
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 8 dereferenceable(16) %141)
  %142 = call noundef double @_Z3dot2PTS_(ptr noundef %32, ptr noundef %33)
  %143 = fcmp oge double %136, %142
  br i1 %143, label %144, label %147

144:                                              ; preds = %123
  %145 = load i32, ptr %29, align 4, !tbaa !9
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %18, align 4, !tbaa !9
  br label %149

147:                                              ; preds = %123
  %148 = load i32, ptr %29, align 4, !tbaa !9
  store i32 %148, ptr %19, align 4, !tbaa !9
  br label %149

149:                                              ; preds = %147, %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  br label %119, !llvm.loop !15

150:                                              ; preds = %119
  %151 = load i32, ptr %8, align 4, !tbaa !9
  %152 = load i32, ptr %18, align 4, !tbaa !9
  %153 = srem i32 %152, %151
  store i32 %153, ptr %18, align 4, !tbaa !9
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  %155 = load i32, ptr %18, align 4, !tbaa !9
  %156 = sext i32 %155 to i64
  %157 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %154, i64 noundef %156) #4
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 8 dereferenceable(16) %157)
  %158 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(16) %158)
  %159 = call noundef double @_Z3dot2PTS_(ptr noundef %34, ptr noundef %35)
  %160 = load double, ptr %10, align 8, !tbaa !11
  %161 = fcmp ogt double %159, %160
  br i1 %161, label %162, label %170

162:                                              ; preds = %150
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = load i32, ptr %18, align 4, !tbaa !9
  %165 = sext i32 %164 to i64
  %166 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %163, i64 noundef %165) #4
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef nonnull align 8 dereferenceable(16) %166)
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 8 dereferenceable(16) %167)
  %168 = call noundef double @_Z3dot2PTS_(ptr noundef %36, ptr noundef %37)
  store double %168, ptr %10, align 8, !tbaa !11
  %169 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %169, ptr %13, align 4, !tbaa !9
  br label %170

170:                                              ; preds = %162, %150
  %171 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %171, ptr %4, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %172

172:                                              ; preds = %170, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  %173 = load i32, ptr %4, align 4
  ret i32 %173
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { 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 }

!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, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_Z3dot2PTS_(ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z14extreme_vertexRSt6vectorI2PTSaIS0_EERKS0_i(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, i32 noundef %2) local_unnamed_addr #1 {
  %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 = alloca %struct.PT, align 8
  %16 = alloca %struct.PT, align 8
  %17 = alloca %struct.PT, align 8
  %18 = alloca %struct.PT, align 8
  %19 = alloca %struct.PT, align 8
  %20 = alloca %struct.PT, align 8
  %21 = alloca %struct.PT, align 8
  %22 = alloca %struct.PT, align 8
  %23 = alloca %struct.PT, align 8
  %24 = alloca %struct.PT, align 8
  %25 = alloca %struct.PT, align 8
  %26 = tail call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #2
  %27 = trunc i64 %26 to i32
  %28 = icmp eq i32 %27, 1
  br i1 %28, label %84, label %29

29:                                               ; preds = %3
  %30 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #2
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %30)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %31 = call noundef double @_Z3dot2PTS_(ptr noundef nonnull %4, ptr noundef nonnull %5)
  %32 = sext i32 %2 to i64
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %32) #2
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %33)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %34 = call noundef double @_Z3dot2PTS_(ptr noundef nonnull %6, ptr noundef nonnull %7)
  %35 = fcmp ogt double %34, %31
  br i1 %35, label %36, label %39

36:                                               ; preds = %29
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %32) #2
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %37)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %38 = call noundef double @_Z3dot2PTS_(ptr noundef nonnull %8, ptr noundef nonnull %9)
  br label %39

39:                                               ; preds = %36, %29
  %.067 = phi double [ %38, %36 ], [ %31, %29 ]
  %.064 = phi i32 [ %2, %36 ], [ 0, %29 ]
  %40 = icmp sgt i32 %2, 2
  br i1 %40, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %39
  %41 = add nsw i32 %2, -1
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %.05972 = phi i32 [ %..059, %.lr.ph ], [ %41, %.lr.ph.preheader ]
  %.06071 = phi i32 [ %.060., %.lr.ph ], [ 1, %.lr.ph.preheader ]
  %42 = add nuw nsw i32 %.05972, %.06071
  %43 = lshr i32 %42, 1
  %44 = add nuw nsw i32 %43, 1
  %45 = zext nneg i32 %44 to i64
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %45) #2
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %46)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %47 = call noundef double @_Z3dot2PTS_(ptr noundef nonnull %10, ptr noundef nonnull %11)
  %48 = zext nneg i32 %43 to i64
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %48) #2
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %49)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %50 = call noundef double @_Z3dot2PTS_(ptr noundef nonnull %12, ptr noundef nonnull %13)
  %51 = fcmp ult double %47, %50
  %.060. = select i1 %51, i32 %.06071, i32 %44
  %..059 = select i1 %51, i32 %43, i32 %.05972
  %52 = icmp slt i32 %.060., %..059
  br i1 %52, label %.lr.ph, label %._crit_edge, !llvm.loop !5

._crit_edge:                                      ; preds = %.lr.ph, %39
  %.060.lcssa = phi i32 [ 1, %39 ], [ %.060., %.lr.ph ]
  %53 = zext nneg i32 %.060.lcssa to i64
  %54 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %53) #2
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %54)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %55 = call noundef double @_Z3dot2PTS_(ptr noundef nonnull %14, ptr noundef nonnull %15)
  %56 = fcmp ogt double %55, %.067
  br i1 %56, label %57, label %60

57:                                               ; preds = %._crit_edge
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %53) #2
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %58)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %59 = call noundef double @_Z3dot2PTS_(ptr noundef nonnull %16, ptr noundef nonnull %17)
  br label %60

60:                                               ; preds = %57, %._crit_edge
  %.168 = phi double [ %59, %57 ], [ %.067, %._crit_edge ]
  %.165 = phi i32 [ %.060.lcssa, %57 ], [ %.064, %._crit_edge ]
  %61 = add nsw i32 %2, 1
  %62 = add nsw i32 %27, -1
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %.lr.ph76, label %._crit_edge77

.lr.ph76:                                         ; preds = %60, %.lr.ph76
  %.274 = phi i32 [ %..2, %.lr.ph76 ], [ %62, %60 ]
  %.26273 = phi i32 [ %.262., %.lr.ph76 ], [ %61, %60 ]
  %64 = add nsw i32 %.274, %.26273
  %65 = ashr i32 %64, 1
  %66 = add nsw i32 %65, 1
  %67 = srem i32 %66, %27
  %68 = sext i32 %67 to i64
  %69 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %68) #2
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %69)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %70 = call noundef double @_Z3dot2PTS_(ptr noundef nonnull %18, ptr noundef nonnull %19)
  %71 = sext i32 %65 to i64
  %72 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %71) #2
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %72)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %73 = call noundef double @_Z3dot2PTS_(ptr noundef nonnull %20, ptr noundef nonnull %21)
  %74 = fcmp ult double %70, %73
  %.262. = select i1 %74, i32 %.26273, i32 %66
  %..2 = select i1 %74, i32 %65, i32 %.274
  %75 = icmp slt i32 %.262., %..2
  br i1 %75, label %.lr.ph76, label %._crit_edge77, !llvm.loop !7

._crit_edge77:                                    ; preds = %.lr.ph76, %60
  %.262.lcssa = phi i32 [ %61, %60 ], [ %.262., %.lr.ph76 ]
  %76 = srem i32 %.262.lcssa, %27
  %77 = sext i32 %76 to i64
  %78 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %77) #2
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %78)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %79 = call noundef double @_Z3dot2PTS_(ptr noundef nonnull %22, ptr noundef nonnull %23)
  %80 = fcmp ogt double %79, %.168
  br i1 %80, label %81, label %84

81:                                               ; preds = %._crit_edge77
  %82 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %77) #2
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(16) %82)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %83 = call noundef double @_Z3dot2PTS_(ptr noundef nonnull %24, ptr noundef nonnull %25)
  br label %84

84:                                               ; preds = %._crit_edge77, %81, %3
  %.0 = phi i32 [ 0, %3 ], [ %76, %81 ], [ %.165, %._crit_edge77 ]
  ret i32 %.0
}

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

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

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


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