; LLVM IR from ayush-tulsyan/ACM-ICPC-Handbook :: code/Geometry.ll (Z22CircleLineIntersection2PTS_S_d)

; 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 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl" }
%"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl" = type { %"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl_data" }
%"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@EPS = external dso_local global double, align 8

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK2PTmiERKS_(ptr dead_on_unwind noalias writable sret(%struct.PT) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK2PTplERKS_(ptr dead_on_unwind noalias writable sret(%struct.PT) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK2PTmlEd(ptr dead_on_unwind noalias writable sret(%struct.PT) align 8, ptr noundef nonnull align 8 dereferenceable(16), double noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK2PTdvEd(ptr dead_on_unwind noalias writable sret(%struct.PT) align 8, ptr noundef nonnull align 8 dereferenceable(16), double noundef) #2 align 2

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

; 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: nounwind
declare double @sqrt(double noundef) #4

; 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) #5

; Function Attrs: mustprogress uwtable
define dso_local void @_Z22CircleLineIntersection2PTS_S_d(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, double noundef %4) #2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca double, align 8
  %11 = alloca i1, align 1
  %12 = alloca %struct.PT, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %struct.PT, align 8
  %16 = alloca double, align 8
  %17 = alloca %struct.PT, align 8
  %18 = alloca %struct.PT, align 8
  %19 = alloca double, align 8
  %20 = alloca %struct.PT, align 8
  %21 = alloca %struct.PT, align 8
  %22 = alloca double, align 8
  %23 = alloca %struct.PT, align 8
  %24 = alloca %struct.PT, align 8
  %25 = alloca double, align 8
  %26 = alloca i32, align 4
  %27 = alloca %struct.PT, align 8
  %28 = alloca %struct.PT, align 8
  %29 = alloca %struct.PT, align 8
  %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
  store ptr %0, ptr %6, align 8
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store double %4, ptr %10, align 8, !tbaa !9
  store i1 false, ptr %11, align 1
  call void @_ZNSt6vectorI2PTSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #6
  invoke void @_ZNK2PTmiERKS_(ptr dead_on_unwind writable sret(%struct.PT) align 8 %12, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %35 unwind label %62

35:                                               ; preds = %5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %2, ptr align 8 %12, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  invoke void @_ZNK2PTmiERKS_(ptr dead_on_unwind writable sret(%struct.PT) align 8 %15, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %36 unwind label %66

36:                                               ; preds = %35
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %1, ptr align 8 %15, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  invoke void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %2)
          to label %37 unwind label %70

37:                                               ; preds = %36
  invoke void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %2)
          to label %38 unwind label %70

38:                                               ; preds = %37
  %39 = call noundef double @_Z3dot2PTS_(ptr noundef %17, ptr noundef %18)
  store double %39, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  invoke void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %40 unwind label %74

40:                                               ; preds = %38
  invoke void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %2)
          to label %41 unwind label %74

41:                                               ; preds = %40
  %42 = call noundef double @_Z3dot2PTS_(ptr noundef %20, ptr noundef %21)
  store double %42, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  invoke void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %43 unwind label %78

43:                                               ; preds = %41
  invoke void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %44 unwind label %78

44:                                               ; preds = %43
  %45 = call noundef double @_Z3dot2PTS_(ptr noundef %23, ptr noundef %24)
  %46 = load double, ptr %10, align 8, !tbaa !9
  %47 = load double, ptr %10, align 8, !tbaa !9
  %48 = fneg double %46
  %49 = call double @llvm.fmuladd.f64(double %48, double %47, double %45)
  store double %49, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %50 = load double, ptr %19, align 8, !tbaa !9
  %51 = load double, ptr %19, align 8, !tbaa !9
  %52 = load double, ptr %16, align 8, !tbaa !9
  %53 = load double, ptr %22, align 8, !tbaa !9
  %54 = fmul double %52, %53
  %55 = fneg double %54
  %56 = call double @llvm.fmuladd.f64(double %50, double %51, double %55)
  store double %56, ptr %25, align 8, !tbaa !9
  %57 = load double, ptr %25, align 8, !tbaa !9
  %58 = load double, ptr @EPS, align 8, !tbaa !9
  %59 = fneg double %58
  %60 = fcmp olt double %57, %59
  br i1 %60, label %61, label %82

61:                                               ; preds = %44
  store i1 true, ptr %11, align 1
  store i32 1, ptr %26, align 4
  br label %130

62:                                               ; preds = %5
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %13, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  br label %138

66:                                               ; preds = %35
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %13, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  br label %138

70:                                               ; preds = %37, %36
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %13, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %14, align 4
  br label %135

74:                                               ; preds = %40, %38
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %13, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %14, align 4
  br label %134

78:                                               ; preds = %43, %41
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %13, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %14, align 4
  br label %133

82:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #6
  invoke void @_ZNK2PTplERKS_(ptr dead_on_unwind writable sret(%struct.PT) align 8 %28, ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %83 unwind label %111

83:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #6
  %84 = load double, ptr %19, align 8, !tbaa !9
  %85 = fneg double %84
  %86 = load double, ptr %25, align 8, !tbaa !9
  %87 = load double, ptr @EPS, align 8, !tbaa !9
  %88 = fadd double %86, %87
  %89 = call double @sqrt(double noundef %88) #6
  %90 = fadd double %85, %89
  invoke void @_ZNK2PTmlEd(ptr dead_on_unwind writable sret(%struct.PT) align 8 %30, ptr noundef nonnull align 8 dereferenceable(16) %2, double noundef %90)
          to label %91 unwind label %115

91:                                               ; preds = %83
  %92 = load double, ptr %16, align 8, !tbaa !9
  invoke void @_ZNK2PTdvEd(ptr dead_on_unwind writable sret(%struct.PT) align 8 %29, ptr noundef nonnull align 8 dereferenceable(16) %30, double noundef %92)
          to label %93 unwind label %115

93:                                               ; preds = %91
  invoke void @_ZNK2PTplERKS_(ptr dead_on_unwind writable sret(%struct.PT) align 8 %27, ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(16) %29)
          to label %94 unwind label %115

94:                                               ; preds = %93
  invoke void @_ZNSt6vectorI2PTSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(16) %27)
          to label %95 unwind label %115

95:                                               ; preds = %94
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #6
  %96 = load double, ptr %25, align 8, !tbaa !9
  %97 = load double, ptr @EPS, align 8, !tbaa !9
  %98 = fcmp ogt double %96, %97
  br i1 %98, label %99, label %129

99:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #6
  invoke void @_ZNK2PTplERKS_(ptr dead_on_unwind writable sret(%struct.PT) align 8 %32, ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %100 unwind label %120

100:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %34) #6
  %101 = load double, ptr %19, align 8, !tbaa !9
  %102 = fneg double %101
  %103 = load double, ptr %25, align 8, !tbaa !9
  %104 = call double @sqrt(double noundef %103) #6
  %105 = fsub double %102, %104
  invoke void @_ZNK2PTmlEd(ptr dead_on_unwind writable sret(%struct.PT) align 8 %34, ptr noundef nonnull align 8 dereferenceable(16) %2, double noundef %105)
          to label %106 unwind label %124

106:                                              ; preds = %100
  %107 = load double, ptr %16, align 8, !tbaa !9
  invoke void @_ZNK2PTdvEd(ptr dead_on_unwind writable sret(%struct.PT) align 8 %33, ptr noundef nonnull align 8 dereferenceable(16) %34, double noundef %107)
          to label %108 unwind label %124

108:                                              ; preds = %106
  invoke void @_ZNK2PTplERKS_(ptr dead_on_unwind writable sret(%struct.PT) align 8 %31, ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 8 dereferenceable(16) %33)
          to label %109 unwind label %124

109:                                              ; preds = %108
  invoke void @_ZNSt6vectorI2PTSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(16) %31)
          to label %110 unwind label %124

110:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #6
  br label %129

111:                                              ; preds = %82
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %13, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %14, align 4
  br label %119

115:                                              ; preds = %94, %93, %91, %83
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %13, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #6
  br label %119

119:                                              ; preds = %115, %111
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #6
  br label %132

120:                                              ; preds = %99
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %13, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %14, align 4
  br label %128

124:                                              ; preds = %109, %108, %106, %100
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %13, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #6
  br label %128

128:                                              ; preds = %124, %120
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #6
  br label %132

129:                                              ; preds = %110, %95
  store i1 true, ptr %11, align 1
  store i32 1, ptr %26, align 4
  br label %130

130:                                              ; preds = %129, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  %131 = load i1, ptr %11, align 1
  br i1 %131, label %137, label %136

132:                                              ; preds = %128, %119
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %133

133:                                              ; preds = %132, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %134

134:                                              ; preds = %133, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %135

135:                                              ; preds = %134, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %138

136:                                              ; preds = %130
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %137

137:                                              ; preds = %136, %130
  ret void

138:                                              ; preds = %135, %66, %62
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %139

139:                                              ; preds = %138
  %140 = load ptr, ptr %13, align 8
  %141 = load i32, ptr %14, align 4
  %142 = insertvalue { ptr, i32 } poison, ptr %140, 0
  %143 = insertvalue { ptr, i32 } %142, i32 %141, 1
  resume { ptr, i32 } %143
}

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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


; 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 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl" }
%"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl" = type { %"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl_data" }
%"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@EPS = external dso_local local_unnamed_addr global double, align 8

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK2PTmiERKS_(ptr dead_on_unwind noalias writable sret(%struct.PT) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK2PTplERKS_(ptr dead_on_unwind noalias writable sret(%struct.PT) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK2PTmlEd(ptr dead_on_unwind noalias writable sret(%struct.PT) align 8, ptr noundef nonnull align 8 dereferenceable(16), double noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK2PTdvEd(ptr dead_on_unwind noalias writable sret(%struct.PT) align 8, ptr noundef nonnull align 8 dereferenceable(16), double noundef) local_unnamed_addr #2 align 2

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

; 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: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z22CircleLineIntersection2PTS_S_d(ptr dead_on_unwind noalias nonnull writable sret(%"class.std::vector") align 8 %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, double noundef %4) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %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
  tail call void @_ZNSt6vectorI2PTSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  invoke void @_ZNK2PTmiERKS_(ptr dead_on_unwind nonnull writable sret(%struct.PT) align 8 %6, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %22 unwind label %35

22:                                               ; preds = %5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %6, i64 16, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  invoke void @_ZNK2PTmiERKS_(ptr dead_on_unwind nonnull writable sret(%struct.PT) align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %23 unwind label %37

23:                                               ; preds = %22
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %7, i64 16, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %2)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %2)
  %24 = call noundef double @_Z3dot2PTS_(ptr noundef nonnull %8, ptr noundef nonnull %9)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %1)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %2)
  %25 = call noundef double @_Z3dot2PTS_(ptr noundef nonnull %10, ptr noundef nonnull %11)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %1)
  call void @_ZN2PTC2ERKS_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %26 = call noundef double @_Z3dot2PTS_(ptr noundef nonnull %12, ptr noundef nonnull %13)
  %27 = fneg double %4
  %28 = call double @llvm.fmuladd.f64(double %27, double %4, double %26)
  %29 = fneg double %24
  %30 = fmul double %28, %29
  %31 = call double @llvm.fmuladd.f64(double %25, double %25, double %30)
  %32 = load double, ptr @EPS, align 8, !tbaa !6
  %33 = fneg double %32
  %34 = fcmp olt double %31, %33
  br i1 %34, label %70, label %39

35:                                               ; preds = %5
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  br label %71

37:                                               ; preds = %22
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  br label %71

39:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #6
  invoke void @_ZNK2PTplERKS_(ptr dead_on_unwind nonnull writable sret(%struct.PT) align 8 %15, ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %40 unwind label %60

40:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #6
  %41 = fneg double %25
  %42 = load double, ptr @EPS, align 8, !tbaa !6
  %43 = fadd double %31, %42
  %44 = call double @sqrt(double noundef %43) #6
  %45 = fsub double %44, %25
  invoke void @_ZNK2PTmlEd(ptr dead_on_unwind nonnull writable sret(%struct.PT) align 8 %17, ptr noundef nonnull align 8 dereferenceable(16) %2, double noundef %45)
          to label %46 unwind label %62

46:                                               ; preds = %40
  invoke void @_ZNK2PTdvEd(ptr dead_on_unwind nonnull writable sret(%struct.PT) align 8 %16, ptr noundef nonnull align 8 dereferenceable(16) %17, double noundef %24)
          to label %47 unwind label %62

47:                                               ; preds = %46
  invoke void @_ZNK2PTplERKS_(ptr dead_on_unwind nonnull writable sret(%struct.PT) align 8 %14, ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %48 unwind label %62

48:                                               ; preds = %47
  invoke void @_ZNSt6vectorI2PTSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %49 unwind label %62

49:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #6
  %50 = load double, ptr @EPS, align 8, !tbaa !6
  %51 = fcmp ogt double %31, %50
  br i1 %51, label %52, label %70

52:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #6
  invoke void @_ZNK2PTplERKS_(ptr dead_on_unwind nonnull writable sret(%struct.PT) align 8 %19, ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %53 unwind label %65

53:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #6
  %54 = call double @sqrt(double noundef %31) #6
  %55 = fsub double %41, %54
  invoke void @_ZNK2PTmlEd(ptr dead_on_unwind nonnull writable sret(%struct.PT) align 8 %21, ptr noundef nonnull align 8 dereferenceable(16) %2, double noundef %55)
          to label %56 unwind label %67

56:                                               ; preds = %53
  invoke void @_ZNK2PTdvEd(ptr dead_on_unwind nonnull writable sret(%struct.PT) align 8 %20, ptr noundef nonnull align 8 dereferenceable(16) %21, double noundef %24)
          to label %57 unwind label %67

57:                                               ; preds = %56
  invoke void @_ZNK2PTplERKS_(ptr dead_on_unwind nonnull writable sret(%struct.PT) align 8 %18, ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %58 unwind label %67

58:                                               ; preds = %57
  invoke void @_ZNSt6vectorI2PTSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %59 unwind label %67

59:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #6
  br label %70

60:                                               ; preds = %39
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %64

62:                                               ; preds = %48, %47, %46, %40
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #6
  br label %64

64:                                               ; preds = %62, %60
  %.pn = phi { ptr, i32 } [ %63, %62 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #6
  br label %71

65:                                               ; preds = %52
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %69

67:                                               ; preds = %58, %57, %56, %53
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #6
  br label %69

69:                                               ; preds = %67, %65
  %.pn22 = phi { ptr, i32 } [ %68, %67 ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #6
  br label %71

70:                                               ; preds = %23, %59, %49
  ret void

71:                                               ; preds = %64, %69, %37, %35
  %.pn22.pn.pn = phi { ptr, i32 } [ %38, %37 ], [ %36, %35 ], [ %.pn22, %69 ], [ %.pn, %64 ]
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  resume { ptr, i32 } %.pn22.pn.pn
}

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass