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

; 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: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK5R3Box7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(56)) #1 align 2

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z10R3DistanceRK5R3BoxS1_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(56) %1) #5 {
  %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 %4, 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 %145

14:                                               ; preds = %2
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = call noundef i32 @_ZNK5R3Box7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(56) %15)
  %17 = icmp ne i32 %16, 0
  br i1 %17, label %18, label %19

18:                                               ; preds = %14
  store double 0x47EFFFFFE0000000, ptr %3, align 8
  br label %145

19:                                               ; preds = %14
  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
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = call noundef double @_ZNK5R3Box4XMinEv(ptr noundef nonnull align 8 dereferenceable(56) %20)
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = call noundef double @_ZNK5R3Box4XMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %22)
  %24 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %25 = call noundef i32 @_Z11RNIsGreaterddd(double noundef %21, double noundef %23, double noundef %24)
  %26 = icmp ne i32 %25, 0
  br i1 %26, label %27, label %33

27:                                               ; preds = %19
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = call noundef double @_ZNK5R3Box4XMinEv(ptr noundef nonnull align 8 dereferenceable(56) %28)
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = call noundef double @_ZNK5R3Box4XMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %30)
  %32 = fsub double %29, %31
  store double %32, ptr %6, align 8, !tbaa !9
  br label %49

33:                                               ; preds = %19
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = call noundef double @_ZNK5R3Box4XMinEv(ptr noundef nonnull align 8 dereferenceable(56) %34)
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = call noundef double @_ZNK5R3Box4XMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %36)
  %38 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %39 = call noundef i32 @_Z11RNIsGreaterddd(double noundef %35, double noundef %37, double noundef %38)
  %40 = icmp ne i32 %39, 0
  br i1 %40, label %41, label %47

41:                                               ; preds = %33
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = call noundef double @_ZNK5R3Box4XMinEv(ptr noundef nonnull align 8 dereferenceable(56) %42)
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = call noundef double @_ZNK5R3Box4XMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %44)
  %46 = fsub double %43, %45
  store double %46, ptr %6, align 8, !tbaa !9
  br label %48

47:                                               ; preds = %33
  store double 0.000000e+00, ptr %6, align 8, !tbaa !9
  br label %48

48:                                               ; preds = %47, %41
  br label %49

49:                                               ; preds = %48, %27
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = call noundef double @_ZNK5R3Box4YMinEv(ptr noundef nonnull align 8 dereferenceable(56) %50)
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = call noundef double @_ZNK5R3Box4YMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %52)
  %54 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %55 = call noundef i32 @_Z11RNIsGreaterddd(double noundef %51, double noundef %53, double noundef %54)
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %57, label %63

57:                                               ; preds = %49
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = call noundef double @_ZNK5R3Box4YMinEv(ptr noundef nonnull align 8 dereferenceable(56) %58)
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = call noundef double @_ZNK5R3Box4YMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %60)
  %62 = fsub double %59, %61
  store double %62, ptr %7, align 8, !tbaa !9
  br label %79

63:                                               ; preds = %49
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = call noundef double @_ZNK5R3Box4YMinEv(ptr noundef nonnull align 8 dereferenceable(56) %64)
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = call noundef double @_ZNK5R3Box4YMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %66)
  %68 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %69 = call noundef i32 @_Z11RNIsGreaterddd(double noundef %65, double noundef %67, double noundef %68)
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %71, label %77

71:                                               ; preds = %63
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = call noundef double @_ZNK5R3Box4YMinEv(ptr noundef nonnull align 8 dereferenceable(56) %72)
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = call noundef double @_ZNK5R3Box4YMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %74)
  %76 = fsub double %73, %75
  store double %76, ptr %7, align 8, !tbaa !9
  br label %78

77:                                               ; preds = %63
  store double 0.000000e+00, ptr %7, align 8, !tbaa !9
  br label %78

78:                                               ; preds = %77, %71
  br label %79

79:                                               ; preds = %78, %57
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = call noundef double @_ZNK5R3Box4ZMinEv(ptr noundef nonnull align 8 dereferenceable(56) %80)
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = call noundef double @_ZNK5R3Box4ZMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %82)
  %84 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %85 = call noundef i32 @_Z11RNIsGreaterddd(double noundef %81, double noundef %83, double noundef %84)
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %93

87:                                               ; preds = %79
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = call noundef double @_ZNK5R3Box4ZMinEv(ptr noundef nonnull align 8 dereferenceable(56) %88)
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = call noundef double @_ZNK5R3Box4ZMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %90)
  %92 = fsub double %89, %91
  store double %92, ptr %8, align 8, !tbaa !9
  br label %109

93:                                               ; preds = %79
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = call noundef double @_ZNK5R3Box4ZMinEv(ptr noundef nonnull align 8 dereferenceable(56) %94)
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = call noundef double @_ZNK5R3Box4ZMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %96)
  %98 = load double, ptr @RN_EPSILON, align 8, !tbaa !9
  %99 = call noundef i32 @_Z11RNIsGreaterddd(double noundef %95, double noundef %97, double noundef %98)
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %101, label %107

101:                                              ; preds = %93
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = call noundef double @_ZNK5R3Box4ZMinEv(ptr noundef nonnull align 8 dereferenceable(56) %102)
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = call noundef double @_ZNK5R3Box4ZMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %104)
  %106 = fsub double %103, %105
  store double %106, ptr %8, align 8, !tbaa !9
  br label %108

107:                                              ; preds = %93
  store double 0.000000e+00, ptr %8, align 8, !tbaa !9
  br label %108

108:                                              ; preds = %107, %101
  br label %109

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

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

115:                                              ; preds = %112
  %116 = load double, ptr %6, align 8, !tbaa !9
  store double %116, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %144

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

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

123:                                              ; preds = %120
  %124 = load double, ptr %7, align 8, !tbaa !9
  store double %124, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %144

125:                                              ; preds = %120, %117
  %126 = load double, ptr %6, align 8, !tbaa !9
  %127 = fcmp oeq double %126, 0.000000e+00
  br i1 %127, label %128, label %133

128:                                              ; preds = %125
  %129 = load double, ptr %7, align 8, !tbaa !9
  %130 = fcmp oeq double %129, 0.000000e+00
  br i1 %130, label %131, label %133

131:                                              ; preds = %128
  %132 = load double, ptr %8, align 8, !tbaa !9
  store double %132, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %144

133:                                              ; preds = %128, %125
  %134 = load double, ptr %6, align 8, !tbaa !9
  %135 = load double, ptr %6, align 8, !tbaa !9
  %136 = load double, ptr %7, align 8, !tbaa !9
  %137 = load double, ptr %7, align 8, !tbaa !9
  %138 = fmul double %136, %137
  %139 = call double @llvm.fmuladd.f64(double %134, double %135, double %138)
  %140 = load double, ptr %8, align 8, !tbaa !9
  %141 = load double, ptr %8, align 8, !tbaa !9
  %142 = call double @llvm.fmuladd.f64(double %140, double %141, double %139)
  %143 = call double @sqrt(double noundef %142) #6
  store double %143, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %144

144:                                              ; preds = %133, %131, %123, %115
  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 %145

145:                                              ; preds = %144, %18, %13
  %146 = load double, ptr %3, align 8
  ret double %146
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #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: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK5R3Box7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #0 align 2

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

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

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

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

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

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

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

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

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

4:                                                ; preds = %2
  %5 = tail call noundef i32 @_ZNK5R3Box7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %.not50 = icmp eq i32 %5, 0
  br i1 %.not50, label %6, label %55

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

11:                                               ; preds = %6
  %12 = tail call noundef double @_ZNK5R3Box4XMinEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %13 = tail call noundef double @_ZNK5R3Box4XMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %0)
  %14 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %15 = tail call noundef i32 @_Z11RNIsGreaterddd(double noundef %12, double noundef %13, double noundef %14)
  %.not52 = icmp eq i32 %15, 0
  br i1 %.not52, label %19, label %.sink.split

.sink.split:                                      ; preds = %11, %6
  %.sink59 = phi ptr [ %0, %6 ], [ %1, %11 ]
  %.sink58 = phi ptr [ %1, %6 ], [ %0, %11 ]
  %16 = tail call noundef double @_ZNK5R3Box4XMinEv(ptr noundef nonnull align 8 dereferenceable(56) %.sink59)
  %17 = tail call noundef double @_ZNK5R3Box4XMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %.sink58)
  %18 = fsub double %16, %17
  br label %19

19:                                               ; preds = %.sink.split, %11
  %.048 = phi double [ 0.000000e+00, %11 ], [ %18, %.sink.split ]
  %20 = tail call noundef double @_ZNK5R3Box4YMinEv(ptr noundef nonnull align 8 dereferenceable(56) %0)
  %21 = tail call noundef double @_ZNK5R3Box4YMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %22 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %23 = tail call noundef i32 @_Z11RNIsGreaterddd(double noundef %20, double noundef %21, double noundef %22)
  %.not53 = icmp eq i32 %23, 0
  br i1 %.not53, label %24, label %.sink.split60

24:                                               ; preds = %19
  %25 = tail call noundef double @_ZNK5R3Box4YMinEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %26 = tail call noundef double @_ZNK5R3Box4YMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %0)
  %27 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %28 = tail call noundef i32 @_Z11RNIsGreaterddd(double noundef %25, double noundef %26, double noundef %27)
  %.not54 = icmp eq i32 %28, 0
  br i1 %.not54, label %32, label %.sink.split60

.sink.split60:                                    ; preds = %24, %19
  %.sink63 = phi ptr [ %0, %19 ], [ %1, %24 ]
  %.sink62 = phi ptr [ %1, %19 ], [ %0, %24 ]
  %29 = tail call noundef double @_ZNK5R3Box4YMinEv(ptr noundef nonnull align 8 dereferenceable(56) %.sink63)
  %30 = tail call noundef double @_ZNK5R3Box4YMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %.sink62)
  %31 = fsub double %29, %30
  br label %32

32:                                               ; preds = %.sink.split60, %24
  %.047 = phi double [ 0.000000e+00, %24 ], [ %31, %.sink.split60 ]
  %33 = tail call noundef double @_ZNK5R3Box4ZMinEv(ptr noundef nonnull align 8 dereferenceable(56) %0)
  %34 = tail call noundef double @_ZNK5R3Box4ZMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %35 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %36 = tail call noundef i32 @_Z11RNIsGreaterddd(double noundef %33, double noundef %34, double noundef %35)
  %.not55 = icmp eq i32 %36, 0
  br i1 %.not55, label %37, label %.sink.split64

37:                                               ; preds = %32
  %38 = tail call noundef double @_ZNK5R3Box4ZMinEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %39 = tail call noundef double @_ZNK5R3Box4ZMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %0)
  %40 = load double, ptr @RN_EPSILON, align 8, !tbaa !5
  %41 = tail call noundef i32 @_Z11RNIsGreaterddd(double noundef %38, double noundef %39, double noundef %40)
  %.not56 = icmp eq i32 %41, 0
  br i1 %.not56, label %45, label %.sink.split64

.sink.split64:                                    ; preds = %37, %32
  %.sink67 = phi ptr [ %0, %32 ], [ %1, %37 ]
  %.sink66 = phi ptr [ %1, %32 ], [ %0, %37 ]
  %42 = tail call noundef double @_ZNK5R3Box4ZMinEv(ptr noundef nonnull align 8 dereferenceable(56) %.sink67)
  %43 = tail call noundef double @_ZNK5R3Box4ZMaxEv(ptr noundef nonnull align 8 dereferenceable(56) %.sink66)
  %44 = fsub double %42, %43
  br label %45

45:                                               ; preds = %.sink.split64, %37
  %.0 = phi double [ 0.000000e+00, %37 ], [ %44, %.sink.split64 ]
  %46 = fcmp oeq double %.047, 0.000000e+00
  %47 = fcmp oeq double %.0, 0.000000e+00
  %or.cond = and i1 %46, %47
  br i1 %or.cond, label %55, label %48

48:                                               ; preds = %45
  %49 = fcmp oeq double %.048, 0.000000e+00
  %or.cond3 = and i1 %49, %47
  br i1 %or.cond3, label %55, label %50

50:                                               ; preds = %48
  %or.cond5 = and i1 %49, %46
  br i1 %or.cond5, label %55, label %51

51:                                               ; preds = %50
  %52 = fmul double %.047, %.047
  %53 = tail call double @llvm.fmuladd.f64(double %.048, double %.048, double %52)
  %54 = tail call double @llvm.fmuladd.f64(double %.0, double %.0, double %53)
  %sqrt = tail call double @llvm.sqrt.f64(double %54)
  br label %55

55:                                               ; preds = %51, %45, %48, %50, %4, %2
  %.1 = phi double [ 0x47EFFFFFE0000000, %2 ], [ 0x47EFFFFFE0000000, %4 ], [ %sqrt, %51 ], [ %.048, %45 ], [ %.047, %48 ], [ %.0, %50 ]
  ret double %.1
}

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

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