; LLVM IR from yangfengzzz/DigitalVox3 :: vox.geometry/surfaces (cylinder3)

; 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.vox::geometry::MatrixElemWiseBinaryOp" = type <{ ptr, ptr, [8 x i8] }>
%"class.vox::geometry::Matrix" = type { double, double, double }
%"class.vox::geometry::BoundingBox.15" = type { %"class.vox::geometry::Matrix", %"class.vox::geometry::Matrix" }
%"class.vox::geometry::Plane" = type { %"class.vox::geometry::Surface.base", %"class.vox::geometry::Matrix", %"class.vox::geometry::Matrix" }
%"class.vox::geometry::Surface.base" = type <{ ptr, %"class.vox::geometry::Transform", i8 }>
%"class.vox::geometry::Transform" = type { %"class.vox::geometry::Matrix", %"class.vox::geometry::Orientation" }
%"class.vox::geometry::Orientation" = type { %"class.vox::geometry::Quaternion", %"class.vox::geometry::Matrix.0", %"class.vox::geometry::Matrix.0" }
%"class.vox::geometry::Quaternion" = type { double, double, double, double }
%"class.vox::geometry::Matrix.0" = type { %"struct.std::array" }
%"struct.std::array" = type { [9 x double] }
%"struct.vox::geometry::SurfaceRayIntersection" = type { i8, double, %"class.vox::geometry::Matrix", %"class.vox::geometry::Matrix" }
%"class.vox::geometry::Matrix.4" = type { double, double }
%"class.vox::geometry::Ray" = type { %"class.vox::geometry::Matrix", %"class.vox::geometry::Matrix" }
%"class.vox::geometry::Cylinder3" = type { %"class.vox::geometry::Surface.base", %"class.vox::geometry::Matrix", double, double }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3vox8geometry6MatrixIdLm3ELm1EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vox8geometrymiIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEES3_EEDaRKNS0_16MatrixExpressionIT_XT0_EXT1_ET2_EERKNS4_IS5_XT0_EXT1_ET3_EE(ptr dead_on_unwind noalias writable sret(%"class.vox::geometry::MatrixElemWiseBinaryOp") align 8, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vox8geometry6MatrixIdLm3ELm1EEC2ILm3ELm1ENS0_22MatrixElemWiseBinaryOpIdLm3ELm1ERKS2_S6_St5minusIdEEEEERKNS0_16MatrixExpressionIdXT_EXT0_ET1_EE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

; 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 nounwind uwtable
declare dso_local void @_ZN3vox8geometry6MatrixIdLm2ELm1EEC2ERKdS4_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3vox8geometry6MatrixIdLm3ELm1EEC2ERKdS4_S4_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK3vox8geometry9Cylinder315intersectsLocalERKNS0_3RayIdLm3EEE(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef nonnull align 8 dereferenceable(48) %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.vox::geometry::Matrix", align 8
  %7 = alloca %"class.vox::geometry::Matrix", align 8
  %8 = alloca %"class.vox::geometry::MatrixElemWiseBinaryOp", align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca %"class.vox::geometry::BoundingBox.15", align 8
  %13 = alloca %"class.vox::geometry::Plane", align 8
  %14 = alloca %"class.vox::geometry::Matrix", align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca %"class.vox::geometry::Transform", align 8
  %19 = alloca %"class.vox::geometry::Plane", align 8
  %20 = alloca %"class.vox::geometry::Matrix", align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca %"class.vox::geometry::Transform", align 8
  %27 = alloca %"struct.vox::geometry::SurfaceRayIntersection", align 8
  %28 = alloca %"struct.vox::geometry::SurfaceRayIntersection", align 8
  %29 = alloca %"class.vox::geometry::Matrix", align 8
  %30 = alloca %"class.vox::geometry::MatrixElemWiseBinaryOp", align 8
  %31 = alloca %"class.vox::geometry::Matrix.4", align 8
  %32 = alloca i32, align 4
  %33 = alloca double, align 8
  %34 = alloca double, align 8
  %35 = alloca double, align 8
  %36 = alloca %"class.vox::geometry::Matrix", align 8
  %37 = alloca %"class.vox::geometry::Matrix", align 8
  %38 = alloca %"class.vox::geometry::MatrixElemWiseBinaryOp", align 8
  %39 = alloca %"class.vox::geometry::Matrix", align 8
  %40 = alloca %"class.vox::geometry::MatrixElemWiseBinaryOp", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %41 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #7
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %"class.vox::geometry::Ray", ptr %42, i32 0, i32 1
  call void @_ZN3vox8geometry6MatrixIdLm3ELm1EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %43)
  %44 = getelementptr inbounds %"class.vox::geometry::Matrix", ptr %6, i32 0, i32 1
  store double 0.000000e+00, ptr %44, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #7
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %"class.vox::geometry::Ray", ptr %45, i32 0, i32 0
  %47 = getelementptr inbounds %"class.vox::geometry::Cylinder3", ptr %41, i32 0, i32 1
  call void @_ZN3vox8geometrymiIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEES3_EEDaRKNS0_16MatrixExpressionIT_XT0_EXT1_ET2_EERKNS4_IS5_XT0_EXT1_ET3_EE(ptr dead_on_unwind writable sret(%"class.vox::geometry::MatrixElemWiseBinaryOp") align 8 %8, ptr noundef nonnull align 1 dereferenceable(1) %46, ptr noundef nonnull align 1 dereferenceable(1) %47)
  call void @_ZN3vox8geometry6MatrixIdLm3ELm1EEC2ILm3ELm1ENS0_22MatrixElemWiseBinaryOpIdLm3ELm1ERKS2_S6_St5minusIdEEEEERKNS0_16MatrixExpressionIdXT_EXT0_ET1_EE(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 1 dereferenceable(1) %8)
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  %48 = getelementptr inbounds %"class.vox::geometry::Matrix", ptr %7, i32 0, i32 1
  store double 0.000000e+00, ptr %48, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %49 = call noundef double @_ZNK3vox8geometry16MatrixExpressionIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEEE13lengthSquaredEv(ptr noundef nonnull align 1 dereferenceable(1) %6)
  store double %49, ptr %9, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %50 = call noundef double @_ZNK3vox8geometry16MatrixExpressionIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEEE3dotILm3ELm1ES3_dEENSt9enable_ifIXaaooclL_ZNS0_19isMatrixSizeDynamicILm3ELm1EEEbvEEeqLm1ELi1Eoocl19isMatrixSizeDynamicIXT_EXT0_EEEeqT0_Li1EET2_E4typeERKNS1_IdXT_EXT0_ET1_EE(ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
  store double %50, ptr %10, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %51 = call noundef double @_ZNK3vox8geometry16MatrixExpressionIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEEE13lengthSquaredEv(ptr noundef nonnull align 1 dereferenceable(1) %7)
  %52 = getelementptr inbounds %"class.vox::geometry::Cylinder3", ptr %41, i32 0, i32 2
  %53 = load double, ptr %52, align 8, !tbaa !13
  %54 = call noundef double @_ZN3vox8geometry6squareIdEENSt9enable_ifIXsr3std13is_arithmeticIT_EE5valueES3_E4typeES3_(double noundef %53)
  %55 = fsub double %51, %54
  store double %55, ptr %11, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #7
  call void @_ZNK3vox8geometry7SurfaceILm3EE11boundingBoxEv(ptr dead_on_unwind writable sret(%"class.vox::geometry::BoundingBox.15") align 8 %12, ptr noundef nonnull align 8 dereferenceable(209) %41)
  call void @llvm.lifetime.start.p0(i64 264, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store double 0.000000e+00, ptr %15, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store double 1.000000e+00, ptr %16, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  store double 0.000000e+00, ptr %17, align 8, !tbaa !12
  call void @_ZN3vox8geometry6MatrixIdLm3ELm1EEC2ERKdS4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %56 = getelementptr inbounds %"class.vox::geometry::BoundingBox.15", ptr %12, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 200, ptr %18) #7
  call void @llvm.memset.p0.i64(ptr align 8 %18, i8 0, i64 200, i1 false)
  call void @_ZN3vox8geometry9TransformILm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(200) %18)
  call void @_ZN3vox8geometry5PlaneILm3EEC1ERKNS0_6MatrixIdLm3ELm1EEES6_RKNS0_9TransformILm3EEEb(ptr noundef nonnull align 8 dereferenceable(264) %13, ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %56, ptr noundef nonnull align 8 dereferenceable(200) %18, i1 noundef zeroext false)
  call void @llvm.lifetime.end.p0(i64 200, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 264, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  store double 0.000000e+00, ptr %21, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  store double -1.000000e+00, ptr %22, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  store double 0.000000e+00, ptr %23, align 8, !tbaa !12
  invoke void @_ZN3vox8geometry6MatrixIdLm3ELm1EEC2ERKdS4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %57 unwind label %101

57:                                               ; preds = %2
  %58 = getelementptr inbounds %"class.vox::geometry::BoundingBox.15", ptr %12, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 200, ptr %26) #7
  call void @llvm.memset.p0.i64(ptr align 8 %26, i8 0, i64 200, i1 false)
  invoke void @_ZN3vox8geometry9TransformILm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(200) %26)
          to label %59 unwind label %105

