; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R3Shapes/R3Isect.ll (Z12R3IntersectsRK5R3RayS1_P7R3PointPdS4_)

; 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.R3Vector = type { [3 x double] }
%class.R3Point = type { [3 x double] }

@RN_EPSILON = external global double, align 8
@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [44 x i8], align 1

declare noundef double @_ZNK5R3Ray1TERK7R3Point(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(24)) #0

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z8RNIsZerodd(double noundef, double noundef) #2

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

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK5R3Ray6VectorEv(ptr noundef nonnull align 8 dereferenceable(48)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK5R3Ray5StartEv(ptr noundef nonnull align 8 dereferenceable(48)) #3 align 2

declare void @_Z7RNAbortPKcz(ptr noundef, ...) #0

declare void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0

declare void @_ZngRK8R3Vector(ptr dead_on_unwind writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(24)) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z12RNIsNegativedd(double noundef, double noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z12R3IntersectsRK5R3RayS1_P7R3PointPdS4_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #4 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %class.R3Point, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca i32, align 4
  %16 = alloca %class.R3Vector, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #5
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store double 0.000000e+00, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store double 0.000000e+00, ptr %14, align 8, !tbaa !9
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK5R3Ray4LineEv(ptr noundef nonnull align 8 dereferenceable(48) %18)
  %20 = call noundef i32 @_Z12R3IntersectsRK5R3RayRK6R3LineP7R3PointPd(ptr noundef nonnull align 8 dereferenceable(48) %17, ptr noundef nonnull align 8 dereferenceable(48) %19, ptr noundef %12, ptr noundef %13)
  switch i32 %20, label %101 [
    i32 0, label %21
    i32 3, label %22
    i32 1, label %74
  ]

21:                                               ; preds = %5
  store i32 0, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %103

22:                                               ; preds = %5
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK5R3Ray6VectorEv(ptr noundef nonnull align 8 dereferenceable(48) %23)
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  %26 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK5R3Ray6VectorEv(ptr noundef nonnull align 8 dereferenceable(48) %25)
  %27 = call noundef i32 @_Z10R3ContainsRK8R3VectorS1_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(24) %26)
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %29, label %30

29:                                               ; preds = %22
  store i32 3, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %103

30:                                               ; preds = %22
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK5R3Ray6VectorEv(ptr noundef nonnull align 8 dereferenceable(48) %31)
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #5
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK5R3Ray6VectorEv(ptr noundef nonnull align 8 dereferenceable(48) %33)
  call void @_ZngRK8R3Vector(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %16, ptr noundef nonnull align 8 dereferenceable(24) %34)
  %35 = call noundef i32 @_Z10R3ContainsRK8R3VectorS1_(ptr noundef nonnull align 8 dereferenceable(24) %32, ptr noundef nonnull align 8 dereferenceable(24) %16)
  %36 = icmp ne i32 %35, 0
  %37 = xor i1 %36, true
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #5
  br i1 %37, label %38, label %39

38:                                               ; preds = %30
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str.3, ptr noundef @.str.6, i32 noundef 638, ptr noundef @.str.5)
  br label %39

39:                                               ; preds = %38, %30
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK5R3Ray5StartEv(ptr noundef nonnull align 8 dereferenceable(48) %41)
  %43 = call noundef double @_ZNK5R3Ray1TERK7R3Point(ptr noundef nonnull align 8 dereferenceable(48) %40, ptr noundef nonnull align 8 dereferenceable(24) %42)
  store double %43, ptr %14, align 8, !tbaa !9
  %44 = load double, ptr %14, align 8, !tbaa !9
  %45 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %46 = call noundef i32 @_Z12RNIsNegativedd(double noundef %44, double noundef %45)
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %49

48:                                               ; preds = %39
  store i32 0, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %103

49:                                               ; preds = %39
  %50 = load double, ptr %14, align 8, !tbaa !9
  %51 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %52 = call noundef i32 @_Z8RNIsZerodd(double noundef %50, double noundef %51)
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %73

54:                                               ; preds = %49
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = icmp ne ptr %55, null
  br i1 %56, label %57, label %60

57:                                               ; preds = %54
  %58 = load double, ptr %13, align 8, !tbaa !9
  %59 = load ptr, ptr %10, align 8, !tbaa !5
  store double %58, ptr %59, align 8, !tbaa !9
  br label %60

