; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R2Shapes/R2Relate.ll (Z8R2SplitsRK6R2LineRK6R2SpanPS2_S5_)

; 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.R2Point = type { [2 x double] }
%class.R2Span = type { %class.R2Ray, %class.R2Point, double }
%class.R2Ray = type { %class.R2Line, %class.R2Point }
%class.R2Line = type { %class.R2Vector, %class.R2Vector, double }
%class.R2Vector = type { [2 x double] }

@RN_EPSILON = external global double, align 8

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

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

declare noundef double @_Z16R2SignedDistanceRK6R2LineRK7R2Point(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(16)) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R2Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80)) #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z8R2SplitsRK6R2LineRK6R2SpanPS2_S5_(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef %2, ptr noundef %3) #4 {
  %5 = alloca i32, align 4
  %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 double, align 8
  %12 = alloca %class.R2Point, align 8
  %13 = alloca %class.R2Span, align 8
  %14 = alloca %class.R2Span, align 8
  %15 = alloca i32, align 4
  %16 = alloca %class.R2Point, align 8
  %17 = alloca %class.R2Span, align 8
  %18 = alloca %class.R2Span, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R2Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %20)
  %22 = call noundef double @_Z16R2SignedDistanceRK6R2LineRK7R2Point(ptr noundef nonnull align 8 dereferenceable(40) %19, ptr noundef nonnull align 8 dereferenceable(16) %21)
  store double %22, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R2Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %24)
  %26 = call noundef double @_Z16R2SignedDistanceRK6R2LineRK7R2Point(ptr noundef nonnull align 8 dereferenceable(40) %23, ptr noundef nonnull align 8 dereferenceable(16) %25)
  store double %26, ptr %11, align 8, !tbaa !9
  %27 = load double, ptr %10, align 8, !tbaa !9
  %28 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %29 = call noundef i32 @_Z12RNIsNegativedd(double noundef %27, double noundef %28)
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %71

31:                                               ; preds = %4
  %32 = load double, ptr %11, align 8, !tbaa !9
  %33 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %34 = call noundef i32 @_Z12RNIsPositivedd(double noundef %32, double noundef %33)
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %63

36:                                               ; preds = %31
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = icmp ne ptr %37, null
  br i1 %38, label %42, label %39

39:                                               ; preds = %36
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = icmp ne ptr %40, null
  br i1 %41, label %42, label %62

42:                                               ; preds = %39, %36
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #5
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = load double, ptr %10, align 8, !tbaa !9
  %45 = fneg double %44
  call void @_ZNK6R2Span5PointEd(ptr dead_on_unwind writable sret(%class.R2Point) align 8 %12, ptr noundef nonnull align 8 dereferenceable(80) %43, double noundef %45)
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = icmp ne ptr %46, null
  br i1 %47, label %48, label %53

48:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 80, ptr %13) #5
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R2Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %49)
  call void @_ZN6R2SpanC1ERK7R2PointS2_(ptr noundef nonnull align 8 dereferenceable(80) %13, ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull align 8 dereferenceable(16) %12)
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZN6R2SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(80) %51, ptr noundef nonnull align 8 dereferenceable(80) %13)
  call void @llvm.lifetime.end.p0(i64 80, ptr %13) #5
  br label %53

53:                                               ; preds = %48, %42
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = icmp ne ptr %54, null
  br i1 %55, label %56, label %61

56:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 80, ptr %14) #5
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R2Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %57)
  call void @_ZN6R2SpanC1ERK7R2PointS2_(ptr noundef nonnull align 8 dereferenceable(80) %14, ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %58)
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZN6R2SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(80) %59, ptr noundef nonnull align 8 dereferenceable(80) %14)
  call void @llvm.lifetime.end.p0(i64 80, ptr %14) #5
  br label %61

61:                                               ; preds = %56, %53
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  br label %62

62:                                               ; preds = %61, %39
  store i32 3, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %156

63:                                               ; preds = %31
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = icmp ne ptr %64, null
  br i1 %65, label %66, label %70

66:                                               ; preds = %63
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZN6R2SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(80) %68, ptr noundef nonnull align 8 dereferenceable(80) %67)
  br label %70

70:                                               ; preds = %66, %63
  store i32 1, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %156

71:                                               ; preds = %4
  %72 = load double, ptr %10, align 8, !tbaa !9
  %73 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %74 = call noundef i32 @_Z12RNIsPositivedd(double noundef %72, double noundef %73)
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %76, label %115

76:                                               ; preds = %71
  %77 = load double, ptr %11, 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 %107

81:                                               ; preds = %76
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = icmp ne ptr %82, null
  br i1 %83, label %87, label %84

84:                                               ; preds = %81
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = icmp ne ptr %85, null
  br i1 %86, label %87, label %106

87:                                               ; preds = %84, %81
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = load double, ptr %10, align 8, !tbaa !9
  call void @_ZNK6R2Span5PointEd(ptr dead_on_unwind writable sret(%class.R2Point) align 8 %16, ptr noundef nonnull align 8 dereferenceable(80) %88, double noundef %89)
  %90 = load ptr, ptr %8, align 8, !tbaa !5
  %91 = icmp ne ptr %90, null
  br i1 %91, label %92, label %97

92:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 80, ptr %17) #5
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R2Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %93)
  call void @_ZN6R2SpanC1ERK7R2PointS2_(ptr noundef nonnull align 8 dereferenceable(80) %17, ptr noundef nonnull align 8 dereferenceable(16) %94, ptr noundef nonnull align 8 dereferenceable(16) %16)
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZN6R2SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(80) %95, ptr noundef nonnull align 8 dereferenceable(80) %17)
  call void @llvm.lifetime.end.p0(i64 80, ptr %17) #5
  br label %97

97:                                               ; preds = %92, %87
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = icmp ne ptr %98, null
  br i1 %99, label %100, label %105

100:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 80, ptr %18) #5
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %102 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R2Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %101)
  call void @_ZN6R2SpanC1ERK7R2PointS2_(ptr noundef nonnull align 8 dereferenceable(80) %18, ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %102)
  %103 = load ptr, ptr %9, align 8, !tbaa !5
  %104 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZN6R2SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(80) %103, ptr noundef nonnull align 8 dereferenceable(80) %18)
  call void @llvm.lifetime.end.p0(i64 80, ptr %18) #5
  br label %105

105:                                              ; preds = %100, %97
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  br label %106

106:                                              ; preds = %105, %84
  store i32 3, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %156

107:                                              ; preds = %76
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = icmp ne ptr %108, null
  br i1 %109, label %110, label %114

110:                                              ; preds = %107
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZN6R2SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(80) %112, ptr noundef nonnull align 8 dereferenceable(80) %111)
  br label %114

114:                                              ; preds = %110, %107
  store i32 2, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %156

115:                                              ; preds = %71
  %116 = load double, ptr %11, align 8, !tbaa !9
  %117 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %118 = call noundef i32 @_Z12RNIsNegativedd(double noundef %116, double noundef %117)
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %120, label %128

120:                                              ; preds = %115
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  %122 = icmp ne ptr %121, null
  br i1 %122, label %123, label %127

123:                                              ; preds = %120
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZN6R2SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(80) %125, ptr noundef nonnull align 8 dereferenceable(80) %124)
  br label %127

127:                                              ; preds = %123, %120
  store i32 1, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %156

128:                                              ; preds = %115
  %129 = load double, ptr %11, align 8, !tbaa !9
  %130 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %131 = call noundef i32 @_Z12RNIsPositivedd(double noundef %129, double noundef %130)
  %132 = icmp ne i32 %131, 0
  br i1 %132, label %133, label %141

133:                                              ; preds = %128
  %134 = load ptr, ptr %9, align 8, !tbaa !5
  %135 = icmp ne ptr %134, null
  br i1 %135, label %136, label %140

136:                                              ; preds = %133
  %137 = load ptr, ptr %7, align 8, !tbaa !5
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZN6R2SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(80) %138, ptr noundef nonnull align 8 dereferenceable(80) %137)
  br label %140

140:                                              ; preds = %136, %133
  store i32 2, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %156

141:                                              ; preds = %128
  %142 = load ptr, ptr %8, align 8, !tbaa !5
  %143 = icmp ne ptr %142, null
  br i1 %143, label %144, label %148

144:                                              ; preds = %141
  %145 = load ptr, ptr %7, align 8, !tbaa !5
  %146 = load ptr, ptr %8, align 8, !tbaa !5
  %147 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZN6R2SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(80) %146, ptr noundef nonnull align 8 dereferenceable(80) %145)
  br label %148

148:                                              ; preds = %144, %141
  %149 = load ptr, ptr %9, align 8, !tbaa !5
  %150 = icmp ne ptr %149, null
  br i1 %150, label %151, label %155

151:                                              ; preds = %148
  %152 = load ptr, ptr %7, align 8, !tbaa !5
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  %154 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZN6R2SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(80) %153, ptr noundef nonnull align 8 dereferenceable(80) %152)
  br label %155

155:                                              ; preds = %151, %148
  store i32 0, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %156

156:                                              ; preds = %155, %140, %127, %114, %106, %70, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %157 = load i32, ptr %5, align 4
  ret i32 %157
}

declare void @_ZNK6R2Span5PointEd(ptr dead_on_unwind writable sret(%class.R2Point) align 8, ptr noundef nonnull align 8 dereferenceable(80), double noundef) #1

declare void @_ZN6R2SpanC1ERK7R2PointS2_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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.R2Point = type { [2 x double] }
%class.R2Span = type { %class.R2Ray, %class.R2Point, double }
%class.R2Ray = type { %class.R2Line, %class.R2Point }
%class.R2Line = type { %class.R2Vector, %class.R2Vector, double }
%class.R2Vector = type { [2 x double] }

@RN_EPSILON = external local_unnamed_addr global double, align 8

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

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

declare noundef double @_Z16R2SignedDistanceRK6R2LineRK7R2Point(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R2Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 4) i32 @_Z8R2SplitsRK6R2LineRK6R2SpanPS2_S5_(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #4 {
  %5 = alloca %class.R2Point, align 8
  %6 = alloca %class.R2Span, align 8
  %7 = alloca %class.R2Span, align 8
  %8 = alloca %class.R2Point, align 8
  %9 = alloca %class.R2Span, align 8
  %10 = alloca %class.R2Span, align 8
  %11 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R2Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %12 = tail call noundef double @_Z16R2SignedDistanceRK6R2LineRK7R2Point(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(16) %11)
  %13 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R2Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %14 = tail call noundef double @_Z16R2SignedDistanceRK6R2LineRK7R2Point(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(16) %13)
  %15 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %16 = tail call noundef i32 @_Z12RNIsNegativedd(double noundef %12, double noundef %15)
  %.not = icmp eq i32 %16, 0
  %17 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  br i1 %.not, label %36, label %18

18:                                               ; preds = %4
  %19 = tail call noundef i32 @_Z12RNIsPositivedd(double noundef %14, double noundef %17)
  %.not66 = icmp eq i32 %19, 0
  br i1 %.not66, label %33, label %20

20:                                               ; preds = %18
  %21 = icmp ne ptr %2, null
  %22 = icmp ne ptr %3, null
  %or.cond = or i1 %21, %22
  br i1 %or.cond, label %23, label %72

23:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %24 = fneg double %12
  call void @_ZNK6R2Span5PointEd(ptr dead_on_unwind nonnull writable sret(%class.R2Point) align 8 %5, ptr noundef nonnull align 8 dereferenceable(80) %1, double noundef %24)
  br i1 %21, label %25, label %28

25:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %6) #5
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R2Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  call void @_ZN6R2SpanC1ERK7R2PointS2_(ptr noundef nonnull align 8 dereferenceable(80) %6, ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(16) %5)
  %27 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZN6R2SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 8 dereferenceable(80) %6)
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #5
  br label %28

28:                                               ; preds = %25, %23
  br i1 %22, label %29, label %32

29:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %7) #5
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R2Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  call void @_ZN6R2SpanC1ERK7R2PointS2_(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %30)
  %31 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZN6R2SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(80) %7)
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %7) #5
  br label %32

32:                                               ; preds = %29, %28
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %72

33:                                               ; preds = %18
  %.not67 = icmp eq ptr %2, null
  br i1 %.not67, label %72, label %34