59:                                               ; preds = %57
  invoke void @_ZN3vox8geometry5PlaneILm3EEC1ERKNS0_6MatrixIdLm3ELm1EEES6_RKNS0_9TransformILm3EEEb(ptr noundef nonnull align 8 dereferenceable(264) %19, ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(24) %58, ptr noundef nonnull align 8 dereferenceable(200) %26, i1 noundef zeroext false)
          to label %60 unwind label %105

60:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 200, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr %27) #7
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZNK3vox8geometry7SurfaceILm3EE19closestIntersectionERKNS0_3RayIdLm3EEE(ptr dead_on_unwind writable sret(%"struct.vox::geometry::SurfaceRayIntersection") align 8 %27, ptr noundef nonnull align 8 dereferenceable(209) %13, ptr noundef nonnull align 8 dereferenceable(48) %61)
          to label %62 unwind label %110

62:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 64, ptr %28) #7
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZNK3vox8geometry7SurfaceILm3EE19closestIntersectionERKNS0_3RayIdLm3EEE(ptr dead_on_unwind writable sret(%"struct.vox::geometry::SurfaceRayIntersection") align 8 %28, ptr noundef nonnull align 8 dereferenceable(209) %19, ptr noundef nonnull align 8 dereferenceable(48) %63)
          to label %64 unwind label %114

64:                                               ; preds = %62
  %65 = load double, ptr %9, align 8, !tbaa !12
  %66 = fcmp olt double %65, 0x3CB0000000000000
  br i1 %66, label %76, label %67

67:                                               ; preds = %64
  %68 = load double, ptr %10, align 8, !tbaa !12
  %69 = load double, ptr %10, align 8, !tbaa !12
  %70 = load double, ptr %9, align 8, !tbaa !12
  %71 = load double, ptr %11, align 8, !tbaa !12
  %72 = fmul double %70, %71
  %73 = fneg double %72
  %74 = call double @llvm.fmuladd.f64(double %68, double %69, double %73)
  %75 = fcmp olt double %74, 0.000000e+00
  br i1 %75, label %76, label %130

76:                                               ; preds = %67, %64
  call void @llvm.lifetime.start.p0(i64 24, ptr %29) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #7
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %"class.vox::geometry::Ray", ptr %77, i32 0, i32 0
  %79 = getelementptr inbounds %"class.vox::geometry::Cylinder3", ptr %41, i32 0, i32 1
  invoke void @_ZN3vox8geometrymiIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEES3_EEDaRKNS0_16MatrixExpressionIT_XT0_EXT1_ET2_EERKNS4_IS5_XT0_EXT1_ET3_EE(ptr dead_on_unwind writable sret(%"class.vox::geometry::MatrixElemWiseBinaryOp") align 8 %30, ptr noundef nonnull align 1 dereferenceable(1) %78, ptr noundef nonnull align 1 dereferenceable(1) %79)
          to label %80 unwind label %118

80:                                               ; preds = %76
  invoke void @_ZN3vox8geometry6MatrixIdLm3ELm1EEC2ILm3ELm1ENS0_22MatrixElemWiseBinaryOpIdLm3ELm1ERKS2_S6_St5minusIdEEEEERKNS0_16MatrixExpressionIdXT_EXT0_ET1_EE(ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull align 1 dereferenceable(1) %30)
          to label %81 unwind label %118

81:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #7
  %82 = getelementptr inbounds %"class.vox::geometry::Matrix", ptr %29, i32 0, i32 0
  %83 = getelementptr inbounds %"class.vox::geometry::Matrix", ptr %29, i32 0, i32 2
  invoke void @_ZN3vox8geometry6MatrixIdLm2ELm1EEC2ERKdS4_(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef nonnull align 8 dereferenceable(8) %83)
          to label %84 unwind label %122

84:                                               ; preds = %81
  %85 = invoke noundef double @_ZNK3vox8geometry16MatrixExpressionIdLm2ELm1ENS0_6MatrixIdLm2ELm1EEEE13lengthSquaredEv(ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %86 unwind label %122

86:                                               ; preds = %84
  %87 = getelementptr inbounds %"class.vox::geometry::Cylinder3", ptr %41, i32 0, i32 2
  %88 = load double, ptr %87, align 8, !tbaa !13
  %89 = invoke noundef double @_ZN3vox8geometry6squareIdEENSt9enable_ifIXsr3std13is_arithmeticIT_EE5valueES3_E4typeES3_(double noundef %88)
          to label %90 unwind label %122

90:                                               ; preds = %86
  %91 = fcmp ole double %85, %89
  br i1 %91, label %92, label %127

92:                                               ; preds = %90
  %93 = getelementptr inbounds %"struct.vox::geometry::SurfaceRayIntersection", ptr %27, i32 0, i32 0
  %94 = load i8, ptr %93, align 8, !tbaa !22, !range !24, !noundef !25
  %95 = trunc i8 %94 to i1
  br i1 %95, label %100, label %96

96:                                               ; preds = %92
  %97 = getelementptr inbounds %"struct.vox::geometry::SurfaceRayIntersection", ptr %28, i32 0, i32 0
  %98 = load i8, ptr %97, align 8, !tbaa !22, !range !24, !noundef !25
  %99 = trunc i8 %98 to i1
  br i1 %99, label %100, label %126

100:                                              ; preds = %96, %92
  store i1 true, ptr %3, align 1
  store i32 1, ptr %32, align 4
  br label %128

101:                                              ; preds = %2
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %24, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %25, align 4
  br label %109

105:                                              ; preds = %59, %57
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %24, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 200, ptr %26) #7
  br label %109

109:                                              ; preds = %105, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #7
  br label %259

110:                                              ; preds = %60
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %24, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %25, align 4
  br label %258

114:                                              ; preds = %62
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %24, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %25, align 4
  br label %257

118:                                              ; preds = %80, %76
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %24, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #7
  br label %129

122:                                              ; preds = %86, %84, %81
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %24, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #7
  br label %129

126:                                              ; preds = %96
  br label %127

127:                                              ; preds = %126, %90
  store i1 false, ptr %3, align 1
  store i32 1, ptr %32, align 4
  br label %128

128:                                              ; preds = %127, %100
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #7
  br label %255

129:                                              ; preds = %122, %118
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #7
  br label %257

130:                                              ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  %131 = load double, ptr %10, align 8, !tbaa !12
  %132 = fneg double %131
  %133 = load double, ptr %10, align 8, !tbaa !12
  %134 = load double, ptr %10, align 8, !tbaa !12
  %135 = load double, ptr %9, align 8, !tbaa !12
  %136 = load double, ptr %11, align 8, !tbaa !12
  %137 = fmul double %135, %136
  %138 = fneg double %137
  %139 = call double @llvm.fmuladd.f64(double %133, double %134, double %138)
  %140 = call double @sqrt(double noundef %139) #7
  %141 = fadd double %132, %140
  %142 = load double, ptr %9, align 8, !tbaa !12
  %143 = fdiv double %141, %142
  store double %143, ptr %33, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #7
  %144 = load double, ptr %10, align 8, !tbaa !12
  %145 = fneg double %144
  %146 = load double, ptr %10, align 8, !tbaa !12
  %147 = load double, ptr %10, align 8, !tbaa !12
  %148 = load double, ptr %9, align 8, !tbaa !12
  %149 = load double, ptr %11, align 8, !tbaa !12
  %150 = fmul double %148, %149
  %151 = fneg double %150
  %152 = call double @llvm.fmuladd.f64(double %146, double %147, double %151)
  %153 = call double @sqrt(double noundef %152) #7
  %154 = fsub double %145, %153
  %155 = load double, ptr %9, align 8, !tbaa !12
  %156 = fdiv double %154, %155
  store double %156, ptr %34, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  %157 = load double, ptr %34, align 8, !tbaa !12
  store double %157, ptr %35, align 8, !tbaa !12
  %158 = load double, ptr %34, align 8, !tbaa !12
  %159 = fcmp olt double %158, 0.000000e+00
  br i1 %159, label %160, label %162

160:                                              ; preds = %130
  %161 = load double, ptr %33, align 8, !tbaa !12
  store double %161, ptr %35, align 8, !tbaa !12
  br label %162

162:                                              ; preds = %160, %130
  call void @llvm.lifetime.start.p0(i64 24, ptr %36) #7
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = load double, ptr %35, align 8, !tbaa !12
  invoke void @_ZNK3vox8geometry3RayIdLm3EE7pointAtEd(ptr dead_on_unwind writable sret(%"class.vox::geometry::Matrix") align 8 %36, ptr noundef nonnull align 8 dereferenceable(48) %163, double noundef %164)
          to label %165 unwind label %186

165:                                              ; preds = %162
  %166 = getelementptr inbounds %"class.vox::geometry::Matrix", ptr %36, i32 0, i32 1
  %167 = load double, ptr %166, align 8, !tbaa !9
  %168 = getelementptr inbounds %"class.vox::geometry::Cylinder3", ptr %41, i32 0, i32 1
  %169 = getelementptr inbounds %"class.vox::geometry::Matrix", ptr %168, i32 0, i32 1
  %170 = load double, ptr %169, align 8, !tbaa !26
  %171 = getelementptr inbounds %"class.vox::geometry::Cylinder3", ptr %41, i32 0, i32 3
  %172 = load double, ptr %171, align 8, !tbaa !27
  %173 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %172, double %170)
  %174 = fcmp oge double %167, %173
  br i1 %174, label %185, label %175

175:                                              ; preds = %165
  %176 = getelementptr inbounds %"class.vox::geometry::Matrix", ptr %36, i32 0, i32 1
  %177 = load double, ptr %176, align 8, !tbaa !9
  %178 = getelementptr inbounds %"class.vox::geometry::Cylinder3", ptr %41, i32 0, i32 1
  %179 = getelementptr inbounds %"class.vox::geometry::Matrix", ptr %178, i32 0, i32 1
  %180 = load double, ptr %179, align 8, !tbaa !26
  %181 = getelementptr inbounds %"class.vox::geometry::Cylinder3", ptr %41, i32 0, i32 3
  %182 = load double, ptr %181, align 8, !tbaa !27
  %183 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %182, double %180)
  %184 = fcmp ole double %177, %183
  br i1 %184, label %185, label %190

185:                                              ; preds = %175, %165
  store i1 true, ptr %3, align 1
  store i32 1, ptr %32, align 4
  br label %253

186:                                              ; preds = %162
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %24, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %25, align 4
  br label %254

190:                                              ; preds = %175
  %191 = getelementptr inbounds %"struct.vox::geometry::SurfaceRayIntersection", ptr %27, i32 0, i32 0
  %192 = load i8, ptr %191, align 8, !tbaa !22, !range !24, !noundef !25
  %193 = trunc i8 %192 to i1
  br i1 %193, label %194, label %221

194:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 24, ptr %37) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %38) #7
  %195 = getelementptr inbounds %"struct.vox::geometry::SurfaceRayIntersection", ptr %27, i32 0, i32 2
  %196 = getelementptr inbounds %"class.vox::geometry::Cylinder3", ptr %41, i32 0, i32 1
  invoke void @_ZN3vox8geometrymiIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEES3_EEDaRKNS0_16MatrixExpressionIT_XT0_EXT1_ET2_EERKNS4_IS5_XT0_EXT1_ET3_EE(ptr dead_on_unwind writable sret(%"class.vox::geometry::MatrixElemWiseBinaryOp") align 8 %38, ptr noundef nonnull align 1 dereferenceable(1) %195, ptr noundef nonnull align 1 dereferenceable(1) %196)
          to label %197 unwind label %208

197:                                              ; preds = %194
  invoke void @_ZN3vox8geometry6MatrixIdLm3ELm1EEC2ILm3ELm1ENS0_22MatrixElemWiseBinaryOpIdLm3ELm1ERKS2_S6_St5minusIdEEEEERKNS0_16MatrixExpressionIdXT_EXT0_ET1_EE(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 1 dereferenceable(1) %38)
          to label %198 unwind label %208

198:                                              ; preds = %197
  call void @llvm.lifetime.end.p0(i64 24, ptr %38) #7
  %199 = getelementptr inbounds %"class.vox::geometry::Matrix", ptr %37, i32 0, i32 1
  store double 0.000000e+00, ptr %199, align 8, !tbaa !9
  %200 = invoke noundef double @_ZNK3vox8geometry16MatrixExpressionIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEEE13lengthSquaredEv(ptr noundef nonnull align 1 dereferenceable(1) %37)
          to label %201 unwind label %212

201:                                              ; preds = %198
  %202 = getelementptr inbounds %"class.vox::geometry::Cylinder3", ptr %41, i32 0, i32 2
  %203 = load double, ptr %202, align 8, !tbaa !13
  %204 = invoke noundef double @_ZN3vox8geometry6squareIdEENSt9enable_ifIXsr3std13is_arithmeticIT_EE5valueES3_E4typeES3_(double noundef %203)
          to label %205 unwind label %212

205:                                              ; preds = %201
  %206 = fcmp ole double %200, %204
  br i1 %206, label %207, label %216

207:                                              ; preds = %205
  store i1 true, ptr %3, align 1
  store i32 1, ptr %32, align 4
  br label %217

208:                                              ; preds = %197, %194
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %24, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %38) #7
  br label %220

212:                                              ; preds = %201, %198
  %213 = landingpad { ptr, i32 }
          cleanup
  %214 = extractvalue { ptr, i32 } %213, 0
  store ptr %214, ptr %24, align 8
  %215 = extractvalue { ptr, i32 } %213, 1
  store i32 %215, ptr %25, align 4
  br label %220

216:                                              ; preds = %205
  store i32 0, ptr %32, align 4
  br label %217

217:                                              ; preds = %216, %207
  call void @llvm.lifetime.end.p0(i64 24, ptr %37) #7
  %218 = load i32, ptr %32, align 4
  switch i32 %218, label %253 [
    i32 0, label %219
  ]

219:                                              ; preds = %217
  br label %221

220:                                              ; preds = %212, %208
  call void @llvm.lifetime.end.p0(i64 24, ptr %37) #7
  br label %254

221:                                              ; preds = %219, %190
  %222 = getelementptr inbounds %"struct.vox::geometry::SurfaceRayIntersection", ptr %28, i32 0, i32 0
  %223 = load i8, ptr %222, align 8, !tbaa !22, !range !24, !noundef !25
  %224 = trunc i8 %223 to i1
  br i1 %224, label %225, label %252

225:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 24, ptr %39) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %40) #7
  %226 = getelementptr inbounds %"struct.vox::geometry::SurfaceRayIntersection", ptr %28, i32 0, i32 2
  %227 = getelementptr inbounds %"class.vox::geometry::Cylinder3", ptr %41, i32 0, i32 1
  invoke void @_ZN3vox8geometrymiIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEES3_EEDaRKNS0_16MatrixExpressionIT_XT0_EXT1_ET2_EERKNS4_IS5_XT0_EXT1_ET3_EE(ptr dead_on_unwind writable sret(%"class.vox::geometry::MatrixElemWiseBinaryOp") align 8 %40, ptr noundef nonnull align 1 dereferenceable(1) %226, ptr noundef nonnull align 1 dereferenceable(1) %227)
          to label %228 unwind label %239

228:                                              ; preds = %225
  invoke void @_ZN3vox8geometry6MatrixIdLm3ELm1EEC2ILm3ELm1ENS0_22MatrixElemWiseBinaryOpIdLm3ELm1ERKS2_S6_St5minusIdEEEEERKNS0_16MatrixExpressionIdXT_EXT0_ET1_EE(ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef nonnull align 1 dereferenceable(1) %40)
          to label %229 unwind label %239

229:                                              ; preds = %228
  call void @llvm.lifetime.end.p0(i64 24, ptr %40) #7
  %230 = getelementptr inbounds %"class.vox::geometry::Matrix", ptr %39, i32 0, i32 1
  store double 0.000000e+00, ptr %230, align 8, !tbaa !9
  %231 = invoke noundef double @_ZNK3vox8geometry16MatrixExpressionIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEEE13lengthSquaredEv(ptr noundef nonnull align 1 dereferenceable(1) %39)
          to label %232 unwind label %243

232:                                              ; preds = %229
  %233 = getelementptr inbounds %"class.vox::geometry::Cylinder3", ptr %41, i32 0, i32 2
  %234 = load double, ptr %233, align 8, !tbaa !13
  %235 = invoke noundef double @_ZN3vox8geometry6squareIdEENSt9enable_ifIXsr3std13is_arithmeticIT_EE5valueES3_E4typeES3_(double noundef %234)
          to label %236 unwind label %243

236:                                              ; preds = %232
  %237 = fcmp ole double %231, %235
  br i1 %237, label %238, label %247

238:                                              ; preds = %236
  store i1 true, ptr %3, align 1
  store i32 1, ptr %32, align 4
  br label %248

239:                                              ; preds = %228, %225
  %240 = landingpad { ptr, i32 }
          cleanup
  %241 = extractvalue { ptr, i32 } %240, 0
  store ptr %241, ptr %24, align 8
  %242 = extractvalue { ptr, i32 } %240, 1
  store i32 %242, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %40) #7
  br label %251

243:                                              ; preds = %232, %229
  %244 = landingpad { ptr, i32 }
          cleanup
  %245 = extractvalue { ptr, i32 } %244, 0
  store ptr %245, ptr %24, align 8
  %246 = extractvalue { ptr, i32 } %244, 1
  store i32 %246, ptr %25, align 4
  br label %251

247:                                              ; preds = %236
  store i32 0, ptr %32, align 4
  br label %248

248:                                              ; preds = %247, %238
  call void @llvm.lifetime.end.p0(i64 24, ptr %39) #7
  %249 = load i32, ptr %32, align 4
  switch i32 %249, label %253 [
    i32 0, label %250
  ]

250:                                              ; preds = %248
  br label %252

251:                                              ; preds = %243, %239
  call void @llvm.lifetime.end.p0(i64 24, ptr %39) #7
  br label %254

252:                                              ; preds = %250, %221
  store i1 false, ptr %3, align 1
  store i32 1, ptr %32, align 4
  br label %253

253:                                              ; preds = %252, %248, %217, %185
  call void @llvm.lifetime.end.p0(i64 24, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  br label %255

254:                                              ; preds = %251, %220, %186
  call void @llvm.lifetime.end.p0(i64 24, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  br label %257

255:                                              ; preds = %253, %128
  call void @llvm.lifetime.end.p0(i64 64, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %27) #7
  call void @_ZN3vox8geometry7SurfaceILm3EED2Ev(ptr noundef nonnull align 8 dereferenceable(264) %19) #7
  call void @llvm.lifetime.end.p0(i64 264, ptr %19) #7
  call void @_ZN3vox8geometry7SurfaceILm3EED2Ev(ptr noundef nonnull align 8 dereferenceable(264) %13) #7
  call void @llvm.lifetime.end.p0(i64 264, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  %256 = load i1, ptr %3, align 1
  ret i1 %256

257:                                              ; preds = %254, %129, %114
  call void @llvm.lifetime.end.p0(i64 64, ptr %28) #7
  br label %258

258:                                              ; preds = %257, %110
  call void @llvm.lifetime.end.p0(i64 64, ptr %27) #7
  call void @_ZN3vox8geometry7SurfaceILm3EED2Ev(ptr noundef nonnull align 8 dereferenceable(264) %19) #7
  br label %259

259:                                              ; preds = %258, %109
  call void @llvm.lifetime.end.p0(i64 264, ptr %19) #7
  call void @_ZN3vox8geometry7SurfaceILm3EED2Ev(ptr noundef nonnull align 8 dereferenceable(264) %13) #7
  call void @llvm.lifetime.end.p0(i64 264, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  br label %260

260:                                              ; preds = %259
  %261 = load ptr, ptr %24, align 8
  %262 = load i32, ptr %25, align 4
  %263 = insertvalue { ptr, i32 } poison, ptr %261, 0
  %264 = insertvalue { ptr, i32 } %263, i32 %262, 1
  resume { ptr, i32 } %264
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK3vox8geometry16MatrixExpressionIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEEE13lengthSquaredEv(ptr noundef nonnull align 1 dereferenceable(1)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN3vox8geometry6squareIdEENSt9enable_ifIXsr3std13is_arithmeticIT_EE5valueES3_E4typeES3_(double noundef) #0

declare void @_ZNK3vox8geometry7SurfaceILm3EE11boundingBoxEv(ptr dead_on_unwind writable sret(%"class.vox::geometry::BoundingBox.15") align 8, ptr noundef nonnull align 8 dereferenceable(209)) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vox8geometry9TransformILm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #2 align 2

declare void @_ZN3vox8geometry5PlaneILm3EEC1ERKNS0_6MatrixIdLm3ELm1EEES6_RKNS0_9TransformILm3EEEb(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(200), i1 noundef zeroext) unnamed_addr #6

declare void @_ZNK3vox8geometry7SurfaceILm3EE19closestIntersectionERKNS0_3RayIdLm3EEE(ptr dead_on_unwind writable sret(%"struct.vox::geometry::SurfaceRayIntersection") align 8, ptr noundef nonnull align 8 dereferenceable(209), ptr noundef nonnull align 8 dereferenceable(48)) #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK3vox8geometry16MatrixExpressionIdLm2ELm1ENS0_6MatrixIdLm2ELm1EEEE13lengthSquaredEv(ptr noundef nonnull align 1 dereferenceable(1)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3vox8geometry3RayIdLm3EE7pointAtEd(ptr dead_on_unwind noalias writable sret(%"class.vox::geometry::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(48), double noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3vox8geometry7SurfaceILm3EED2Ev(ptr noundef nonnull align 8 dereferenceable(209)) unnamed_addr #0 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { "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 #7 = { 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, !11, i64 8}
!10 = !{!"_ZTSN3vox8geometry6MatrixIdLm3ELm1EEE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"double", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !11, i64 240}
!14 = !{!"_ZTSN3vox8geometry9Cylinder3E", !15, i64 0, !10, i64 216, !11, i64 240, !11, i64 248}
!15 = !{!"_ZTSN3vox8geometry7SurfaceILm3EEE", !16, i64 8, !21, i64 208}
!16 = !{!"_ZTSN3vox8geometry9TransformILm3EEE", !10, i64 0, !17, i64 24}
!17 = !{!"_ZTSN3vox8geometry11OrientationILm3EEE", !18, i64 0, !19, i64 32, !19, i64 104}
!18 = !{!"_ZTSN3vox8geometry10QuaternionIdEE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!19 = !{!"_ZTSN3vox8geometry6MatrixIdLm3ELm3EEE", !20, i64 0}
!20 = !{!"_ZTSSt5arrayIdLm9EE", !7, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{!23, !21, i64 0}
!23 = !{!"_ZTSN3vox8geometry22SurfaceRayIntersectionILm3EEE", !21, i64 0, !11, i64 8, !10, i64 16, !10, i64 40}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!14, !11, i64 224}
!27 = !{!14, !11, i64 248}


; 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.vox::geometry::MatrixElemWiseBinaryOp" = type <{ ptr, ptr, [8 x i8] }>
%"class.vox::geometry::Matrix" = type { double, double, double }
%"class.vox::geometry::BoundingBox.15" = type { %"class.vox::geometry::Matrix", %"class.vox::geometry::Matrix" }
%"class.vox::geometry::Plane" = type { %"class.vox::geometry::Surface.base", %"class.vox::geometry::Matrix", %"class.vox::geometry::Matrix" }
%"class.vox::geometry::Surface.base" = type <{ ptr, %"class.vox::geometry::Transform", i8 }>
%"class.vox::geometry::Transform" = type { %"class.vox::geometry::Matrix", %"class.vox::geometry::Orientation" }
%"class.vox::geometry::Orientation" = type { %"class.vox::geometry::Quaternion", %"class.vox::geometry::Matrix.0", %"class.vox::geometry::Matrix.0" }
%"class.vox::geometry::Quaternion" = type { double, double, double, double }
%"class.vox::geometry::Matrix.0" = type { %"struct.std::array" }
%"struct.std::array" = type { [9 x double] }
%"struct.vox::geometry::SurfaceRayIntersection" = type { i8, double, %"class.vox::geometry::Matrix", %"class.vox::geometry::Matrix" }
%"class.vox::geometry::Matrix.4" = type { double, double }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3vox8geometry6MatrixIdLm3ELm1EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vox8geometrymiIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEES3_EEDaRKNS0_16MatrixExpressionIT_XT0_EXT1_ET2_EERKNS4_IS5_XT0_EXT1_ET3_EE(ptr dead_on_unwind noalias writable sret(%"class.vox::geometry::MatrixElemWiseBinaryOp") align 8, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vox8geometry6MatrixIdLm3ELm1EEC2ILm3ELm1ENS0_22MatrixElemWiseBinaryOpIdLm3ELm1ERKS2_S6_St5minusIdEEEEERKNS0_16MatrixExpressionIdXT_EXT0_ET1_EE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3vox8geometry6MatrixIdLm2ELm1EEC2ERKdS4_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3vox8geometry6MatrixIdLm3ELm1EEC2ERKdS4_S4_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK3vox8geometry9Cylinder315intersectsLocalERKNS0_3RayIdLm3EEE(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef nonnull align 8 dereferenceable(48) %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.vox::geometry::Matrix", align 8
  %4 = alloca %"class.vox::geometry::Matrix", align 8
  %5 = alloca %"class.vox::geometry::MatrixElemWiseBinaryOp", align 8
  %6 = alloca %"class.vox::geometry::BoundingBox.15", align 8
  %7 = alloca %"class.vox::geometry::Plane", align 8
  %8 = alloca %"class.vox::geometry::Matrix", align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca %"class.vox::geometry::Transform", align 8
  %13 = alloca %"class.vox::geometry::Plane", align 8
  %14 = alloca %"class.vox::geometry::Matrix", align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca %"class.vox::geometry::Transform", align 8
  %19 = alloca %"struct.vox::geometry::SurfaceRayIntersection", align 8
  %20 = alloca %"struct.vox::geometry::SurfaceRayIntersection", align 8
  %21 = alloca %"class.vox::geometry::Matrix", align 8
  %22 = alloca %"class.vox::geometry::MatrixElemWiseBinaryOp", align 8
  %23 = alloca %"class.vox::geometry::Matrix.4", align 8
  %24 = alloca %"class.vox::geometry::Matrix", align 8
  %25 = alloca %"class.vox::geometry::Matrix", align 8
  %26 = alloca %"class.vox::geometry::MatrixElemWiseBinaryOp", align 8
  %27 = alloca %"class.vox::geometry::Matrix", align 8
  %28 = alloca %"class.vox::geometry::MatrixElemWiseBinaryOp", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  %29 = getelementptr inbounds i8, ptr %1, i64 24
  call void @_ZN3vox8geometry6MatrixIdLm3ELm1EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %29)
  %30 = getelementptr inbounds i8, ptr %3, i64 8
  store double 0.000000e+00, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  %31 = getelementptr inbounds i8, ptr %0, i64 216
  call void @_ZN3vox8geometrymiIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEES3_EEDaRKNS0_16MatrixExpressionIT_XT0_EXT1_ET2_EERKNS4_IS5_XT0_EXT1_ET3_EE(ptr dead_on_unwind nonnull writable sret(%"class.vox::geometry::MatrixElemWiseBinaryOp") align 8 %5, ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef nonnull align 1 dereferenceable(1) %31)
  call void @_ZN3vox8geometry6MatrixIdLm3ELm1EEC2ILm3ELm1ENS0_22MatrixElemWiseBinaryOpIdLm3ELm1ERKS2_S6_St5minusIdEEEEERKNS0_16MatrixExpressionIdXT_EXT0_ET1_EE(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 1 dereferenceable(1) %5)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  %32 = getelementptr inbounds i8, ptr %4, i64 8
  store double 0.000000e+00, ptr %32, align 8, !tbaa !5
  %33 = call noundef double @_ZNK3vox8geometry16MatrixExpressionIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEEE13lengthSquaredEv(ptr noundef nonnull align 1 dereferenceable(1) %3)
  %34 = call noundef double @_ZNK3vox8geometry16MatrixExpressionIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEEE3dotILm3ELm1ES3_dEENSt9enable_ifIXaaooclL_ZNS0_19isMatrixSizeDynamicILm3ELm1EEEbvEEeqLm1ELi1Eoocl19isMatrixSizeDynamicIXT_EXT0_EEEeqT0_Li1EET2_E4typeERKNS1_IdXT_EXT0_ET1_EE(ptr noundef nonnull align 1 dereferenceable(1) %3, ptr noundef nonnull align 1 dereferenceable(1) %4)
  %35 = call noundef double @_ZNK3vox8geometry16MatrixExpressionIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEEE13lengthSquaredEv(ptr noundef nonnull align 1 dereferenceable(1) %4)
  %36 = getelementptr inbounds i8, ptr %0, i64 240
  %37 = load double, ptr %36, align 8, !tbaa !10
  %38 = call noundef double @_ZN3vox8geometry6squareIdEENSt9enable_ifIXsr3std13is_arithmeticIT_EE5valueES3_E4typeES3_(double noundef %37)
  %39 = fsub double %35, %38
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #7
  call void @_ZNK3vox8geometry7SurfaceILm3EE11boundingBoxEv(ptr dead_on_unwind nonnull writable sret(%"class.vox::geometry::BoundingBox.15") align 8 %6, ptr noundef nonnull align 8 dereferenceable(209) %0)
  call void @llvm.lifetime.start.p0(i64 264, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  store double 0.000000e+00, ptr %9, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  store double 1.000000e+00, ptr %10, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  store double 0.000000e+00, ptr %11, align 8, !tbaa !19
  call void @_ZN3vox8geometry6MatrixIdLm3ELm1EEC2ERKdS4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %40 = getelementptr inbounds i8, ptr %6, i64 24
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %12) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(200) %12, i8 0, i64 200, i1 false)
  call void @_ZN3vox8geometry9TransformILm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(200) %12)
  call void @_ZN3vox8geometry5PlaneILm3EEC1ERKNS0_6MatrixIdLm3ELm1EEES6_RKNS0_9TransformILm3EEEb(ptr noundef nonnull align 8 dereferenceable(264) %7, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %40, ptr noundef nonnull align 8 dereferenceable(200) %12, i1 noundef zeroext false)
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 264, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  store double 0.000000e+00, ptr %15, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #7
  store double -1.000000e+00, ptr %16, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  store double 0.000000e+00, ptr %17, align 8, !tbaa !19
  call void @_ZN3vox8geometry6MatrixIdLm3ELm1EEC2ERKdS4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %18) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(200) %18, i8 0, i64 200, i1 false)
  invoke void @_ZN3vox8geometry9TransformILm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(200) %18)
          to label %41 unwind label %66

41:                                               ; preds = %2
  invoke void @_ZN3vox8geometry5PlaneILm3EEC1ERKNS0_6MatrixIdLm3ELm1EEES6_RKNS0_9TransformILm3EEEb(ptr noundef nonnull align 8 dereferenceable(264) %13, ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(200) %18, i1 noundef zeroext false)
          to label %42 unwind label %66

42:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %19) #7
  invoke void @_ZNK3vox8geometry7SurfaceILm3EE19closestIntersectionERKNS0_3RayIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"struct.vox::geometry::SurfaceRayIntersection") align 8 %19, ptr noundef nonnull align 8 dereferenceable(209) %7, ptr noundef nonnull align 8 dereferenceable(48) %1)
          to label %43 unwind label %68

43:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %20) #7
  invoke void @_ZNK3vox8geometry7SurfaceILm3EE19closestIntersectionERKNS0_3RayIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"struct.vox::geometry::SurfaceRayIntersection") align 8 %20, ptr noundef nonnull align 8 dereferenceable(209) %13, ptr noundef nonnull align 8 dereferenceable(48) %1)
          to label %44 unwind label %70

44:                                               ; preds = %43
  %45 = fcmp olt double %33, 0x3CB0000000000000
  br i1 %45, label %51, label %46

46:                                               ; preds = %44
  %47 = fneg double %33
  %48 = fmul double %39, %47
  %49 = call double @llvm.fmuladd.f64(double %34, double %34, double %48)
  %50 = fcmp olt double %49, 0.000000e+00
  br i1 %50, label %51, label %79

51:                                               ; preds = %46, %44
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %21) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %22) #7
  invoke void @_ZN3vox8geometrymiIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEES3_EEDaRKNS0_16MatrixExpressionIT_XT0_EXT1_ET2_EERKNS4_IS5_XT0_EXT1_ET3_EE(ptr dead_on_unwind nonnull writable sret(%"class.vox::geometry::MatrixElemWiseBinaryOp") align 8 %22, ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %52 unwind label %72

52:                                               ; preds = %51
  invoke void @_ZN3vox8geometry6MatrixIdLm3ELm1EEC2ILm3ELm1ENS0_22MatrixElemWiseBinaryOpIdLm3ELm1ERKS2_S6_St5minusIdEEEEERKNS0_16MatrixExpressionIdXT_EXT0_ET1_EE(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %53 unwind label %72

53:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %23) #7
  %54 = getelementptr inbounds i8, ptr %21, i64 16
  call void @_ZN3vox8geometry6MatrixIdLm2ELm1EEC2ERKdS4_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %54)
  %55 = invoke noundef double @_ZNK3vox8geometry16MatrixExpressionIdLm2ELm1ENS0_6MatrixIdLm2ELm1EEEE13lengthSquaredEv(ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %56 unwind label %74

56:                                               ; preds = %53
  %57 = load double, ptr %36, align 8, !tbaa !10
  %58 = call noundef double @_ZN3vox8geometry6squareIdEENSt9enable_ifIXsr3std13is_arithmeticIT_EE5valueES3_E4typeES3_(double noundef %57)
  %59 = fcmp ugt double %55, %58
  br i1 %59, label %76, label %60

60:                                               ; preds = %56
  %61 = load i8, ptr %19, align 8, !tbaa !20, !range !22, !noundef !23
  %62 = trunc nuw i8 %61 to i1
  br i1 %62, label %77, label %63

63:                                               ; preds = %60
  %64 = load i8, ptr %20, align 8, !tbaa !20, !range !22, !noundef !23
  %65 = trunc nuw i8 %64 to i1
  br i1 %65, label %77, label %76

66:                                               ; preds = %41, %2
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #7
  br label %143

68:                                               ; preds = %42
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %142

70:                                               ; preds = %43
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %141

72:                                               ; preds = %52, %51
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #7
  br label %78

74:                                               ; preds = %53
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #7
  br label %78

76:                                               ; preds = %63, %56
  br label %77

77:                                               ; preds = %60, %63, %76
  %.033 = phi i1 [ false, %76 ], [ true, %63 ], [ true, %60 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #7
  br label %140

78:                                               ; preds = %74, %72
  %.pn57 = phi { ptr, i32 } [ %75, %74 ], [ %73, %72 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #7
  br label %141

79:                                               ; preds = %46
  %80 = fneg double %34
  %81 = call double @sqrt(double noundef %49) #7
  %82 = call double @sqrt(double noundef %49) #7
  %83 = fsub double %80, %82
  %84 = fdiv double %83, %33
  %85 = fcmp olt double %84, 0.000000e+00
  %86 = fsub double %81, %34
  %87 = fdiv double %86, %33
  %.0 = select i1 %85, double %87, double %84
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %24) #7
  invoke void @_ZNK3vox8geometry3RayIdLm3EE7pointAtEd(ptr dead_on_unwind nonnull writable sret(%"class.vox::geometry::Matrix") align 8 %24, ptr noundef nonnull align 8 dereferenceable(48) %1, double noundef %.0)
          to label %88 unwind label %99

88:                                               ; preds = %79
  %89 = getelementptr inbounds i8, ptr %24, i64 8
  %90 = load double, ptr %89, align 8, !tbaa !5
  %91 = getelementptr inbounds i8, ptr %0, i64 224
  %92 = load double, ptr %91, align 8, !tbaa !24
  %93 = getelementptr inbounds i8, ptr %0, i64 248
  %94 = load double, ptr %93, align 8, !tbaa !25
  %95 = call double @llvm.fmuladd.f64(double %94, double -5.000000e-01, double %92)
  %96 = fcmp ult double %90, %95
  %97 = call double @llvm.fmuladd.f64(double %94, double 5.000000e-01, double %92)
  %98 = fcmp ugt double %90, %97
  %or.cond = select i1 %96, i1 %98, i1 false
  br i1 %or.cond, label %101, label %138

99:                                               ; preds = %79
  %100 = landingpad { ptr, i32 }
          cleanup
  br label %139

101:                                              ; preds = %88
  %102 = load i8, ptr %19, align 8, !tbaa !20, !range !22, !noundef !23
  %103 = trunc nuw i8 %102 to i1
  br i1 %103, label %104, label %119

104:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %25) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %26) #7
  %105 = getelementptr inbounds i8, ptr %19, i64 16
  invoke void @_ZN3vox8geometrymiIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEES3_EEDaRKNS0_16MatrixExpressionIT_XT0_EXT1_ET2_EERKNS4_IS5_XT0_EXT1_ET3_EE(ptr dead_on_unwind nonnull writable sret(%"class.vox::geometry::MatrixElemWiseBinaryOp") align 8 %26, ptr noundef nonnull align 1 dereferenceable(1) %105, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %106 unwind label %114

106:                                              ; preds = %104
  invoke void @_ZN3vox8geometry6MatrixIdLm3ELm1EEC2ILm3ELm1ENS0_22MatrixElemWiseBinaryOpIdLm3ELm1ERKS2_S6_St5minusIdEEEEERKNS0_16MatrixExpressionIdXT_EXT0_ET1_EE(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %107 unwind label %114

107:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %26) #7
  %108 = getelementptr inbounds i8, ptr %25, i64 8
  store double 0.000000e+00, ptr %108, align 8, !tbaa !5
  %109 = invoke noundef double @_ZNK3vox8geometry16MatrixExpressionIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEEE13lengthSquaredEv(ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %110 unwind label %116

110:                                              ; preds = %107
  %111 = load double, ptr %36, align 8, !tbaa !10
  %112 = call noundef double @_ZN3vox8geometry6squareIdEENSt9enable_ifIXsr3std13is_arithmeticIT_EE5valueES3_E4typeES3_(double noundef %111)
  %113 = fcmp ugt double %109, %112
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %25) #7
  br i1 %113, label %119, label %138

114:                                              ; preds = %106, %104
  %115 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %26) #7
  br label %118

116:                                              ; preds = %107
  %117 = landingpad { ptr, i32 }
          cleanup
  br label %118

118:                                              ; preds = %116, %114
  %.pn = phi { ptr, i32 } [ %117, %116 ], [ %115, %114 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %25) #7
  br label %139

119:                                              ; preds = %110, %101
  %120 = load i8, ptr %20, align 8, !tbaa !20, !range !22, !noundef !23
  %121 = trunc nuw i8 %120 to i1
  br i1 %121, label %122, label %137

122:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %27) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %28) #7
  %123 = getelementptr inbounds i8, ptr %20, i64 16
  invoke void @_ZN3vox8geometrymiIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEES3_EEDaRKNS0_16MatrixExpressionIT_XT0_EXT1_ET2_EERKNS4_IS5_XT0_EXT1_ET3_EE(ptr dead_on_unwind nonnull writable sret(%"class.vox::geometry::MatrixElemWiseBinaryOp") align 8 %28, ptr noundef nonnull align 1 dereferenceable(1) %123, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %124 unwind label %132

124:                                              ; preds = %122
  invoke void @_ZN3vox8geometry6MatrixIdLm3ELm1EEC2ILm3ELm1ENS0_22MatrixElemWiseBinaryOpIdLm3ELm1ERKS2_S6_St5minusIdEEEEERKNS0_16MatrixExpressionIdXT_EXT0_ET1_EE(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %125 unwind label %132

125:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %28) #7
  %126 = getelementptr inbounds i8, ptr %27, i64 8
  store double 0.000000e+00, ptr %126, align 8, !tbaa !5
  %127 = invoke noundef double @_ZNK3vox8geometry16MatrixExpressionIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEEE13lengthSquaredEv(ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %128 unwind label %134

128:                                              ; preds = %125
  %129 = load double, ptr %36, align 8, !tbaa !10
  %130 = call noundef double @_ZN3vox8geometry6squareIdEENSt9enable_ifIXsr3std13is_arithmeticIT_EE5valueES3_E4typeES3_(double noundef %129)
  %131 = fcmp ugt double %127, %130
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %27) #7
  br i1 %131, label %137, label %138

132:                                              ; preds = %124, %122
  %133 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %28) #7
  br label %136

134:                                              ; preds = %125
  %135 = landingpad { ptr, i32 }
          cleanup
  br label %136

136:                                              ; preds = %134, %132
  %.pn54 = phi { ptr, i32 } [ %135, %134 ], [ %133, %132 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %27) #7
  br label %139

137:                                              ; preds = %128, %119
  br label %138

138:                                              ; preds = %88, %110, %128, %137
  %.4 = phi i1 [ false, %137 ], [ true, %128 ], [ true, %110 ], [ true, %88 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %24) #7
  br label %140

139:                                              ; preds = %136, %118, %99
  %.pn54.pn = phi { ptr, i32 } [ %.pn54, %136 ], [ %.pn, %118 ], [ %100, %99 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %24) #7
  br label %141

140:                                              ; preds = %138, %77
  %.5 = phi i1 [ %.033, %77 ], [ %.4, %138 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %19) #7
  call void @_ZN3vox8geometry7SurfaceILm3EED2Ev(ptr noundef nonnull align 8 dereferenceable(264) %13) #7
  call void @llvm.lifetime.end.p0(i64 264, ptr nonnull %13) #7
  call void @_ZN3vox8geometry7SurfaceILm3EED2Ev(ptr noundef nonnull align 8 dereferenceable(264) %7) #7
  call void @llvm.lifetime.end.p0(i64 264, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  ret i1 %.5

141:                                              ; preds = %139, %78, %70
  %.pn57.pn = phi { ptr, i32 } [ %.pn57, %78 ], [ %.pn54.pn, %139 ], [ %71, %70 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %20) #7
  br label %142

142:                                              ; preds = %141, %68
  %.pn57.pn.pn = phi { ptr, i32 } [ %.pn57.pn, %141 ], [ %69, %68 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %19) #7
  call void @_ZN3vox8geometry7SurfaceILm3EED2Ev(ptr noundef nonnull align 8 dereferenceable(264) %13) #7
  br label %143

143:                                              ; preds = %142, %66
  %.pn57.pn.pn.pn = phi { ptr, i32 } [ %.pn57.pn.pn, %142 ], [ %67, %66 ]
  call void @llvm.lifetime.end.p0(i64 264, ptr nonnull %13) #7
  call void @_ZN3vox8geometry7SurfaceILm3EED2Ev(ptr noundef nonnull align 8 dereferenceable(264) %7) #7
  call void @llvm.lifetime.end.p0(i64 264, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn57.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK3vox8geometry16MatrixExpressionIdLm3ELm1ENS0_6MatrixIdLm3ELm1EEEE13lengthSquaredEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN3vox8geometry6squareIdEENSt9enable_ifIXsr3std13is_arithmeticIT_EE5valueES3_E4typeES3_(double noundef) local_unnamed_addr #0

declare void @_ZNK3vox8geometry7SurfaceILm3EE11boundingBoxEv(ptr dead_on_unwind writable sret(%"class.vox::geometry::BoundingBox.15") align 8, ptr noundef nonnull align 8 dereferenceable(209)) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vox8geometry9TransformILm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #2 align 2

declare void @_ZN3vox8geometry5PlaneILm3EEC1ERKNS0_6MatrixIdLm3ELm1EEES6_RKNS0_9TransformILm3EEEb(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(200), i1 noundef zeroext) unnamed_addr #6

declare void @_ZNK3vox8geometry7SurfaceILm3EE19closestIntersectionERKNS0_3RayIdLm3EEE(ptr dead_on_unwind writable sret(%"struct.vox::geometry::SurfaceRayIntersection") align 8, ptr noundef nonnull align 8 dereferenceable(209), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK3vox8geometry16MatrixExpressionIdLm2ELm1ENS0_6MatrixIdLm2ELm1EEEE13lengthSquaredEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3vox8geometry3RayIdLm3EE7pointAtEd(ptr dead_on_unwind noalias writable sret(%"class.vox::geometry::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(48), double noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3vox8geometry7SurfaceILm3EED2Ev(ptr noundef nonnull align 8 dereferenceable(209)) unnamed_addr #0 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { "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 #7 = { 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, !7, i64 8}
!6 = !{!"_ZTSN3vox8geometry6MatrixIdLm3ELm1EEE", !7, i64 0, !7, i64 8, !7, i64 16}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !7, i64 240}
!11 = !{!"_ZTSN3vox8geometry9Cylinder3E", !12, i64 0, !6, i64 216, !7, i64 240, !7, i64 248}
!12 = !{!"_ZTSN3vox8geometry7SurfaceILm3EEE", !13, i64 8, !18, i64 208}
!13 = !{!"_ZTSN3vox8geometry9TransformILm3EEE", !6, i64 0, !14, i64 24}
!14 = !{!"_ZTSN3vox8geometry11OrientationILm3EEE", !15, i64 0, !16, i64 32, !16, i64 104}
!15 = !{!"_ZTSN3vox8geometry10QuaternionIdEE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!16 = !{!"_ZTSN3vox8geometry6MatrixIdLm3ELm3EEE", !17, i64 0}
!17 = !{!"_ZTSSt5arrayIdLm9EE", !8, i64 0}
!18 = !{!"bool", !8, i64 0}
!19 = !{!7, !7, i64 0}
!20 = !{!21, !18, i64 0}
!21 = !{!"_ZTSN3vox8geometry22SurfaceRayIntersectionILm3EEE", !18, i64 0, !7, i64 8, !6, i64 16, !6, i64 40}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!11, !7, i64 224}
!25 = !{!11, !7, i64 248}


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