60:                                               ; preds = %57, %54
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = icmp ne ptr %61, null
  br i1 %62, label %63, label %66

63:                                               ; preds = %60
  %64 = load double, ptr %14, align 8, !tbaa !9
  %65 = load ptr, ptr %11, align 8, !tbaa !5
  store double %64, ptr %65, align 8, !tbaa !9
  br label %66

66:                                               ; preds = %63, %60
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  %68 = icmp ne ptr %67, null
  br i1 %68, label %69, label %72

69:                                               ; preds = %66
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %70, ptr noundef nonnull align 8 dereferenceable(24) %12)
  br label %72

72:                                               ; preds = %69, %66
  store i32 1, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %103

73:                                               ; preds = %49
  store i32 4, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %103

74:                                               ; preds = %5
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = call noundef double @_ZNK5R3Ray1TERK7R3Point(ptr noundef nonnull align 8 dereferenceable(48) %75, ptr noundef nonnull align 8 dereferenceable(24) %12)
  store double %76, ptr %14, align 8, !tbaa !9
  %77 = load double, ptr %13, align 8, !tbaa !9
  %78 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %79 = call noundef i32 @_Z12RNIsNegativedd(double noundef %77, double noundef %78)
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %81, label %82

81:                                               ; preds = %74
  store i32 0, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %103

82:                                               ; preds = %74
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = icmp ne ptr %83, null
  br i1 %84, label %85, label %88

85:                                               ; preds = %82
  %86 = load double, ptr %13, align 8, !tbaa !9
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  store double %86, ptr %87, align 8, !tbaa !9
  br label %88

88:                                               ; preds = %85, %82
  %89 = load ptr, ptr %11, align 8, !tbaa !5
  %90 = icmp ne ptr %89, null
  br i1 %90, label %91, label %94

91:                                               ; preds = %88
  %92 = load double, ptr %14, align 8, !tbaa !9
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  store double %92, ptr %93, align 8, !tbaa !9
  br label %94

94:                                               ; preds = %91, %88
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = icmp ne ptr %95, null
  br i1 %96, label %97, label %100

97:                                               ; preds = %94
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %98, ptr noundef nonnull align 8 dereferenceable(24) %12)
  br label %100

100:                                              ; preds = %97, %94
  store i32 1, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %103

101:                                              ; preds = %5
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str)
  br label %102

102:                                              ; preds = %101
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str.1)
  store i32 0, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %103

103:                                              ; preds = %102, %100, %81, %73, %72, %48, %29, %21
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  %104 = load i32, ptr %6, align 4
  ret i32 %104
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z12R3IntersectsRK5R3RayRK6R3LineP7R3PointPd(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNK5R3Ray4LineEv(ptr noundef nonnull align 8 dereferenceable(48)) #3 align 2

declare noundef i32 @_Z10R3ContainsRK8R3VectorS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0

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

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


; 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.R3Vector = type { [3 x double] }
%class.R3Point = type { [3 x double] }

@RN_EPSILON = external local_unnamed_addr global double, align 8
@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [44 x i8], align 1

declare noundef double @_ZNK5R3Ray1TERK7R3Point(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z8RNIsZerodd(double noundef, double noundef) local_unnamed_addr #2

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

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK5R3Ray6VectorEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK5R3Ray5StartEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3 align 2

declare void @_Z7RNAbortPKcz(ptr noundef, ...) local_unnamed_addr #0

declare void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0

declare void @_ZngRK8R3Vector(ptr dead_on_unwind writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z12RNIsNegativedd(double noundef, double noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 5) i32 @_Z12R3IntersectsRK5R3RayS1_P7R3PointPdS4_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef %2, ptr noundef writeonly %3, ptr noundef writeonly %4) local_unnamed_addr #4 {
  %6 = alloca %class.R3Point, align 8
  %7 = alloca double, align 8
  %8 = alloca %class.R3Vector, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  call void @_ZN7R3PointC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  store double 0.000000e+00, ptr %7, align 8, !tbaa !5
  %9 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK5R3Ray4LineEv(ptr noundef nonnull align 8 dereferenceable(48) %1)
  %10 = call noundef i32 @_Z12R3IntersectsRK5R3RayRK6R3LineP7R3PointPd(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull %6, ptr noundef nonnull %7)
  switch i32 %10, label %49 [
    i32 0, label %50
    i32 3, label %11
    i32 1, label %36
  ]

11:                                               ; preds = %5
  %12 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK5R3Ray6VectorEv(ptr noundef nonnull align 8 dereferenceable(48) %0)
  %13 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK5R3Ray6VectorEv(ptr noundef nonnull align 8 dereferenceable(48) %1)
  %14 = call noundef i32 @_Z10R3ContainsRK8R3VectorS1_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %13)
  %.not33 = icmp eq i32 %14, 0
  br i1 %.not33, label %15, label %50

15:                                               ; preds = %11
  %16 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK5R3Ray6VectorEv(ptr noundef nonnull align 8 dereferenceable(48) %0)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  %17 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK5R3Ray6VectorEv(ptr noundef nonnull align 8 dereferenceable(48) %1)
  call void @_ZngRK8R3Vector(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %17)
  %18 = call noundef i32 @_Z10R3ContainsRK8R3VectorS1_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %8)
  %.not34 = icmp eq i32 %18, 0
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  br i1 %.not34, label %19, label %20

19:                                               ; preds = %15
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.6, i32 noundef 638, ptr noundef nonnull @.str.5)
  br label %20

20:                                               ; preds = %19, %15
  %21 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK5R3Ray5StartEv(ptr noundef nonnull align 8 dereferenceable(48) %0)
  %22 = call noundef double @_ZNK5R3Ray1TERK7R3Point(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(24) %21)
  %23 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %24 = call noundef i32 @_Z12RNIsNegativedd(double noundef %22, double noundef %23)
  %.not35 = icmp eq i32 %24, 0
  br i1 %.not35, label %25, label %50

25:                                               ; preds = %20
  %26 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %27 = call noundef i32 @_Z8RNIsZerodd(double noundef %22, double noundef %26)
  %.not36 = icmp eq i32 %27, 0
  br i1 %.not36, label %50, label %28

28:                                               ; preds = %25
  %.not37 = icmp eq ptr %3, null
  br i1 %.not37, label %31, label %29

29:                                               ; preds = %28
  %30 = load double, ptr %7, align 8, !tbaa !5
  store double %30, ptr %3, align 8, !tbaa !5
  br label %31

31:                                               ; preds = %29, %28
  %.not38 = icmp eq ptr %4, null
  br i1 %.not38, label %33, label %32

32:                                               ; preds = %31
  store double %22, ptr %4, align 8, !tbaa !5
  br label %33

33:                                               ; preds = %32, %31
  %.not39 = icmp eq ptr %2, null
  br i1 %.not39, label %50, label %34

34:                                               ; preds = %33
  %35 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %6)
  br label %50

36:                                               ; preds = %5
  %37 = call noundef double @_ZNK5R3Ray1TERK7R3Point(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(24) %6)
  %38 = load double, ptr %7, align 8, !tbaa !5
  %39 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %40 = call noundef i32 @_Z12RNIsNegativedd(double noundef %38, double noundef %39)
  %.not = icmp eq i32 %40, 0
  br i1 %.not, label %41, label %50

41:                                               ; preds = %36
  %.not30 = icmp eq ptr %3, null
  br i1 %.not30, label %44, label %42

42:                                               ; preds = %41
  %43 = load double, ptr %7, align 8, !tbaa !5
  store double %43, ptr %3, align 8, !tbaa !5
  br label %44

44:                                               ; preds = %42, %41
  %.not31 = icmp eq ptr %4, null
  br i1 %.not31, label %46, label %45

45:                                               ; preds = %44
  store double %37, ptr %4, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %45, %44
  %.not32 = icmp eq ptr %2, null
  br i1 %.not32, label %50, label %47

47:                                               ; preds = %46
  %48 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN7R3PointaSERKS_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %6)
  br label %50

49:                                               ; preds = %5
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str)
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str.1)
  br label %50

50:                                               ; preds = %46, %47, %36, %25, %33, %34, %20, %11, %5, %49
  %.0 = phi i32 [ 0, %49 ], [ %10, %5 ], [ 3, %11 ], [ 0, %20 ], [ 1, %34 ], [ 1, %33 ], [ 4, %25 ], [ 0, %36 ], [ 1, %47 ], [ 1, %46 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  ret i32 %.0
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z12R3IntersectsRK5R3RayRK6R3LineP7R3PointPd(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNK5R3Ray4LineEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3 align 2

declare noundef i32 @_Z10R3ContainsRK8R3VectorS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

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

!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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


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