; LLVM IR from gzc/CLRS :: C33-Computational-Geometry/exercise_code (colinear)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%class.Point = type { float, float }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z6myfuncRK5PointS1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_Z12crossProductRK5PointS1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %1 = alloca i32, align 4
  %2 = alloca %class.Point, align 4
  %3 = alloca %class.Point, align 4
  %4 = alloca %class.Point, align 4
  %5 = alloca [3 x %class.Point], align 16
  %6 = alloca [3 x %class.Point], align 16
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca [3 x i8], align 1
  %10 = alloca i32, align 4
  %11 = alloca %class.Point, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #9
  call void @_ZN5PointC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %2, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #9
  call void @_ZN5PointC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %3, float noundef -1.000000e+00, float noundef -1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #9
  call void @_ZN5PointC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %4, float noundef 2.000000e+00, float noundef 2.000000e+00)
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %5, ptr align 4 %2, i64 8, i1 false), !tbaa.struct !5
  %13 = getelementptr inbounds %class.Point, ptr %5, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 4 %3, i64 8, i1 false), !tbaa.struct !5
  %14 = getelementptr inbounds %class.Point, ptr %5, i64 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 4 %4, i64 8, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #9
  %15 = getelementptr inbounds [3 x %class.Point], ptr %6, i32 0, i32 0
  %16 = getelementptr inbounds %class.Point, ptr %15, i64 3
  br label %17

17:                                               ; preds = %17, %0
  %18 = phi ptr [ %15, %0 ], [ %19, %17 ]
  call void @_ZN5PointC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %18)
  %19 = getelementptr inbounds %class.Point, ptr %18, i64 1
  %20 = icmp eq ptr %19, %16
  br i1 %20, label %21, label %17

21:                                               ; preds = %17
  %22 = getelementptr inbounds [3 x %class.Point], ptr %5, i64 0, i64 0
  %23 = getelementptr inbounds [3 x %class.Point], ptr %5, i64 0, i64 0
  %24 = getelementptr inbounds %class.Point, ptr %23, i64 3
  %25 = getelementptr inbounds [3 x %class.Point], ptr %6, i64 0, i64 0
  %26 = call noundef ptr @_ZSt4copyIP5PointS1_ET0_T_S3_S2_(ptr noundef %22, ptr noundef %24, ptr noundef %25)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  store i32 0, ptr %7, align 4, !tbaa !10
  br label %27

27:                                               ; preds = %148, %21
  %28 = load i32, ptr %7, align 4, !tbaa !10
  %29 = icmp slt i32 %28, 3
  br i1 %29, label %31, label %30

30:                                               ; preds = %27
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  br label %151

31:                                               ; preds = %27
  %32 = getelementptr inbounds [3 x %class.Point], ptr %6, i64 0, i64 0
  %33 = getelementptr inbounds [3 x %class.Point], ptr %6, i64 0, i64 0
  %34 = getelementptr inbounds %class.Point, ptr %33, i64 3
  %35 = getelementptr inbounds [3 x %class.Point], ptr %5, i64 0, i64 0
  %36 = call noundef ptr @_ZSt4copyIP5PointS1_ET0_T_S3_S2_(ptr noundef %32, ptr noundef %34, ptr noundef %35)
  call void @llvm.lifetime.start.p0(i64 3, ptr %9) #9
  call void @llvm.memset.p0.i64(ptr align 1 %9, i8 0, i64 3, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  %37 = load i32, ptr %7, align 4, !tbaa !10
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %10, align 4, !tbaa !10
  br label %39

39:                                               ; preds = %69, %31
  %40 = load i32, ptr %10, align 4, !tbaa !10
  %41 = icmp slt i32 %40, 3
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  br label %72

43:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %44 = load i32, ptr %10, align 4, !tbaa !10
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [3 x %class.Point], ptr %5, i64 0, i64 %45
  %47 = load i32, ptr %7, align 4, !tbaa !10
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [3 x %class.Point], ptr %5, i64 0, i64 %48
  %50 = call <2 x float> @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %46, ptr noundef nonnull align 4 dereferenceable(8) %49)
  store <2 x float> %50, ptr %11, align 4
  %51 = load i32, ptr %10, align 4, !tbaa !10
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [3 x %class.Point], ptr %5, i64 0, i64 %52
  %54 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 4 dereferenceable(8) %53, ptr noundef nonnull align 4 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  %55 = load i32, ptr %10, align 4, !tbaa !10
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [3 x %class.Point], ptr %5, i64 0, i64 %56
  %58 = getelementptr inbounds %class.Point, ptr %57, i32 0, i32 1
  %59 = load float, ptr %58, align 4, !tbaa !12
  %60 = fcmp olt float %59, 0.000000e+00
  br i1 %60, label %61, label %68

61:                                               ; preds = %43
  %62 = load i32, ptr %10, align 4, !tbaa !10
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [3 x i8], ptr %9, i64 0, i64 %63
  store i8 1, ptr %64, align 1, !tbaa !14
  %65 = load i32, ptr %10, align 4, !tbaa !10
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [3 x %class.Point], ptr %5, i64 0, i64 %66
  call void @_ZN5Point7reverseEv(ptr noundef nonnull align 4 dereferenceable(8) %67)
  br label %68

68:                                               ; preds = %61, %43
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %10, align 4, !tbaa !10
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %10, align 4, !tbaa !10
  br label %39, !llvm.loop !16

72:                                               ; preds = %42
  %73 = getelementptr inbounds [3 x %class.Point], ptr %5, i64 0, i64 0
  %74 = load i32, ptr %7, align 4, !tbaa !10
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds %class.Point, ptr %73, i64 %75
  %77 = getelementptr inbounds %class.Point, ptr %76, i64 1
  %78 = getelementptr inbounds [3 x %class.Point], ptr %5, i64 0, i64 0
  %79 = getelementptr inbounds %class.Point, ptr %78, i64 3
  call void @_ZSt4sortIP5PointPFbRKS0_S3_EEvT_S6_T0_(ptr noundef %77, ptr noundef %79, ptr noundef @_Z6myfuncRK5PointS1_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  %80 = load i32, ptr %7, align 4, !tbaa !10
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %12, align 4, !tbaa !10
  br label %82

82:                                               ; preds = %144, %72
  %83 = load i32, ptr %12, align 4, !tbaa !10
  %84 = icmp slt i32 %83, 2
  br i1 %84, label %86, label %85

85:                                               ; preds = %82
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  br label %147

86:                                               ; preds = %82
  %87 = load i32, ptr %12, align 4, !tbaa !10
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [3 x %class.Point], ptr %5, i64 0, i64 %88
  %90 = load i32, ptr %12, align 4, !tbaa !10
  %91 = add nsw i32 %90, 1
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [3 x %class.Point], ptr %5, i64 0, i64 %92
  %94 = call noundef float @_Z12crossProductRK5PointS1_(ptr noundef nonnull align 4 dereferenceable(8) %89, ptr noundef nonnull align 4 dereferenceable(8) %93)
  %95 = call noundef float @_ZSt3absf(float noundef %94)
  %96 = fpext float %95 to double
  %97 = fcmp ole double %96, 1.000000e-08
  br i1 %97, label %98, label %143

98:                                               ; preds = %86
  %99 = load i32, ptr %7, align 4, !tbaa !10
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [3 x %class.Point], ptr %5, i64 0, i64 %100
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK5Point(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 4 dereferenceable(8) %101)
  %103 = load i32, ptr %12, align 4, !tbaa !10
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [3 x i8], ptr %9, i64 0, i64 %104
  %106 = load i8, ptr %105, align 1, !tbaa !14, !range !18, !noundef !19
  %107 = trunc i8 %106 to i1
  br i1 %107, label %108, label %115

108:                                              ; preds = %98
  %109 = load i32, ptr %12, align 4, !tbaa !10
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [3 x i8], ptr %9, i64 0, i64 %110
  store i8 0, ptr %111, align 1, !tbaa !14
  %112 = load i32, ptr %12, align 4, !tbaa !10
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [3 x %class.Point], ptr %5, i64 0, i64 %113
  call void @_ZN5Point7reverseEv(ptr noundef nonnull align 4 dereferenceable(8) %114)
  br label %115

115:                                              ; preds = %108, %98
  %116 = load i32, ptr %12, align 4, !tbaa !10
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [3 x %class.Point], ptr %5, i64 0, i64 %117
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK5Point(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 4 dereferenceable(8) %118)
  %120 = load i32, ptr %12, align 4, !tbaa !10
  %121 = add nsw i32 %120, 1
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [3 x i8], ptr %9, i64 0, i64 %122
  %124 = load i8, ptr %123, align 1, !tbaa !14, !range !18, !noundef !19
  %125 = trunc i8 %124 to i1
  br i1 %125, label %126, label %135

126:                                              ; preds = %115
  %127 = load i32, ptr %12, align 4, !tbaa !10
  %128 = add nsw i32 %127, 1
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [3 x i8], ptr %9, i64 0, i64 %129
  store i8 0, ptr %130, align 1, !tbaa !14
  %131 = load i32, ptr %12, align 4, !tbaa !10
  %132 = add nsw i32 %131, 1
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [3 x %class.Point], ptr %5, i64 0, i64 %133
  call void @_ZN5Point7reverseEv(ptr noundef nonnull align 4 dereferenceable(8) %134)
  br label %135

135:                                              ; preds = %126, %115
  %136 = load i32, ptr %12, align 4, !tbaa !10
  %137 = add nsw i32 %136, 1
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [3 x %class.Point], ptr %5, i64 0, i64 %138
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK5Point(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 4 dereferenceable(8) %139)
  %141 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %141, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %143

143:                                              ; preds = %135, %86
  br label %144

144:                                              ; preds = %143
  %145 = load i32, ptr %12, align 4, !tbaa !10
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %12, align 4, !tbaa !10
  br label %82, !llvm.loop !20

147:                                              ; preds = %85
  call void @llvm.lifetime.end.p0(i64 3, ptr %9) #9
  br label %148

148:                                              ; preds = %147
  %149 = load i32, ptr %7, align 4, !tbaa !10
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %7, align 4, !tbaa !10
  br label %27, !llvm.loop !21

151:                                              ; preds = %30
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #9
  %152 = load i32, ptr %1, align 4
  ret i32 %152
}

; 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 void @_ZN5PointC2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #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) #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4copyIP5PointS1_ET0_T_S3_S2_(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #6 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP5PointPFbRKS0_S3_EEvT_S6_T0_(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3absf(float noundef) #7

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #8 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

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 norecurse uwtable "min-legal-vector-width"="64" "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="64" "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 #7 = { 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 #8 = { 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 #9 = { 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 = !{i64 0, i64 4, !6, i64 4, i64 4, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!13, !7, i64 4}
!13 = !{!"_ZTS5Point", !7, i64 0, !7, i64 4}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !8, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !17}


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%class.Point = type { float, float }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z6myfuncRK5PointS1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #0

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
.lr.ph:
  %0 = alloca %class.Point, align 8
  %1 = alloca %class.Point, align 8
  %2 = alloca %class.Point, align 8
  %3 = alloca [3 x %class.Point], align 16
  %4 = alloca [3 x %class.Point], align 16
  %5 = alloca %class.Point, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %0) #7
  call void @_ZN5PointC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %0, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @_ZN5PointC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %1, float noundef -1.000000e+00, float noundef -1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  call void @_ZN5PointC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %2, float noundef 2.000000e+00, float noundef 2.000000e+00)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  %6 = load i64, ptr %0, align 8
  store i64 %6, ptr %3, align 16
  %7 = getelementptr inbounds i8, ptr %3, i64 8
  %8 = load i64, ptr %1, align 8
  store i64 %8, ptr %7, align 8
  %9 = getelementptr inbounds i8, ptr %3, i64 16
  %10 = load i64, ptr %2, align 8
  store i64 %10, ptr %9, align 16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  call void @_ZN5PointC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %4)
  %.ptr.1 = getelementptr inbounds i8, ptr %4, i64 8
  call void @_ZN5PointC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr.1)
  %.ptr.2 = getelementptr inbounds i8, ptr %4, i64 16
  call void @_ZN5PointC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %.ptr.2)
  %11 = getelementptr inbounds i8, ptr %4, i64 24
  %12 = getelementptr inbounds i8, ptr %3, i64 24
  %13 = call noundef ptr @_ZSt4copyIP5PointS1_ET0_T_S3_S2_(ptr noundef nonnull %3, ptr noundef nonnull %12, ptr noundef nonnull %4)
  %14 = call noundef ptr @_ZSt4copyIP5PointS1_ET0_T_S3_S2_(ptr noundef nonnull %4, ptr noundef nonnull %11, ptr noundef nonnull %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %15 = call <2 x float> @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %3)
  store <2 x float> %15, ptr %5, align 8
  %16 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %17 = getelementptr inbounds i8, ptr %3, i64 12
  %18 = load float, ptr %17, align 4, !tbaa !5
  %19 = fcmp olt float %18, 0.000000e+00
  br i1 %19, label %24, label %25

.lr.ph34:                                         ; preds = %31, %25
  call void @_ZSt4sortIP5PointPFbRKS0_S3_EEvT_S6_T0_(ptr noundef nonnull %7, ptr noundef nonnull %12, ptr noundef nonnull @_Z6myfuncRK5PointS1_)
  %20 = call noundef float @_Z12crossProductRK5PointS1_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %9)
  %21 = call noundef float @_ZSt3absf(float noundef %20)
  %22 = fpext float %21 to double
  %23 = fcmp ugt double %22, 1.000000e-08
  br i1 %23, label %.lr.ph.1, label %40

24:                                               ; preds = %.lr.ph
  call void @_ZN5Point7reverseEv(ptr noundef nonnull align 4 dereferenceable(8) %7)
  br label %25

25:                                               ; preds = %.lr.ph, %24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %26 = call <2 x float> @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(8) %3)
  store <2 x float> %26, ptr %5, align 8
  %27 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %28 = getelementptr inbounds i8, ptr %3, i64 20
  %29 = load float, ptr %28, align 4, !tbaa !5
  %30 = fcmp olt float %29, 0.000000e+00
  br i1 %30, label %31, label %.lr.ph34

31:                                               ; preds = %25
  call void @_ZN5Point7reverseEv(ptr noundef nonnull align 4 dereferenceable(8) %9)
  br label %.lr.ph34

.lr.ph.1:                                         ; preds = %.lr.ph34, %46
  %32 = call noundef ptr @_ZSt4copyIP5PointS1_ET0_T_S3_S2_(ptr noundef nonnull %4, ptr noundef nonnull %11, ptr noundef nonnull %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %33 = call <2 x float> @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(8) %7)
  store <2 x float> %33, ptr %5, align 8
  %34 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN5PointaSERKS_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %35 = getelementptr inbounds i8, ptr %3, i64 20
  %36 = load float, ptr %35, align 4, !tbaa !5
  %37 = fcmp olt float %36, 0.000000e+00
  br i1 %37, label %38, label %._crit_edge35.2

38:                                               ; preds = %.lr.ph.1
  call void @_ZN5Point7reverseEv(ptr noundef nonnull align 4 dereferenceable(8) %9)
  br label %._crit_edge35.2

._crit_edge35.2:                                  ; preds = %38, %.lr.ph.1
  %gep.1 = getelementptr inbounds i8, ptr %3, i64 16
  call void @_ZSt4sortIP5PointPFbRKS0_S3_EEvT_S6_T0_(ptr noundef nonnull %gep.1, ptr noundef nonnull %12, ptr noundef nonnull @_Z6myfuncRK5PointS1_)
  %39 = call noundef ptr @_ZSt4copyIP5PointS1_ET0_T_S3_S2_(ptr noundef nonnull %4, ptr noundef nonnull %11, ptr noundef nonnull %3)
  %gep.2 = getelementptr inbounds i8, ptr %3, i64 24
  call void @_ZSt4sortIP5PointPFbRKS0_S3_EEvT_S6_T0_(ptr noundef nonnull %gep.2, ptr noundef nonnull %12, ptr noundef nonnull @_Z6myfuncRK5PointS1_)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %0) #7
  ret i32 0

40:                                               ; preds = %.lr.ph34
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK5Point(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 4 dereferenceable(8) %3)
  br i1 %19, label %42, label %43

42:                                               ; preds = %40
  call void @_ZN5Point7reverseEv(ptr noundef nonnull align 4 dereferenceable(8) %7)
  br label %43

43:                                               ; preds = %42, %40
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK5Point(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 4 dereferenceable(8) %7)
  br i1 %30, label %45, label %46

45:                                               ; preds = %43
  call void @_ZN5Point7reverseEv(ptr noundef nonnull align 4 dereferenceable(8) %9)
  br label %46

46:                                               ; preds = %45, %43
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK5Point(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 4 dereferenceable(8) %9)
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.lr.ph.1
}

; 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 void @_ZN5PointC2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZNK5PointmiERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN5PointaSERKS_(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) #2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3absf(float noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK5Point(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

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 norecurse uwtable "min-legal-vector-width"="64" "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 uwtable "min-legal-vector-width"="64" "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 = { 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 #6 = { 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 #7 = { 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, !7, i64 4}
!6 = !{!"_ZTS5Point", !7, i64 0, !7, i64 4}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,SCCPPass,SROAPass,SimplifyCFGPass