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

; 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

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

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

declare noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z10R3DistanceRK7R3PointRK6R3Line(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(48)) #2

declare void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK6R3Span6LengthEv(ptr noundef nonnull align 8 dereferenceable(80)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span6VectorEv(ptr noundef nonnull align 8 dereferenceable(80)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80)) #4 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK7R3Point6VectorEv(ptr dead_on_unwind noalias writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z10R3DistanceRK6R3SpanS1_(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef nonnull align 8 dereferenceable(80) %1) #2 {
  %3 = alloca double, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %class.R3Vector, align 8
  %7 = alloca %class.R3Vector, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca %class.R3Vector, align 8
  %14 = alloca %class.R3Vector, align 8
  %15 = alloca i32, align 4
  %16 = alloca %class.R3Vector, align 8
  %17 = alloca %class.R3Vector, align 8
  %18 = alloca %class.R3Vector, align 8
  %19 = alloca %class.R3Vector, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca %class.R3Point, align 8
  %27 = alloca %class.R3Point, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  %32 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #6
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span6VectorEv(ptr noundef nonnull align 8 dereferenceable(80) %33)
  call void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %34)
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #6
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span6VectorEv(ptr noundef nonnull align 8 dereferenceable(80) %35)
  call void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %36)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store double 1.000000e+00, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store double 1.000000e+00, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %37 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %7)
  store double %37, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %38 = load double, ptr %10, align 8, !tbaa !9
  %39 = load double, ptr %10, align 8, !tbaa !9
  %40 = call double @llvm.fmuladd.f64(double %38, double %39, double -1.000000e+00)
  store double %40, ptr %11, align 8, !tbaa !9
  %41 = load double, ptr %11, align 8, !tbaa !9
  %42 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %43 = call noundef i32 @_Z8RNIsZerodd(double noundef %41, double noundef %42)
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %116

45:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %46 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %7)
  store double %46, ptr %12, align 8, !tbaa !9
  %47 = load double, ptr %12, align 8, !tbaa !9
  %48 = fcmp ogt double %47, 0.000000e+00
  br i1 %48, label %49, label %82

49:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #6
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %50)
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %52)
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %51, ptr noundef nonnull align 8 dereferenceable(24) %53)
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %54)
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %56)
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %55, ptr noundef nonnull align 8 dereferenceable(24) %57)
  %58 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %13)
  %59 = fcmp ogt double %58, 0.000000e+00
  br i1 %59, label %60, label %66

60:                                               ; preds = %49
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %61)
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %63)
  %65 = call noundef double @_Z10R3DistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24) %62, ptr noundef nonnull align 8 dereferenceable(24) %64)
  store double %65, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %81

66:                                               ; preds = %49
  %67 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %14)
  %68 = fcmp olt double %67, 0.000000e+00
  br i1 %68, label %69, label %75

69:                                               ; preds = %66
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %70)
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %72)
  %74 = call noundef double @_Z10R3DistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24) %71, ptr noundef nonnull align 8 dereferenceable(24) %73)
  store double %74, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %81

75:                                               ; preds = %66
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %76)
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK6R3Span4LineEv(ptr noundef nonnull align 8 dereferenceable(80) %78)
  %80 = call noundef double @_Z10R3DistanceRK7R3PointRK6R3Line(ptr noundef nonnull align 8 dereferenceable(24) %77, ptr noundef nonnull align 8 dereferenceable(48) %79)
  store double %80, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %81

81:                                               ; preds = %75, %69, %60
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  br label %115

82:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #6
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %83)
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %85)
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %16, ptr noundef nonnull align 8 dereferenceable(24) %84, ptr noundef nonnull align 8 dereferenceable(24) %86)
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #6
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %87)
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %89)
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %17, ptr noundef nonnull align 8 dereferenceable(24) %88, ptr noundef nonnull align 8 dereferenceable(24) %90)
  %91 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %17)
  %92 = fcmp olt double %91, 0.000000e+00
  br i1 %92, label %93, label %99

93:                                               ; preds = %82
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %94)
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %96)
  %98 = call noundef double @_Z10R3DistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24) %95, ptr noundef nonnull align 8 dereferenceable(24) %97)
  store double %98, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %114

99:                                               ; preds = %82
  %100 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %16)
  %101 = fcmp ogt double %100, 0.000000e+00
  br i1 %101, label %102, label %108

102:                                              ; preds = %99
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %103)
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %105)
  %107 = call noundef double @_Z10R3DistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24) %104, ptr noundef nonnull align 8 dereferenceable(24) %106)
  store double %107, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %114

108:                                              ; preds = %99
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %109)
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK6R3Span4LineEv(ptr noundef nonnull align 8 dereferenceable(80) %111)
  %113 = call noundef double @_Z10R3DistanceRK7R3PointRK6R3Line(ptr noundef nonnull align 8 dereferenceable(24) %110, ptr noundef nonnull align 8 dereferenceable(48) %112)
  store double %113, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %114

114:                                              ; preds = %108, %102, %93
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  br label %115

115:                                              ; preds = %114, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %215

116:                                              ; preds = %2
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #6
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %117)
  call void @_ZNK7R3Point6VectorEv(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %18, ptr noundef nonnull align 8 dereferenceable(24) %118)
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #6
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %119)
  call void @_ZNK7R3Point6VectorEv(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %19, ptr noundef nonnull align 8 dereferenceable(24) %120)
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %121 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %18)
  store double %121, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %122 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %19)
  store double %122, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %123 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %18)
  store double %123, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %124 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %19)
  store double %124, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %125 = load double, ptr %10, align 8, !tbaa !9
  %126 = load double, ptr %21, align 8, !tbaa !9
  %127 = load double, ptr %20, align 8, !tbaa !9
  %128 = fmul double 1.000000e+00, %127
  %129 = call double @llvm.fmuladd.f64(double %125, double %126, double %128)
  %130 = load double, ptr %10, align 8, !tbaa !9
  %131 = load double, ptr %22, align 8, !tbaa !9
  %132 = fneg double %130
  %133 = call double @llvm.fmuladd.f64(double %132, double %131, double %129)
  %134 = load double, ptr %23, align 8, !tbaa !9
  %135 = call double @llvm.fmuladd.f64(double -1.000000e+00, double %134, double %133)
  %136 = load double, ptr %11, align 8, !tbaa !9
  %137 = fdiv double %135, %136
  store double %137, ptr %24, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %138 = load double, ptr %10, align 8, !tbaa !9
  %139 = load double, ptr %20, align 8, !tbaa !9
  %140 = load double, ptr %21, align 8, !tbaa !9
  %141 = fmul double 1.000000e+00, %140
  %142 = call double @llvm.fmuladd.f64(double %138, double %139, double %141)
  %143 = load double, ptr %10, align 8, !tbaa !9
  %144 = load double, ptr %23, align 8, !tbaa !9
  %145 = fneg double %143
  %146 = call double @llvm.fmuladd.f64(double %145, double %144, double %142)
  %147 = load double, ptr %22, align 8, !tbaa !9
  %148 = call double @llvm.fmuladd.f64(double -1.000000e+00, double %147, double %146)
  %149 = load double, ptr %11, align 8, !tbaa !9
  %150 = fdiv double %148, %149
  store double %150, ptr %25, align 8, !tbaa !9
  %151 = load double, ptr %24, align 8, !tbaa !9
  %152 = fcmp oge double %151, 0.000000e+00
  br i1 %152, label %153, label %172

153:                                              ; preds = %116
  %154 = load double, ptr %24, align 8, !tbaa !9
  %155 = load ptr, ptr %4, align 8, !tbaa !5
  %156 = call noundef double @_ZNK6R3Span6LengthEv(ptr noundef nonnull align 8 dereferenceable(80) %155)
  %157 = fcmp ole double %154, %156
  br i1 %157, label %158, label %172

158:                                              ; preds = %153
  %159 = load double, ptr %25, align 8, !tbaa !9
  %160 = fcmp oge double %159, 0.000000e+00
  br i1 %160, label %161, label %172

161:                                              ; preds = %158
  %162 = load double, ptr %25, align 8, !tbaa !9
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = call noundef double @_ZNK6R3Span6LengthEv(ptr noundef nonnull align 8 dereferenceable(80) %163)
  %165 = fcmp ole double %162, %164
  br i1 %165, label %166, label %172

166:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #6
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  %168 = load double, ptr %24, align 8, !tbaa !9
  call void @_ZNK6R3Span5PointEd(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %26, ptr noundef nonnull align 8 dereferenceable(80) %167, double noundef %168)
  call void @llvm.lifetime.start.p0(i64 24, ptr %27) #6
  %169 = load ptr, ptr %5, align 8, !tbaa !5
  %170 = load double, ptr %25, align 8, !tbaa !9
  call void @_ZNK6R3Span5PointEd(ptr dead_on_unwind writable sret(%class.R3Point) align 8 %27, ptr noundef nonnull align 8 dereferenceable(80) %169, double noundef %170)
  %171 = call noundef double @_Z10R3DistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(24) %27)
  store double %171, ptr %3, align 8
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #6
  store i32 1, ptr %15, align 4
  br label %214

172:                                              ; preds = %161, %158, %153, %116
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  %174 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %173)
  %175 = load ptr, ptr %5, align 8, !tbaa !5
  %176 = call noundef double @_Z10R3DistanceRK7R3PointRK6R3Span(ptr noundef nonnull align 8 dereferenceable(24) %174, ptr noundef nonnull align 8 dereferenceable(80) %175)
  store double %176, ptr %28, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %177 = load ptr, ptr %4, align 8, !tbaa !5
  %178 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %177)
  %179 = load ptr, ptr %5, align 8, !tbaa !5
  %180 = call noundef double @_Z10R3DistanceRK7R3PointRK6R3Span(ptr noundef nonnull align 8 dereferenceable(24) %178, ptr noundef nonnull align 8 dereferenceable(80) %179)
  store double %180, ptr %29, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %181 = load ptr, ptr %5, align 8, !tbaa !5
  %182 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %181)
  %183 = load ptr, ptr %4, align 8, !tbaa !5
  %184 = call noundef double @_Z10R3DistanceRK7R3PointRK6R3Span(ptr noundef nonnull align 8 dereferenceable(24) %182, ptr noundef nonnull align 8 dereferenceable(80) %183)
  store double %184, ptr %30, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %185 = load ptr, ptr %5, align 8, !tbaa !5
  %186 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %185)
  %187 = load ptr, ptr %4, align 8, !tbaa !5
  %188 = call noundef double @_Z10R3DistanceRK7R3PointRK6R3Span(ptr noundef nonnull align 8 dereferenceable(24) %186, ptr noundef nonnull align 8 dereferenceable(80) %187)
  store double %188, ptr %31, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  store double 0x47EFFFFFE0000000, ptr %32, align 8, !tbaa !9
  %189 = load double, ptr %28, align 8, !tbaa !9
  %190 = load double, ptr %32, align 8, !tbaa !9
  %191 = fcmp olt double %189, %190
  br i1 %191, label %192, label %194

192:                                              ; preds = %172
  %193 = load double, ptr %28, align 8, !tbaa !9
  store double %193, ptr %32, align 8, !tbaa !9
  br label %194

194:                                              ; preds = %192, %172
  %195 = load double, ptr %29, align 8, !tbaa !9
  %196 = load double, ptr %32, align 8, !tbaa !9
  %197 = fcmp olt double %195, %196
  br i1 %197, label %198, label %200

198:                                              ; preds = %194
  %199 = load double, ptr %29, align 8, !tbaa !9
  store double %199, ptr %32, align 8, !tbaa !9
  br label %200

200:                                              ; preds = %198, %194
  %201 = load double, ptr %30, align 8, !tbaa !9
  %202 = load double, ptr %32, align 8, !tbaa !9
  %203 = fcmp olt double %201, %202
  br i1 %203, label %204, label %206

204:                                              ; preds = %200
  %205 = load double, ptr %30, align 8, !tbaa !9
  store double %205, ptr %32, align 8, !tbaa !9
  br label %206

206:                                              ; preds = %204, %200
  %207 = load double, ptr %31, align 8, !tbaa !9
  %208 = load double, ptr %32, align 8, !tbaa !9
  %209 = fcmp olt double %207, %208
  br i1 %209, label %210, label %212

210:                                              ; preds = %206
  %211 = load double, ptr %31, align 8, !tbaa !9
  store double %211, ptr %32, align 8, !tbaa !9
  br label %212

212:                                              ; preds = %210, %206
  %213 = load double, ptr %32, align 8, !tbaa !9
  store double %213, ptr %3, align 8
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %214

214:                                              ; preds = %212, %166
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  br label %215

215:                                              ; preds = %214, %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  %216 = load double, ptr %3, align 8
  ret double %216
}

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 = { 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 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 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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}


; 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

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

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

declare noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_Z10R3DistanceRK7R3PointRK6R3Line(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2

declare void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK6R3Span6LengthEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span6VectorEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #4 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK7R3Point6VectorEv(ptr dead_on_unwind noalias writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z10R3DistanceRK6R3SpanS1_(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef nonnull align 8 dereferenceable(80) %1) local_unnamed_addr #2 {
  %3 = alloca %class.R3Vector, align 8
  %4 = alloca %class.R3Vector, align 8
  %5 = alloca %class.R3Vector, align 8
  %6 = alloca %class.R3Vector, align 8
  %7 = alloca %class.R3Vector, align 8
  %8 = alloca %class.R3Vector, align 8
  %9 = alloca %class.R3Vector, align 8
  %10 = alloca %class.R3Vector, align 8
  %11 = alloca %class.R3Point, align 8
  %12 = alloca %class.R3Point, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  %13 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span6VectorEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  call void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %13)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  %14 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span6VectorEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  call void @_ZN8R3VectorC1ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %14)
  %15 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4)
  %16 = call double @llvm.fmuladd.f64(double %15, double %15, double -1.000000e+00)
  %17 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %18 = call noundef i32 @_Z8RNIsZerodd(double noundef %16, double noundef %17)
  %.not = icmp eq i32 %18, 0
  br i1 %.not, label %67, label %19

19:                                               ; preds = %2
  %20 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4)
  %21 = fcmp ogt double %20, 0.000000e+00
  br i1 %21, label %22, label %44

22:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  %23 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %24 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %5, ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %24)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  %25 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %26 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 8 dereferenceable(24) %26)
  %27 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %5)
  %28 = fcmp ogt double %27, 0.000000e+00
  br i1 %28, label %29, label %33

29:                                               ; preds = %22
  %30 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %31 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %32 = call noundef double @_Z10R3DistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24) %30, ptr noundef nonnull align 8 dereferenceable(24) %31)
  br label %43

33:                                               ; preds = %22
  %34 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %6)
  %35 = fcmp olt double %34, 0.000000e+00
  %36 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  br i1 %35, label %37, label %40

37:                                               ; preds = %33
  %38 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %39 = call noundef double @_Z10R3DistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24) %36, ptr noundef nonnull align 8 dereferenceable(24) %38)
  br label %43

40:                                               ; preds = %33
  %41 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK6R3Span4LineEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %42 = call noundef double @_Z10R3DistanceRK7R3PointRK6R3Line(ptr noundef nonnull align 8 dereferenceable(24) %36, ptr noundef nonnull align 8 dereferenceable(48) %41)
  br label %43

43:                                               ; preds = %40, %37, %29
  %.075 = phi double [ %32, %29 ], [ %39, %37 ], [ %42, %40 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  br label %107

44:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  %45 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %46 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %45, ptr noundef nonnull align 8 dereferenceable(24) %46)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #6
  %47 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %48 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  call void @_ZmiRK7R3PointS1_(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %47, ptr noundef nonnull align 8 dereferenceable(24) %48)
  %49 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %8)
  %50 = fcmp olt double %49, 0.000000e+00
  br i1 %50, label %51, label %55

51:                                               ; preds = %44
  %52 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %53 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %54 = call noundef double @_Z10R3DistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24) %52, ptr noundef nonnull align 8 dereferenceable(24) %53)
  br label %66

55:                                               ; preds = %44
  %56 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %7)
  %57 = fcmp ogt double %56, 0.000000e+00
  br i1 %57, label %58, label %62

58:                                               ; preds = %55
  %59 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %60 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %61 = call noundef double @_Z10R3DistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24) %59, ptr noundef nonnull align 8 dereferenceable(24) %60)
  br label %66

62:                                               ; preds = %55
  %63 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %64 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK6R3Span4LineEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %65 = call noundef double @_Z10R3DistanceRK7R3PointRK6R3Line(ptr noundef nonnull align 8 dereferenceable(24) %63, ptr noundef nonnull align 8 dereferenceable(48) %64)
  br label %66

66:                                               ; preds = %62, %58, %51
  %.176 = phi double [ %54, %51 ], [ %61, %58 ], [ %65, %62 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %107

67:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #6
  %68 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  call void @_ZNK7R3Point6VectorEv(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %68)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  %69 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  call void @_ZNK7R3Point6VectorEv(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %69)
  %70 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %9)
  %71 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %10)
  %72 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %9)
  %73 = call noundef double @_ZNK8R3Vector3DotERKS_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %10)
  %74 = call double @llvm.fmuladd.f64(double %15, double %71, double %70)
  %75 = fneg double %15
  %76 = call double @llvm.fmuladd.f64(double %75, double %72, double %74)
  %77 = call double @llvm.fmuladd.f64(double %73, double -1.000000e+00, double %76)
  %78 = fdiv double %77, %16
  %79 = call double @llvm.fmuladd.f64(double %15, double %70, double %71)
  %80 = call double @llvm.fmuladd.f64(double %75, double %73, double %79)
  %81 = call double @llvm.fmuladd.f64(double %72, double -1.000000e+00, double %80)
  %82 = fdiv double %81, %16
  %83 = fcmp ult double %78, 0.000000e+00
  br i1 %83, label %93, label %84

84:                                               ; preds = %67
  %85 = call noundef double @_ZNK6R3Span6LengthEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %86 = fcmp ole double %78, %85
  %87 = fcmp oge double %82, 0.000000e+00
  %or.cond = and i1 %87, %86
  br i1 %or.cond, label %88, label %93

88:                                               ; preds = %84
  %89 = call noundef double @_ZNK6R3Span6LengthEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %90 = fcmp ugt double %82, %89
  br i1 %90, label %93, label %91

91:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #6
  call void @_ZNK6R3Span5PointEd(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %11, ptr noundef nonnull align 8 dereferenceable(80) %0, double noundef %78)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  call void @_ZNK6R3Span5PointEd(ptr dead_on_unwind nonnull writable sret(%class.R3Point) align 8 %12, ptr noundef nonnull align 8 dereferenceable(80) %1, double noundef %82)
  %92 = call noundef double @_Z10R3DistanceRK7R3PointS1_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %12)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  br label %106

93:                                               ; preds = %88, %84, %67
  %94 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %95 = call noundef double @_Z10R3DistanceRK7R3PointRK6R3Span(ptr noundef nonnull align 8 dereferenceable(24) %94, ptr noundef nonnull align 8 dereferenceable(80) %1)
  %96 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %97 = call noundef double @_Z10R3DistanceRK7R3PointRK6R3Span(ptr noundef nonnull align 8 dereferenceable(24) %96, ptr noundef nonnull align 8 dereferenceable(80) %1)
  %98 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span5StartEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %99 = call noundef double @_Z10R3DistanceRK7R3PointRK6R3Span(ptr noundef nonnull align 8 dereferenceable(24) %98, ptr noundef nonnull align 8 dereferenceable(80) %0)
  %100 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6R3Span3EndEv(ptr noundef nonnull align 8 dereferenceable(80) %1)
  %101 = call noundef double @_Z10R3DistanceRK7R3PointRK6R3Span(ptr noundef nonnull align 8 dereferenceable(24) %100, ptr noundef nonnull align 8 dereferenceable(80) %0)
  %102 = fcmp olt double %95, 0x47EFFFFFE0000000
  %.0 = select i1 %102, double %95, double 0x47EFFFFFE0000000
  %103 = fcmp olt double %97, %.0
  %.1 = select i1 %103, double %97, double %.0
  %104 = fcmp olt double %99, %.1
  %.2 = select i1 %104, double %99, double %.1
  %105 = fcmp olt double %101, %.2
  %.3 = select i1 %105, double %101, double %.2
  br label %106

106:                                              ; preds = %93, %91
  %.378 = phi double [ %92, %91 ], [ %.3, %93 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  br label %107

107:                                              ; preds = %43, %66, %106
  %.4 = phi double [ %.378, %106 ], [ %.075, %43 ], [ %.176, %66 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  ret double %.4
}

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 = { 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 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 = { 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 #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


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