34:                                               ; preds = %33
  %35 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZN6R2SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 8 dereferenceable(80) %1)
  br label %72

36:                                               ; preds = %4
  %37 = tail call noundef i32 @_Z12RNIsPositivedd(double noundef %12, double noundef %17)
  %.not57 = icmp eq i32 %37, 0
  %38 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %39 = tail call noundef i32 @_Z12RNIsNegativedd(double noundef %14, double noundef %38)
  %.not58 = icmp eq i32 %39, 0
  br i1 %.not57, label %56, label %40

40:                                               ; preds = %36
  br i1 %.not58, label %53, label %41

41:                                               ; preds = %40
  %42 = icmp ne ptr %2, null
  %43 = icmp ne ptr %3, null
  %or.cond3 = or i1 %42, %43
  br i1 %or.cond3, label %44, label %72

44:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  call void @_ZNK6R2Span5PointEd(ptr dead_on_unwind nonnull writable sret(%class.R2Point) align 8 %8, ptr noundef nonnull align 8 dereferenceable(80) %1, double noundef %12)
  br i1 %42, label %45, label %48

45:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %9) #5
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R2Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  call void @_ZN6R2SpanC1ERK7R2PointS2_(ptr noundef nonnull align 8 dereferenceable(80) %9, ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 8 dereferenceable(16) %8)
  %47 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZN6R2SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 8 dereferenceable(80) %9)
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %9) #5
  br label %48

48:                                               ; preds = %45, %44
  br i1 %43, label %49, label %52

49:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %10) #5
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6R2Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  call void @_ZN6R2SpanC1ERK7R2PointS2_(ptr noundef nonnull align 8 dereferenceable(80) %10, ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %50)
  %51 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZN6R2SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(80) %10)
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %10) #5
  br label %52

52:                                               ; preds = %49, %48
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  br label %72

53:                                               ; preds = %40
  %.not65 = icmp eq ptr %3, null
  br i1 %.not65, label %72, label %54

54:                                               ; preds = %53
  %55 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZN6R2SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(80) %1)
  br label %72

56:                                               ; preds = %36
  br i1 %.not58, label %60, label %57

57:                                               ; preds = %56
  %.not63 = icmp eq ptr %2, null
  br i1 %.not63, label %72, label %58

58:                                               ; preds = %57
  %59 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZN6R2SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 8 dereferenceable(80) %1)
  br label %72

60:                                               ; preds = %56
  %61 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %62 = tail call noundef i32 @_Z12RNIsPositivedd(double noundef %14, double noundef %61)
  %.not59 = icmp eq i32 %62, 0
  br i1 %.not59, label %66, label %63

63:                                               ; preds = %60
  %.not62 = icmp eq ptr %3, null
  br i1 %.not62, label %72, label %64

64:                                               ; preds = %63
  %65 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZN6R2SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(80) %1)
  br label %72

66:                                               ; preds = %60
  %.not60 = icmp eq ptr %2, null
  br i1 %.not60, label %69, label %67

67:                                               ; preds = %66
  %68 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZN6R2SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 8 dereferenceable(80) %1)
  br label %69

69:                                               ; preds = %67, %66
  %.not61 = icmp eq ptr %3, null
  br i1 %.not61, label %72, label %70

70:                                               ; preds = %69
  %71 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZN6R2SpanaSERKS_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(80) %1)
  br label %72

72:                                               ; preds = %69, %70, %63, %64, %57, %58, %53, %54, %52, %41, %33, %34, %32, %20
  %.0 = phi i32 [ 3, %20 ], [ 3, %32 ], [ 1, %34 ], [ 1, %33 ], [ 3, %41 ], [ 3, %52 ], [ 2, %54 ], [ 2, %53 ], [ 1, %58 ], [ 1, %57 ], [ 2, %64 ], [ 2, %63 ], [ 0, %70 ], [ 0, %69 ]
  ret i32 %.0
}

declare void @_ZNK6R2Span5PointEd(ptr dead_on_unwind writable sret(%class.R2Point) align 8, ptr noundef nonnull align 8 dereferenceable(80), double noundef) local_unnamed_addr #1

declare void @_ZN6R2SpanC1ERK7R2PointS2_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass