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

; 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"

@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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z10R3DistanceRK7R3PointRK5R3Box(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(56) %1) #1 {
  %3 = alloca double, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %10 = load ptr, ptr %5, align 8, !tbaa !5
  %11 = call noundef i32 @_ZNK5R3Box7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(56) %10)
  %12 = icmp ne i32 %11, 0
  br i1 %12, label %13, label %14

13:                                               ; preds = %2
  store double 0x47EFFFFFE0000000, ptr %3, align 8
  br label %140

14:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = call noundef double @_ZNK7R3Point1XEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = call noundef double @_ZNK5R3Box4XMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %17)
  %19 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %20 = call noundef i32 @_Z11RNIsGreaterddd(double noundef %16, double noundef %18, double noundef %19)
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %22, label %28

22:                                               ; preds = %14
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = call noundef double @_ZNK7R3Point1XEv(ptr noundef nonnull align 8 dereferenceable(24) %23)
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = call noundef double @_ZNK5R3Box4XMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %25)
  %27 = fsub double %24, %26
  store double %27, ptr %6, align 8, !tbaa !9
  br label %44

28:                                               ; preds = %14
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = call noundef double @_ZNK7R3Point1XEv(ptr noundef nonnull align 8 dereferenceable(24) %29)
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = call noundef double @_ZNK5R3Box4XMinEv(ptr noundef nonnull align 8 dereferenceable(56) %31)
  %33 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %34 = call noundef i32 @_Z8RNIsLessddd(double noundef %30, double noundef %32, double noundef %33)
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %42

36:                                               ; preds = %28
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = call noundef double @_ZNK5R3Box4XMinEv(ptr noundef nonnull align 8 dereferenceable(56) %37)
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = call noundef double @_ZNK7R3Point1XEv(ptr noundef nonnull align 8 dereferenceable(24) %39)
  %41 = fsub double %38, %40
  store double %41, ptr %6, align 8, !tbaa !9
  br label %43

42:                                               ; preds = %28
  store double 0.000000e+00, ptr %6, align 8, !tbaa !9
  br label %43

43:                                               ; preds = %42, %36
  br label %44

44:                                               ; preds = %43, %22
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = call noundef double @_ZNK7R3Point1YEv(ptr noundef nonnull align 8 dereferenceable(24) %45)
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = call noundef double @_ZNK5R3Box4YMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %47)
  %49 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %50 = call noundef i32 @_Z11RNIsGreaterddd(double noundef %46, double noundef %48, double noundef %49)
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %58

52:                                               ; preds = %44
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = call noundef double @_ZNK7R3Point1YEv(ptr noundef nonnull align 8 dereferenceable(24) %53)
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = call noundef double @_ZNK5R3Box4YMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %55)
  %57 = fsub double %54, %56
  store double %57, ptr %7, align 8, !tbaa !9
  br label %74

58:                                               ; preds = %44
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = call noundef double @_ZNK7R3Point1YEv(ptr noundef nonnull align 8 dereferenceable(24) %59)
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = call noundef double @_ZNK5R3Box4YMinEv(ptr noundef nonnull align 8 dereferenceable(56) %61)
  %63 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %64 = call noundef i32 @_Z8RNIsLessddd(double noundef %60, double noundef %62, double noundef %63)
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %66, label %72

66:                                               ; preds = %58
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = call noundef double @_ZNK5R3Box4YMinEv(ptr noundef nonnull align 8 dereferenceable(56) %67)
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = call noundef double @_ZNK7R3Point1YEv(ptr noundef nonnull align 8 dereferenceable(24) %69)
  %71 = fsub double %68, %70
  store double %71, ptr %7, align 8, !tbaa !9
  br label %73

72:                                               ; preds = %58
  store double 0.000000e+00, ptr %7, align 8, !tbaa !9
  br label %73

73:                                               ; preds = %72, %66
  br label %74

74:                                               ; preds = %73, %52
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %75)
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = call noundef double @_ZNK5R3Box4ZMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %77)
  %79 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %80 = call noundef i32 @_Z11RNIsGreaterddd(double noundef %76, double noundef %78, double noundef %79)
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %88

82:                                               ; preds = %74
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %83)
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = call noundef double @_ZNK5R3Box4ZMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %85)
  %87 = fsub double %84, %86
  store double %87, ptr %8, align 8, !tbaa !9
  br label %104

88:                                               ; preds = %74
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %89)
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = call noundef double @_ZNK5R3Box4ZMinEv(ptr noundef nonnull align 8 dereferenceable(56) %91)
  %93 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %94 = call noundef i32 @_Z8RNIsLessddd(double noundef %90, double noundef %92, double noundef %93)
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %96, label %102

96:                                               ; preds = %88
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = call noundef double @_ZNK5R3Box4ZMinEv(ptr noundef nonnull align 8 dereferenceable(56) %97)
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %99)
  %101 = fsub double %98, %100
  store double %101, ptr %8, align 8, !tbaa !9
  br label %103

102:                                              ; preds = %88
  store double 0.000000e+00, ptr %8, align 8, !tbaa !9
  br label %103

103:                                              ; preds = %102, %96
  br label %104

104:                                              ; preds = %103, %82
  %105 = load double, ptr %7, align 8, !tbaa !9
  %106 = fcmp oeq double %105, 0.000000e+00
  br i1 %106, label %107, label %112

107:                                              ; preds = %104
  %108 = load double, ptr %8, align 8, !tbaa !9
  %109 = fcmp oeq double %108, 0.000000e+00
  br i1 %109, label %110, label %112

110:                                              ; preds = %107
  %111 = load double, ptr %6, align 8, !tbaa !9
  store double %111, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %139

112:                                              ; preds = %107, %104
  %113 = load double, ptr %6, align 8, !tbaa !9
  %114 = fcmp oeq double %113, 0.000000e+00
  br i1 %114, label %115, label %120

115:                                              ; preds = %112
  %116 = load double, ptr %8, align 8, !tbaa !9
  %117 = fcmp oeq double %116, 0.000000e+00
  br i1 %117, label %118, label %120

118:                                              ; preds = %115
  %119 = load double, ptr %7, align 8, !tbaa !9
  store double %119, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %139

120:                                              ; preds = %115, %112
  %121 = load double, ptr %6, align 8, !tbaa !9
  %122 = fcmp oeq double %121, 0.000000e+00
  br i1 %122, label %123, label %128

123:                                              ; preds = %120
  %124 = load double, ptr %7, align 8, !tbaa !9
  %125 = fcmp oeq double %124, 0.000000e+00
  br i1 %125, label %126, label %128

126:                                              ; preds = %123
  %127 = load double, ptr %8, align 8, !tbaa !9
  store double %127, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %139

128:                                              ; preds = %123, %120
  %129 = load double, ptr %6, align 8, !tbaa !9
  %130 = load double, ptr %6, align 8, !tbaa !9
  %131 = load double, ptr %7, align 8, !tbaa !9
  %132 = load double, ptr %7, align 8, !tbaa !9
  %133 = fmul double %131, %132
  %134 = call double @llvm.fmuladd.f64(double %129, double %130, double %133)
  %135 = load double, ptr %8, align 8, !tbaa !9
  %136 = load double, ptr %8, align 8, !tbaa !9
  %137 = call double @llvm.fmuladd.f64(double %135, double %136, double %134)
  %138 = call double @sqrt(double noundef %137) #6
  store double %138, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %139

139:                                              ; preds = %128, %126, %118, %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %140

140:                                              ; preds = %139, %13
  %141 = load double, ptr %3, align 8
  ret double %141
}

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #4

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

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

@RN_EPSILON = external local_unnamed_addr global double, align 8

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z10R3DistanceRK7R3PointRK5R3Box(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(56) %1) local_unnamed_addr #0 {
  %3 = tail call noundef i32 @_ZNK5R3Box7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %.not = icmp eq i32 %3, 0
  br i1 %.not, label %4, label %65

4:                                                ; preds = %2
  %5 = tail call noundef double @_ZNK7R3Point1XEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %6 = tail call noundef double @_ZNK5R3Box4XMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %7 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %8 = tail call noundef i32 @_Z11RNIsGreaterddd(double noundef %5, double noundef %6, double noundef %7)
  %.not49 = icmp eq i32 %8, 0
  %9 = tail call noundef double @_ZNK7R3Point1XEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  br i1 %.not49, label %13, label %10

10:                                               ; preds = %4
  %11 = tail call noundef double @_ZNK5R3Box4XMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %12 = fsub double %9, %11
  br label %21

13:                                               ; preds = %4
  %14 = tail call noundef double @_ZNK5R3Box4XMinEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %15 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %16 = tail call noundef i32 @_Z8RNIsLessddd(double noundef %9, double noundef %14, double noundef %15)
  %.not50 = icmp eq i32 %16, 0
  br i1 %.not50, label %21, label %17

17:                                               ; preds = %13
  %18 = tail call noundef double @_ZNK5R3Box4XMinEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %19 = tail call noundef double @_ZNK7R3Point1XEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %20 = fsub double %18, %19
  br label %21

21:                                               ; preds = %13, %17, %10
  %.047 = phi double [ %12, %10 ], [ %20, %17 ], [ 0.000000e+00, %13 ]
  %22 = tail call noundef double @_ZNK7R3Point1YEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %23 = tail call noundef double @_ZNK5R3Box4YMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %24 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %25 = tail call noundef i32 @_Z11RNIsGreaterddd(double noundef %22, double noundef %23, double noundef %24)
  %.not51 = icmp eq i32 %25, 0
  %26 = tail call noundef double @_ZNK7R3Point1YEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  br i1 %.not51, label %30, label %27

27:                                               ; preds = %21
  %28 = tail call noundef double @_ZNK5R3Box4YMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %29 = fsub double %26, %28
  br label %38

30:                                               ; preds = %21
  %31 = tail call noundef double @_ZNK5R3Box4YMinEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %32 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %33 = tail call noundef i32 @_Z8RNIsLessddd(double noundef %26, double noundef %31, double noundef %32)
  %.not52 = icmp eq i32 %33, 0
  br i1 %.not52, label %38, label %34

34:                                               ; preds = %30
  %35 = tail call noundef double @_ZNK5R3Box4YMinEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %36 = tail call noundef double @_ZNK7R3Point1YEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %37 = fsub double %35, %36
  br label %38

38:                                               ; preds = %30, %34, %27
  %.046 = phi double [ %29, %27 ], [ %37, %34 ], [ 0.000000e+00, %30 ]
  %39 = tail call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %40 = tail call noundef double @_ZNK5R3Box4ZMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %41 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %42 = tail call noundef i32 @_Z11RNIsGreaterddd(double noundef %39, double noundef %40, double noundef %41)
  %.not53 = icmp eq i32 %42, 0
  %43 = tail call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  br i1 %.not53, label %47, label %44

44:                                               ; preds = %38
  %45 = tail call noundef double @_ZNK5R3Box4ZMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %46 = fsub double %43, %45
  br label %55

47:                                               ; preds = %38
  %48 = tail call noundef double @_ZNK5R3Box4ZMinEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %49 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %50 = tail call noundef i32 @_Z8RNIsLessddd(double noundef %43, double noundef %48, double noundef %49)
  %.not54 = icmp eq i32 %50, 0
  br i1 %.not54, label %55, label %51

51:                                               ; preds = %47
  %52 = tail call noundef double @_ZNK5R3Box4ZMinEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %53 = tail call noundef double @_ZNK7R3Point1ZEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %54 = fsub double %52, %53
  br label %55

55:                                               ; preds = %47, %51, %44
  %.0 = phi double [ %46, %44 ], [ %54, %51 ], [ 0.000000e+00, %47 ]
  %56 = fcmp oeq double %.046, 0.000000e+00
  %57 = fcmp oeq double %.0, 0.000000e+00
  %or.cond = and i1 %56, %57
  br i1 %or.cond, label %65, label %58

58:                                               ; preds = %55
  %59 = fcmp oeq double %.047, 0.000000e+00
  %or.cond3 = and i1 %59, %57
  br i1 %or.cond3, label %65, label %60

60:                                               ; preds = %58
  %or.cond5 = and i1 %59, %56
  br i1 %or.cond5, label %65, label %61

61:                                               ; preds = %60
  %62 = fmul double %.046, %.046
  %63 = tail call double @llvm.fmuladd.f64(double %.047, double %.047, double %62)
  %64 = tail call double @llvm.fmuladd.f64(double %.0, double %.0, double %63)
  %sqrt = tail call double @llvm.sqrt.f64(double %64)
  br label %65

65:                                               ; preds = %61, %55, %58, %60, %2
  %.1 = phi double [ 0x47EFFFFFE0000000, %2 ], [ %sqrt, %61 ], [ %.047, %55 ], [ %.046, %58 ], [ %.0, %60 ]
  ret double %.1
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK5R3Box7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #1 align 2

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

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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: AggressiveInstCombinePass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass