; LLVM IR from atlantis13579/Riemann :: Src/CollisionPrimitive (Sphere3)

; 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.Maths::TVector3" = type { float, float, float }
%"class.Riemann::Sphere3" = type { %"class.Maths::TVector3", float }
%"class.Riemann::Capsule3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3", float, float }

@.str.1 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@__PRETTY_FUNCTION__._ZNK7Riemann7Sphere39SweepQuadERKN5Maths8TVector3IfEES5_S5_S5_S5_PS3_S6_Pf = external hidden unnamed_addr constant [155 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann7Sphere312IntersectRayERKN5Maths8TVector3IfEES5_Pf(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef) #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: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12)) #3 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), float noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK5Maths8TVector3IfE3DotERKS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann7Sphere3C2ERKN5Maths8TVector3IfEEf(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12), float noundef) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEngEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann8Capsule3C2ERKN5Maths8TVector3IfEES5_f(ptr noundef nonnull align 4 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), float noundef) unnamed_addr #0 align 2

declare noundef zeroext i1 @_ZNK7Riemann8Capsule312IntersectRayERKN5Maths8TVector3IfEES5_Pf(ptr noundef nonnull align 4 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann9Triangle315CalculateNormalERKN5Maths8TVector3IfEES5_S5_b(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), i1 noundef zeroext) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN7RiemannL16EdgeOrVertexTestERKN5Maths8TVector3IfEEPS3_iiiPi(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK7Riemann7Sphere39SweepQuadERKN5Maths8TVector3IfEES5_S5_S5_S5_PS3_S6_Pf(ptr noundef nonnull align 4 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #0 align 2 {
  %10 = alloca i1, align 1
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca %"class.Maths::TVector3", align 4
  %21 = alloca %"class.Maths::TVector3", align 4
  %22 = alloca ptr, align 8
  %23 = alloca float, align 4
  %24 = alloca %"class.Maths::TVector3", align 4
  %25 = alloca %"class.Maths::TVector3", align 4
  %26 = alloca i32, align 4
  %27 = alloca %"class.Maths::TVector3", align 4
  %28 = alloca %"class.Maths::TVector3", align 4
  %29 = alloca %"class.Maths::TVector3", align 4
  %30 = alloca %"class.Maths::TVector3", align 4
  %31 = alloca %"class.Maths::TVector3", align 4
  %32 = alloca float, align 4
  %33 = alloca float, align 4
  %34 = alloca float, align 4
  %35 = alloca i32, align 4
  %36 = alloca %"class.Maths::TVector3", align 4
  %37 = alloca i8, align 1
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca [4 x %"class.Maths::TVector3"], align 16
  %41 = alloca %"class.Maths::TVector3", align 4
  %42 = alloca %"class.Maths::TVector3", align 4
  %43 = alloca %"class.Maths::TVector3", align 4
  %44 = alloca %"class.Maths::TVector3", align 4
  %45 = alloca %"class.Maths::TVector3", align 4
  %46 = alloca %"class.Maths::TVector3", align 4
  %47 = alloca %"class.Maths::TVector3", align 4
  %48 = alloca %"class.Maths::TVector3", align 4
  %49 = alloca %"class.Maths::TVector3", align 4
  %50 = alloca %"class.Maths::TVector3", align 4
  %51 = alloca %"class.Maths::TVector3", align 4
  %52 = alloca %"class.Maths::TVector3", align 4
  %53 = alloca %"class.Maths::TVector3", align 4
  %54 = alloca %"class.Maths::TVector3", align 4
  %55 = alloca %"class.Maths::TVector3", align 4
  %56 = alloca %"class.Maths::TVector3", align 4
  %57 = alloca %"class.Maths::TVector3", align 4
  %58 = alloca %"class.Maths::TVector3", align 4
  %59 = alloca %"class.Maths::TVector3", align 4
  %60 = alloca %"class.Maths::TVector3", align 4
  %61 = alloca %"class.Riemann::Sphere3", align 4
  %62 = alloca %"class.Riemann::Capsule3", align 4
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %2, ptr %13, align 8, !tbaa !5
  store ptr %3, ptr %14, align 8, !tbaa !5
  store ptr %4, ptr %15, align 8, !tbaa !5
  store ptr %5, ptr %16, align 8, !tbaa !5
  store ptr %6, ptr %17, align 8, !tbaa !5
  store ptr %7, ptr %18, align 8, !tbaa !5
  store ptr %8, ptr %19, align 8, !tbaa !5
  %63 = load ptr, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #6
  %64 = load ptr, ptr %14, align 8, !tbaa !5
  %65 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %20, ptr noundef nonnull align 4 dereferenceable(12) %64, ptr noundef nonnull align 4 dereferenceable(12) %65)
  call void @llvm.lifetime.start.p0(i64 12, ptr %21) #6
  %66 = load ptr, ptr %15, align 8, !tbaa !5
  %67 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %21, ptr noundef nonnull align 4 dereferenceable(12) %66, ptr noundef nonnull align 4 dereferenceable(12) %67)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %68 = getelementptr inbounds %"class.Riemann::Sphere3", ptr %63, i32 0, i32 0
  store ptr %68, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %69 = getelementptr inbounds %"class.Riemann::Sphere3", ptr %63, i32 0, i32 1
  %70 = load float, ptr %69, align 4, !tbaa !9
  %71 = getelementptr inbounds %"class.Riemann::Sphere3", ptr %63, i32 0, i32 1
  %72 = load float, ptr %71, align 4, !tbaa !9
  %73 = fmul float %70, %72
  store float %73, ptr %23, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #6
  %74 = load ptr, ptr %22, align 8, !tbaa !5
  %75 = load ptr, ptr %13, align 8, !tbaa !5
  %76 = load ptr, ptr %14, align 8, !tbaa !5
  %77 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZN7Riemann9Triangle329ClosestPointOnTriangleToPointERKN5Maths8TVector3IfEES5_S5_S5_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %24, ptr noundef nonnull align 4 dereferenceable(12) %74, ptr noundef nonnull align 4 dereferenceable(12) %75, ptr noundef nonnull align 4 dereferenceable(12) %76, ptr noundef nonnull align 4 dereferenceable(12) %77)
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #6
  %78 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %25, ptr noundef nonnull align 4 dereferenceable(12) %24, ptr noundef nonnull align 4 dereferenceable(12) %78)
  %79 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %25)
  %80 = load float, ptr %23, align 4, !tbaa !13
  %81 = fcmp ole float %79, %80
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #6
  br i1 %81, label %82, label %84

82:                                               ; preds = %9
  %83 = load ptr, ptr %19, align 8, !tbaa !5
  store float 0.000000e+00, ptr %83, align 4, !tbaa !13
  store i1 true, ptr %10, align 1
  store i32 1, ptr %26, align 4
  br label %262

84:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 12, ptr %27) #6
  %85 = load ptr, ptr %22, align 8, !tbaa !5
  %86 = load ptr, ptr %16, align 8, !tbaa !5
  %87 = load ptr, ptr %15, align 8, !tbaa !5
  %88 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN7Riemann9Triangle329ClosestPointOnTriangleToPointERKN5Maths8TVector3IfEES5_S5_S5_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %27, ptr noundef nonnull align 4 dereferenceable(12) %85, ptr noundef nonnull align 4 dereferenceable(12) %86, ptr noundef nonnull align 4 dereferenceable(12) %87, ptr noundef nonnull align 4 dereferenceable(12) %88)
  %89 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %24, ptr noundef nonnull align 4 dereferenceable(12) %27)
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %28) #6
  %90 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %28, ptr noundef nonnull align 4 dereferenceable(12) %24, ptr noundef nonnull align 4 dereferenceable(12) %90)
  %91 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %28)
  %92 = load float, ptr %23, align 4, !tbaa !13
  %93 = fcmp ole float %91, %92
  call void @llvm.lifetime.end.p0(i64 12, ptr %28) #6
  br i1 %93, label %94, label %96

94:                                               ; preds = %84
  %95 = load ptr, ptr %19, align 8, !tbaa !5
  store float 0.000000e+00, ptr %95, align 4, !tbaa !13
  store i1 true, ptr %10, align 1
  store i32 1, ptr %26, align 4
  br label %262

96:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 12, ptr %29) #6
  %97 = load ptr, ptr %13, align 8, !tbaa !5
  %98 = load ptr, ptr %14, align 8, !tbaa !5
  %99 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZN7Riemann9Triangle315CalculateNormalERKN5Maths8TVector3IfEES5_S5_b(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %29, ptr noundef nonnull align 4 dereferenceable(12) %97, ptr noundef nonnull align 4 dereferenceable(12) %98, ptr noundef nonnull align 4 dereferenceable(12) %99, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %30) #6
  %100 = getelementptr inbounds %"class.Riemann::Sphere3", ptr %63, i32 0, i32 1
  %101 = load float, ptr %100, align 4, !tbaa !9
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %30, ptr noundef nonnull align 4 dereferenceable(12) %29, float noundef %101)
  %102 = load ptr, ptr %12, align 8, !tbaa !5
  %103 = call noundef float @_ZNK5Maths8TVector3IfE3DotERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %102, ptr noundef nonnull align 4 dereferenceable(12) %30)
  %104 = fcmp oge float %103, 0.000000e+00
  br i1 %104, label %105, label %107

105:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 12, ptr %31) #6
  call void @_ZNK5Maths8TVector3IfEngEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %31, ptr noundef nonnull align 4 dereferenceable(12) %30)
  %106 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %30, ptr noundef nonnull align 4 dereferenceable(12) %31)
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #6
  br label %107

107:                                              ; preds = %105, %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %36) #6
  %108 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %36, ptr noundef nonnull align 4 dereferenceable(12) %108, ptr noundef nonnull align 4 dereferenceable(12) %30)
  %109 = load ptr, ptr %12, align 8, !tbaa !5
  %110 = load ptr, ptr %13, align 8, !tbaa !5
  %111 = call noundef i32 @_ZN5Quad317RayIntersectQuad2ERKN5Maths8TVector3IfEES4_S4_S4_S4_PfS5_S5_(ptr noundef nonnull align 4 dereferenceable(12) %36, ptr noundef nonnull align 4 dereferenceable(12) %109, ptr noundef nonnull align 4 dereferenceable(12) %110, ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %21, ptr noundef %32, ptr noundef %34, ptr noundef %33)
  call void @llvm.lifetime.end.p0(i64 12, ptr %36) #6
  store i32 %111, ptr %35, align 4, !tbaa !14
  %112 = load i32, ptr %35, align 4, !tbaa !14
  %113 = icmp eq i32 %112, 0
  br i1 %113, label %114, label %115

114:                                              ; preds = %107
  store i1 false, ptr %10, align 1
  store i32 1, ptr %26, align 4
  br label %261

115:                                              ; preds = %107
  %116 = load i32, ptr %35, align 4, !tbaa !14
  %117 = icmp eq i32 %116, 2
  br i1 %117, label %118, label %125

118:                                              ; preds = %115
  %119 = load float, ptr %32, align 4, !tbaa !13
  %120 = fcmp olt float %119, 0.000000e+00
  br i1 %120, label %121, label %122

121:                                              ; preds = %118
  store i1 false, ptr %10, align 1
  store i32 1, ptr %26, align 4
  br label %261

122:                                              ; preds = %118
  %123 = load float, ptr %32, align 4, !tbaa !13
  %124 = load ptr, ptr %19, align 8, !tbaa !5
  store float %123, ptr %124, align 4, !tbaa !13
  store i1 true, ptr %10, align 1
  store i32 1, ptr %26, align 4
  br label %261

125:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 1, ptr %37) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr %40) #6
  %126 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %40, ptr noundef nonnull align 4 dereferenceable(12) %126)
  %127 = getelementptr inbounds %"class.Maths::TVector3", ptr %40, i64 1
  %128 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %127, ptr noundef nonnull align 4 dereferenceable(12) %128)
  %129 = getelementptr inbounds %"class.Maths::TVector3", ptr %40, i64 2
  %130 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %129, ptr noundef nonnull align 4 dereferenceable(12) %130)
  %131 = getelementptr inbounds %"class.Maths::TVector3", ptr %40, i64 3
  %132 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %131, ptr noundef nonnull align 4 dereferenceable(12) %132)
  %133 = load float, ptr %33, align 4, !tbaa !13
  %134 = fcmp olt float %133, 0.000000e+00
  br i1 %134, label %135, label %170

135:                                              ; preds = %125
  %136 = load float, ptr %34, align 4, !tbaa !13
  %137 = fcmp olt float %136, 0.000000e+00
  br i1 %137, label %138, label %151

138:                                              ; preds = %135
  store i32 0, ptr %38, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 12, ptr %41) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %42) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %43) #6
  %139 = load ptr, ptr %13, align 8, !tbaa !5
  %140 = load float, ptr %33, align 4, !tbaa !13
  %141 = fsub float 1.000000e+00, %140
  %142 = load float, ptr %34, align 4, !tbaa !13
  %143 = fsub float %141, %142
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %43, ptr noundef nonnull align 4 dereferenceable(12) %139, float noundef %143)
  call void @llvm.lifetime.start.p0(i64 12, ptr %44) #6
  %144 = load ptr, ptr %14, align 8, !tbaa !5
  %145 = load float, ptr %33, align 4, !tbaa !13
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %44, ptr noundef nonnull align 4 dereferenceable(12) %144, float noundef %145)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %42, ptr noundef nonnull align 4 dereferenceable(12) %43, ptr noundef nonnull align 4 dereferenceable(12) %44)
  call void @llvm.lifetime.start.p0(i64 12, ptr %45) #6
  %146 = load ptr, ptr %15, align 8, !tbaa !5
  %147 = load float, ptr %34, align 4, !tbaa !13
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %45, ptr noundef nonnull align 4 dereferenceable(12) %146, float noundef %147)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %41, ptr noundef nonnull align 4 dereferenceable(12) %42, ptr noundef nonnull align 4 dereferenceable(12) %45)
  call void @llvm.lifetime.end.p0(i64 12, ptr %45) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %44) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %43) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %42) #6
  %148 = getelementptr inbounds [4 x %"class.Maths::TVector3"], ptr %40, i64 0, i64 0
  %149 = call noundef zeroext i1 @_ZN7RiemannL16EdgeOrVertexTestERKN5Maths8TVector3IfEEPS3_iiiPi(ptr noundef nonnull align 4 dereferenceable(12) %41, ptr noundef %148, i32 noundef 0, i32 noundef 1, i32 noundef 2, ptr noundef %39)
  %150 = zext i1 %149 to i8
  store i8 %150, ptr %37, align 1, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 12, ptr %41) #6
  br label %169

151:                                              ; preds = %135
  %152 = load float, ptr %34, align 4, !tbaa !13
  %153 = fcmp ogt float %152, 1.000000e+00
  br i1 %153, label %154, label %167

154:                                              ; preds = %151
  store i32 1, ptr %38, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 12, ptr %46) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %47) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %48) #6
  %155 = load ptr, ptr %13, align 8, !tbaa !5
  %156 = load float, ptr %33, align 4, !tbaa !13
  %157 = fsub float 1.000000e+00, %156
  %158 = load float, ptr %34, align 4, !tbaa !13
  %159 = fsub float %157, %158
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %48, ptr noundef nonnull align 4 dereferenceable(12) %155, float noundef %159)
  call void @llvm.lifetime.start.p0(i64 12, ptr %49) #6
  %160 = load ptr, ptr %14, align 8, !tbaa !5
  %161 = load float, ptr %33, align 4, !tbaa !13
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %49, ptr noundef nonnull align 4 dereferenceable(12) %160, float noundef %161)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %47, ptr noundef nonnull align 4 dereferenceable(12) %48, ptr noundef nonnull align 4 dereferenceable(12) %49)
  call void @llvm.lifetime.start.p0(i64 12, ptr %50) #6
  %162 = load ptr, ptr %15, align 8, !tbaa !5
  %163 = load float, ptr %34, align 4, !tbaa !13
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %50, ptr noundef nonnull align 4 dereferenceable(12) %162, float noundef %163)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %46, ptr noundef nonnull align 4 dereferenceable(12) %47, ptr noundef nonnull align 4 dereferenceable(12) %50)
  call void @llvm.lifetime.end.p0(i64 12, ptr %50) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %49) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %48) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %47) #6
  %164 = getelementptr inbounds [4 x %"class.Maths::TVector3"], ptr %40, i64 0, i64 0
  %165 = call noundef zeroext i1 @_ZN7RiemannL16EdgeOrVertexTestERKN5Maths8TVector3IfEEPS3_iiiPi(ptr noundef nonnull align 4 dereferenceable(12) %46, ptr noundef %164, i32 noundef 1, i32 noundef 0, i32 noundef 3, ptr noundef %39)
  %166 = zext i1 %165 to i8
  store i8 %166, ptr %37, align 1, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 12, ptr %46) #6
  br label %168

167:                                              ; preds = %151
  store i8 0, ptr %37, align 1, !tbaa !16
  store i32 0, ptr %38, align 4, !tbaa !14
  store i32 1, ptr %39, align 4, !tbaa !14
  br label %168

168:                                              ; preds = %167, %154
  br label %169

169:                                              ; preds = %168, %138
  br label %221

170:                                              ; preds = %125
  %171 = load float, ptr %33, align 4, !tbaa !13
  %172 = fcmp ogt float %171, 1.000000e+00
  br i1 %172, label %173, label %208

173:                                              ; preds = %170
  %174 = load float, ptr %34, align 4, !tbaa !13
  %175 = fcmp olt float %174, 0.000000e+00
  br i1 %175, label %176, label %189

176:                                              ; preds = %173
  store i32 2, ptr %38, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 12, ptr %51) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %52) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %53) #6
  %177 = load ptr, ptr %13, align 8, !tbaa !5
  %178 = load float, ptr %33, align 4, !tbaa !13
  %179 = fsub float 1.000000e+00, %178
  %180 = load float, ptr %34, align 4, !tbaa !13
  %181 = fsub float %179, %180
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %53, ptr noundef nonnull align 4 dereferenceable(12) %177, float noundef %181)
  call void @llvm.lifetime.start.p0(i64 12, ptr %54) #6
  %182 = load ptr, ptr %14, align 8, !tbaa !5
  %183 = load float, ptr %33, align 4, !tbaa !13
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %54, ptr noundef nonnull align 4 dereferenceable(12) %182, float noundef %183)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %52, ptr noundef nonnull align 4 dereferenceable(12) %53, ptr noundef nonnull align 4 dereferenceable(12) %54)
  call void @llvm.lifetime.start.p0(i64 12, ptr %55) #6
  %184 = load ptr, ptr %15, align 8, !tbaa !5
  %185 = load float, ptr %34, align 4, !tbaa !13
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %55, ptr noundef nonnull align 4 dereferenceable(12) %184, float noundef %185)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %51, ptr noundef nonnull align 4 dereferenceable(12) %52, ptr noundef nonnull align 4 dereferenceable(12) %55)
  call void @llvm.lifetime.end.p0(i64 12, ptr %55) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %54) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %53) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %52) #6
  %186 = getelementptr inbounds [4 x %"class.Maths::TVector3"], ptr %40, i64 0, i64 0
  %187 = call noundef zeroext i1 @_ZN7RiemannL16EdgeOrVertexTestERKN5Maths8TVector3IfEEPS3_iiiPi(ptr noundef nonnull align 4 dereferenceable(12) %51, ptr noundef %186, i32 noundef 2, i32 noundef 0, i32 noundef 3, ptr noundef %39)
  %188 = zext i1 %187 to i8
  store i8 %188, ptr %37, align 1, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 12, ptr %51) #6
  br label %207

189:                                              ; preds = %173
  %190 = load float, ptr %34, align 4, !tbaa !13
  %191 = fcmp ogt float %190, 1.000000e+00
  br i1 %191, label %192, label %205

192:                                              ; preds = %189
  store i32 3, ptr %38, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 12, ptr %56) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %57) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %58) #6
  %193 = load ptr, ptr %13, align 8, !tbaa !5
  %194 = load float, ptr %33, align 4, !tbaa !13
  %195 = fsub float 1.000000e+00, %194
  %196 = load float, ptr %34, align 4, !tbaa !13
  %197 = fsub float %195, %196
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %58, ptr noundef nonnull align 4 dereferenceable(12) %193, float noundef %197)
  call void @llvm.lifetime.start.p0(i64 12, ptr %59) #6
  %198 = load ptr, ptr %14, align 8, !tbaa !5
  %199 = load float, ptr %33, align 4, !tbaa !13
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %59, ptr noundef nonnull align 4 dereferenceable(12) %198, float noundef %199)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %57, ptr noundef nonnull align 4 dereferenceable(12) %58, ptr noundef nonnull align 4 dereferenceable(12) %59)
  call void @llvm.lifetime.start.p0(i64 12, ptr %60) #6
  %200 = load ptr, ptr %15, align 8, !tbaa !5
  %201 = load float, ptr %34, align 4, !tbaa !13
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %60, ptr noundef nonnull align 4 dereferenceable(12) %200, float noundef %201)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %56, ptr noundef nonnull align 4 dereferenceable(12) %57, ptr noundef nonnull align 4 dereferenceable(12) %60)
  call void @llvm.lifetime.end.p0(i64 12, ptr %60) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %59) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %58) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %57) #6
  %202 = getelementptr inbounds [4 x %"class.Maths::TVector3"], ptr %40, i64 0, i64 0
  %203 = call noundef zeroext i1 @_ZN7RiemannL16EdgeOrVertexTestERKN5Maths8TVector3IfEEPS3_iiiPi(ptr noundef nonnull align 4 dereferenceable(12) %56, ptr noundef %202, i32 noundef 3, i32 noundef 1, i32 noundef 2, ptr noundef %39)
  %204 = zext i1 %203 to i8
  store i8 %204, ptr %37, align 1, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 12, ptr %56) #6
  br label %206

205:                                              ; preds = %189
  store i8 0, ptr %37, align 1, !tbaa !16
  store i32 2, ptr %38, align 4, !tbaa !14
  store i32 3, ptr %39, align 4, !tbaa !14
  br label %206

206:                                              ; preds = %205, %192
  br label %207

207:                                              ; preds = %206, %176
  br label %220

208:                                              ; preds = %170
  %209 = load float, ptr %34, align 4, !tbaa !13
  %210 = fcmp olt float %209, 0.000000e+00
  br i1 %210, label %211, label %212

211:                                              ; preds = %208
  store i8 0, ptr %37, align 1, !tbaa !16
  store i32 0, ptr %38, align 4, !tbaa !14
  store i32 2, ptr %39, align 4, !tbaa !14
  br label %219

212:                                              ; preds = %208
  %213 = load float, ptr %34, align 4, !tbaa !13
  %214 = fcmp oge float %213, 1.000000e+00
  br i1 %214, label %215, label %216

215:                                              ; preds = %212
  br label %218

216:                                              ; preds = %212
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 692, ptr noundef @__PRETTY_FUNCTION__._ZNK7Riemann7Sphere39SweepQuadERKN5Maths8TVector3IfEES5_S5_S5_S5_PS3_S6_Pf) #7
  unreachable

217:                                              ; No predecessors!
  br label %218

218:                                              ; preds = %217, %215
  store i8 0, ptr %37, align 1, !tbaa !16
  store i32 1, ptr %38, align 4, !tbaa !14
  store i32 3, ptr %39, align 4, !tbaa !14
  br label %219

219:                                              ; preds = %218, %211
  br label %220

220:                                              ; preds = %219, %207
  br label %221

221:                                              ; preds = %220, %169
  %222 = load i8, ptr %37, align 1, !tbaa !16, !range !18, !noundef !19
  %223 = trunc i8 %222 to i1
  br i1 %223, label %224, label %240

224:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 16, ptr %61) #6
  %225 = load i32, ptr %38, align 4, !tbaa !14
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [4 x %"class.Maths::TVector3"], ptr %40, i64 0, i64 %226
  %228 = getelementptr inbounds %"class.Riemann::Sphere3", ptr %63, i32 0, i32 1
  %229 = load float, ptr %228, align 4, !tbaa !9
  call void @_ZN7Riemann7Sphere3C2ERKN5Maths8TVector3IfEEf(ptr noundef nonnull align 4 dereferenceable(16) %61, ptr noundef nonnull align 4 dereferenceable(12) %227, float noundef %229)
  %230 = load ptr, ptr %22, align 8, !tbaa !5
  %231 = load ptr, ptr %12, align 8, !tbaa !5
  %232 = call noundef zeroext i1 @_ZNK7Riemann7Sphere312IntersectRayERKN5Maths8TVector3IfEES5_Pf(ptr noundef nonnull align 4 dereferenceable(16) %61, ptr noundef nonnull align 4 dereferenceable(12) %230, ptr noundef nonnull align 4 dereferenceable(12) %231, ptr noundef %32)
  br i1 %232, label %233, label %236

233:                                              ; preds = %224
  %234 = load float, ptr %32, align 4, !tbaa !13
  %235 = load ptr, ptr %19, align 8, !tbaa !5
  store float %234, ptr %235, align 4, !tbaa !13
  store i1 true, ptr %10, align 1
  store i32 1, ptr %26, align 4
  br label %237

236:                                              ; preds = %224
  store i32 0, ptr %26, align 4
  br label %237

237:                                              ; preds = %236, %233
  call void @llvm.lifetime.end.p0(i64 16, ptr %61) #6
  %238 = load i32, ptr %26, align 4
  switch i32 %238, label %260 [
    i32 0, label %239
  ]

239:                                              ; preds = %237
  br label %259

240:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 32, ptr %62) #6
  %241 = load i32, ptr %38, align 4, !tbaa !14
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds [4 x %"class.Maths::TVector3"], ptr %40, i64 0, i64 %242
  %244 = load i32, ptr %39, align 4, !tbaa !14
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [4 x %"class.Maths::TVector3"], ptr %40, i64 0, i64 %245
  %247 = getelementptr inbounds %"class.Riemann::Sphere3", ptr %63, i32 0, i32 1
  %248 = load float, ptr %247, align 4, !tbaa !9
  call void @_ZN7Riemann8Capsule3C2ERKN5Maths8TVector3IfEES5_f(ptr noundef nonnull align 4 dereferenceable(32) %62, ptr noundef nonnull align 4 dereferenceable(12) %243, ptr noundef nonnull align 4 dereferenceable(12) %246, float noundef %248)
  %249 = load ptr, ptr %22, align 8, !tbaa !5
  %250 = load ptr, ptr %12, align 8, !tbaa !5
  %251 = call noundef zeroext i1 @_ZNK7Riemann8Capsule312IntersectRayERKN5Maths8TVector3IfEES5_Pf(ptr noundef nonnull align 4 dereferenceable(32) %62, ptr noundef nonnull align 4 dereferenceable(12) %249, ptr noundef nonnull align 4 dereferenceable(12) %250, ptr noundef %32)
  br i1 %251, label %252, label %255

252:                                              ; preds = %240
  %253 = load float, ptr %32, align 4, !tbaa !13
  %254 = load ptr, ptr %19, align 8, !tbaa !5
  store float %253, ptr %254, align 4, !tbaa !13
  store i1 true, ptr %10, align 1
  store i32 1, ptr %26, align 4
  br label %256

255:                                              ; preds = %240
  store i32 0, ptr %26, align 4
  br label %256

256:                                              ; preds = %255, %252
  call void @llvm.lifetime.end.p0(i64 32, ptr %62) #6
  %257 = load i32, ptr %26, align 4
  switch i32 %257, label %260 [
    i32 0, label %258
  ]

258:                                              ; preds = %256
  br label %259

259:                                              ; preds = %258, %239
  store i1 false, ptr %10, align 1
  store i32 1, ptr %26, align 4
  br label %260

260:                                              ; preds = %259, %256, %237
  call void @llvm.lifetime.end.p0(i64 48, ptr %40) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #6
  br label %261

261:                                              ; preds = %260, %122, %121, %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #6
  br label %262

262:                                              ; preds = %261, %94, %82
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #6
  %263 = load i1, ptr %10, align 1
  ret i1 %263
}

declare void @_ZN7Riemann9Triangle329ClosestPointOnTriangleToPointERKN5Maths8TVector3IfEES5_S5_S5_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN5Quad317RayIntersectQuad2ERKN5Maths8TVector3IfEES4_S4_S4_S4_PfS5_S5_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef, ptr noundef, ptr noundef) #0 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn 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 #6 = { nounwind }
attributes #7 = { noreturn 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, !12, i64 12}
!10 = !{!"_ZTSN7Riemann7Sphere3E", !11, i64 0, !12, i64 12}
!11 = !{!"_ZTSN5Maths8TVector3IfEE", !12, i64 0, !12, i64 4, !12, i64 8}
!12 = !{!"float", !7, i64 0}
!13 = !{!12, !12, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}


; 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.Maths::TVector3" = type { float, float, float }
%"class.Riemann::Sphere3" = type { %"class.Maths::TVector3", float }
%"class.Riemann::Capsule3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3", float, float }

@.str.1 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@__PRETTY_FUNCTION__._ZNK7Riemann7Sphere39SweepQuadERKN5Maths8TVector3IfEES5_S5_S5_S5_PS3_S6_Pf = external hidden unnamed_addr constant [155 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann7Sphere312IntersectRayERKN5Maths8TVector3IfEES5_Pf(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef) local_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: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), float noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK5Maths8TVector3IfE3DotERKS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann7Sphere3C2ERKN5Maths8TVector3IfEEf(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12), float noundef) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEngEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann8Capsule3C2ERKN5Maths8TVector3IfEES5_f(ptr noundef nonnull align 4 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), float noundef) unnamed_addr #0 align 2

declare noundef zeroext i1 @_ZNK7Riemann8Capsule312IntersectRayERKN5Maths8TVector3IfEES5_Pf(ptr noundef nonnull align 4 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann9Triangle315CalculateNormalERKN5Maths8TVector3IfEES5_S5_b(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), i1 noundef zeroext) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN7RiemannL16EdgeOrVertexTestERKN5Maths8TVector3IfEEPS3_iiiPi(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK7Riemann7Sphere39SweepQuadERKN5Maths8TVector3IfEES5_S5_S5_S5_PS3_S6_Pf(ptr noundef nonnull align 4 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %5, ptr nocapture noundef readnone %6, ptr nocapture noundef readnone %7, ptr nocapture noundef writeonly %8) local_unnamed_addr #0 align 2 {
  %10 = alloca %"class.Maths::TVector3", align 4
  %11 = alloca %"class.Maths::TVector3", align 4
  %12 = alloca %"class.Maths::TVector3", align 4
  %13 = alloca %"class.Maths::TVector3", align 4
  %14 = alloca %"class.Maths::TVector3", align 4
  %15 = alloca %"class.Maths::TVector3", align 4
  %16 = alloca %"class.Maths::TVector3", align 4
  %17 = alloca %"class.Maths::TVector3", align 4
  %18 = alloca %"class.Maths::TVector3", align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca %"class.Maths::TVector3", align 4
  %23 = alloca i32, align 4
  %24 = alloca [4 x %"class.Maths::TVector3"], align 16
  %25 = alloca %"class.Maths::TVector3", align 4
  %26 = alloca %"class.Maths::TVector3", align 4
  %27 = alloca %"class.Maths::TVector3", align 4
  %28 = alloca %"class.Maths::TVector3", align 4
  %29 = alloca %"class.Maths::TVector3", align 4
  %30 = alloca %"class.Maths::TVector3", align 4
  %31 = alloca %"class.Maths::TVector3", align 4
  %32 = alloca %"class.Maths::TVector3", align 4
  %33 = alloca %"class.Maths::TVector3", align 4
  %34 = alloca %"class.Maths::TVector3", align 4
  %35 = alloca %"class.Maths::TVector3", align 4
  %36 = alloca %"class.Maths::TVector3", align 4
  %37 = alloca %"class.Maths::TVector3", align 4
  %38 = alloca %"class.Maths::TVector3", align 4
  %39 = alloca %"class.Maths::TVector3", align 4
  %40 = alloca %"class.Maths::TVector3", align 4
  %41 = alloca %"class.Maths::TVector3", align 4
  %42 = alloca %"class.Maths::TVector3", align 4
  %43 = alloca %"class.Maths::TVector3", align 4
  %44 = alloca %"class.Maths::TVector3", align 4
  %45 = alloca %"class.Riemann::Sphere3", align 4
  %46 = alloca %"class.Riemann::Capsule3", align 4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #6
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %10, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %2)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #6
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %2)
  %47 = getelementptr inbounds i8, ptr %0, i64 12
  %48 = load float, ptr %47, align 4, !tbaa !5
  %49 = fmul float %48, %48
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #6
  call void @_ZN7Riemann9Triangle329ClosestPointOnTriangleToPointERKN5Maths8TVector3IfEES5_S5_S5_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %12, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #6
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %13, ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %0)
  %50 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %13)
  %51 = fcmp ugt float %50, %49
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #6
  %.0.sroa.gep70 = getelementptr inbounds i8, ptr %24, i64 12
  %.0.sroa.gep72 = getelementptr inbounds i8, ptr %24, i64 24
  %.0.sroa.gep73 = getelementptr inbounds i8, ptr %24, i64 36
  br i1 %51, label %53, label %52

52:                                               ; preds = %9
  store float 0.000000e+00, ptr %8, align 4, !tbaa !11
  br label %131

53:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #6
  call void @_ZN7Riemann9Triangle329ClosestPointOnTriangleToPointERKN5Maths8TVector3IfEES5_S5_S5_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %14, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %3)
  %54 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #6
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %15, ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %0)
  %55 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %15)
  %56 = fcmp ugt float %55, %49
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #6
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  store float 0.000000e+00, ptr %8, align 4, !tbaa !11
  br label %131

58:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %16) #6
  call void @_ZN7Riemann9Triangle315CalculateNormalERKN5Maths8TVector3IfEES5_S5_b(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %16, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %17) #6
  %59 = load float, ptr %47, align 4, !tbaa !5
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %17, ptr noundef nonnull align 4 dereferenceable(12) %16, float noundef %59)
  %60 = call noundef float @_ZNK5Maths8TVector3IfE3DotERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %17)
  %61 = fcmp ult float %60, 0.000000e+00
  br i1 %61, label %64, label %62

62:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %18) #6
  call void @_ZNK5Maths8TVector3IfEngEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %18, ptr noundef nonnull align 4 dereferenceable(12) %17)
  %63 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %17, ptr noundef nonnull align 4 dereferenceable(12) %18)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #6
  br label %64

64:                                               ; preds = %62, %58
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %22) #6
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %22, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %17)
  %65 = call noundef i32 @_ZN5Quad317RayIntersectQuad2ERKN5Maths8TVector3IfEES4_S4_S4_S4_PfS5_S5_(ptr noundef nonnull align 4 dereferenceable(12) %22, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull %19, ptr noundef nonnull %21, ptr noundef nonnull %20)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %22) #6
  switch i32 %65, label %70 [
    i32 0, label %130
    i32 2, label %66
  ]

66:                                               ; preds = %64
  %67 = load float, ptr %19, align 4, !tbaa !11
  %68 = fcmp olt float %67, 0.000000e+00
  br i1 %68, label %130, label %69

69:                                               ; preds = %66
  store float %67, ptr %8, align 4, !tbaa !11
  br label %130

70:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %24) #6
  call void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %24, ptr noundef nonnull align 4 dereferenceable(12) %2)
  call void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %.0.sroa.gep70, ptr noundef nonnull align 4 dereferenceable(12) %3)
  call void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %.0.sroa.gep72, ptr noundef nonnull align 4 dereferenceable(12) %4)
  call void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %.0.sroa.gep73, ptr noundef nonnull align 4 dereferenceable(12) %5)
  %71 = load float, ptr %20, align 4, !tbaa !11
  %72 = fcmp olt float %71, 0.000000e+00
  br i1 %72, label %73, label %91

73:                                               ; preds = %70
  %74 = load float, ptr %21, align 4, !tbaa !11
  %75 = fcmp olt float %74, 0.000000e+00
  br i1 %75, label %76, label %82

76:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %25) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %26) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %27) #6
  %77 = fsub float 1.000000e+00, %71
  %78 = fsub float %77, %74
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %27, ptr noundef nonnull align 4 dereferenceable(12) %2, float noundef %78)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %28) #6
  %79 = load float, ptr %20, align 4, !tbaa !11
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %28, ptr noundef nonnull align 4 dereferenceable(12) %3, float noundef %79)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %26, ptr noundef nonnull align 4 dereferenceable(12) %27, ptr noundef nonnull align 4 dereferenceable(12) %28)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %29) #6
  %80 = load float, ptr %21, align 4, !tbaa !11
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %29, ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef %80)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %25, ptr noundef nonnull align 4 dereferenceable(12) %26, ptr noundef nonnull align 4 dereferenceable(12) %29)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %29) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %28) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %27) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %26) #6
  %81 = call noundef zeroext i1 @_ZN7RiemannL16EdgeOrVertexTestERKN5Maths8TVector3IfEEPS3_iiiPi(ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull %24, i32 noundef 0, i32 noundef 1, i32 noundef 2, ptr noundef nonnull %23)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %25) #6
  br i1 %81, label %117, label %.thread

82:                                               ; preds = %73
  %83 = fcmp ogt float %74, 1.000000e+00
  br i1 %83, label %84, label %90

84:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %30) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %31) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %32) #6
  %85 = fsub float 1.000000e+00, %71
  %86 = fsub float %85, %74
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %32, ptr noundef nonnull align 4 dereferenceable(12) %2, float noundef %86)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %33) #6
  %87 = load float, ptr %20, align 4, !tbaa !11
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %33, ptr noundef nonnull align 4 dereferenceable(12) %3, float noundef %87)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %31, ptr noundef nonnull align 4 dereferenceable(12) %32, ptr noundef nonnull align 4 dereferenceable(12) %33)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %34) #6
  %88 = load float, ptr %21, align 4, !tbaa !11
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %34, ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef %88)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %30, ptr noundef nonnull align 4 dereferenceable(12) %31, ptr noundef nonnull align 4 dereferenceable(12) %34)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %34) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %33) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %32) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %31) #6
  %89 = call noundef zeroext i1 @_ZN7RiemannL16EdgeOrVertexTestERKN5Maths8TVector3IfEEPS3_iiiPi(ptr noundef nonnull align 4 dereferenceable(12) %30, ptr noundef nonnull %24, i32 noundef 1, i32 noundef 0, i32 noundef 3, ptr noundef nonnull %23)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %30) #6
  br i1 %89, label %117, label %.thread

90:                                               ; preds = %82
  store i32 1, ptr %23, align 4, !tbaa !12
  br label %.thread

91:                                               ; preds = %70
  %92 = fcmp ogt float %71, 1.000000e+00
  %93 = load float, ptr %21, align 4, !tbaa !11
  %94 = fcmp olt float %93, 0.000000e+00
  br i1 %92, label %95, label %105

95:                                               ; preds = %91
  br i1 %94, label %96, label %102

96:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %35) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %36) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %37) #6
  %97 = fsub float 1.000000e+00, %71
  %98 = fsub float %97, %93
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %37, ptr noundef nonnull align 4 dereferenceable(12) %2, float noundef %98)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %38) #6
  %99 = load float, ptr %20, align 4, !tbaa !11
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %38, ptr noundef nonnull align 4 dereferenceable(12) %3, float noundef %99)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %36, ptr noundef nonnull align 4 dereferenceable(12) %37, ptr noundef nonnull align 4 dereferenceable(12) %38)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %39) #6
  %100 = load float, ptr %21, align 4, !tbaa !11
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %39, ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef %100)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %35, ptr noundef nonnull align 4 dereferenceable(12) %36, ptr noundef nonnull align 4 dereferenceable(12) %39)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %39) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %38) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %37) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %36) #6
  %101 = call noundef zeroext i1 @_ZN7RiemannL16EdgeOrVertexTestERKN5Maths8TVector3IfEEPS3_iiiPi(ptr noundef nonnull align 4 dereferenceable(12) %35, ptr noundef nonnull %24, i32 noundef 2, i32 noundef 0, i32 noundef 3, ptr noundef nonnull %23)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %35) #6
  br i1 %101, label %117, label %.thread

102:                                              ; preds = %95
  %103 = fcmp ogt float %93, 1.000000e+00
  br i1 %103, label %111, label %104

104:                                              ; preds = %102
  store i32 3, ptr %23, align 4, !tbaa !12
  br label %.thread

105:                                              ; preds = %91
  br i1 %94, label %106, label %107

106:                                              ; preds = %105
  store i32 2, ptr %23, align 4, !tbaa !12
  br label %.thread

107:                                              ; preds = %105
  %108 = fcmp ult float %93, 1.000000e+00
  br i1 %108, label %109, label %110

109:                                              ; preds = %107
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 692, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK7Riemann7Sphere39SweepQuadERKN5Maths8TVector3IfEES5_S5_S5_S5_PS3_S6_Pf) #7
  unreachable

110:                                              ; preds = %107
  store i32 3, ptr %23, align 4, !tbaa !12
  br label %.thread

111:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %40) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %41) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %42) #6
  %112 = fsub float 1.000000e+00, %71
  %113 = fsub float %112, %93
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %42, ptr noundef nonnull align 4 dereferenceable(12) %2, float noundef %113)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %43) #6
  %114 = load float, ptr %20, align 4, !tbaa !11
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %43, ptr noundef nonnull align 4 dereferenceable(12) %3, float noundef %114)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %41, ptr noundef nonnull align 4 dereferenceable(12) %42, ptr noundef nonnull align 4 dereferenceable(12) %43)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %44) #6
  %115 = load float, ptr %21, align 4, !tbaa !11
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %44, ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef %115)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %40, ptr noundef nonnull align 4 dereferenceable(12) %41, ptr noundef nonnull align 4 dereferenceable(12) %44)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %44) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %43) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %42) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %41) #6
  %116 = call noundef zeroext i1 @_ZN7RiemannL16EdgeOrVertexTestERKN5Maths8TVector3IfEEPS3_iiiPi(ptr noundef nonnull align 4 dereferenceable(12) %40, ptr noundef nonnull %24, i32 noundef 3, i32 noundef 1, i32 noundef 2, ptr noundef nonnull %23)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %40) #6
  br i1 %116, label %117, label %.thread

117:                                              ; preds = %96, %84, %76, %111
  %.0.sroa.phi90 = phi ptr [ %24, %76 ], [ %.0.sroa.gep73, %111 ], [ %.0.sroa.gep70, %84 ], [ %.0.sroa.gep72, %96 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %45) #6
  %118 = load float, ptr %47, align 4, !tbaa !5
  call void @_ZN7Riemann7Sphere3C2ERKN5Maths8TVector3IfEEf(ptr noundef nonnull align 4 dereferenceable(16) %45, ptr noundef nonnull align 4 dereferenceable(12) %.0.sroa.phi90, float noundef %118)
  %119 = call noundef zeroext i1 @_ZNK7Riemann7Sphere312IntersectRayERKN5Maths8TVector3IfEES5_Pf(ptr noundef nonnull align 4 dereferenceable(16) %45, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull %19)
  br i1 %119, label %120, label %.critedge

120:                                              ; preds = %117
  %121 = load float, ptr %19, align 4, !tbaa !11
  store float %121, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %45) #6
  br label %129

.thread:                                          ; preds = %110, %106, %104, %90, %96, %84, %76, %111
  %.0.sroa.phi7789 = phi ptr [ %.0.sroa.gep73, %111 ], [ %24, %76 ], [ %.0.sroa.gep70, %84 ], [ %.0.sroa.gep72, %96 ], [ %.0.sroa.gep70, %110 ], [ %24, %106 ], [ %.0.sroa.gep72, %104 ], [ %24, %90 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %46) #6
  %122 = load i32, ptr %23, align 4, !tbaa !12
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [4 x %"class.Maths::TVector3"], ptr %24, i64 0, i64 %123
  %125 = load float, ptr %47, align 4, !tbaa !5
  call void @_ZN7Riemann8Capsule3C2ERKN5Maths8TVector3IfEES5_f(ptr noundef nonnull align 4 dereferenceable(32) %46, ptr noundef nonnull align 4 dereferenceable(12) %.0.sroa.phi7789, ptr noundef nonnull align 4 dereferenceable(12) %124, float noundef %125)
  %126 = call noundef zeroext i1 @_ZNK7Riemann8Capsule312IntersectRayERKN5Maths8TVector3IfEES5_Pf(ptr noundef nonnull align 4 dereferenceable(32) %46, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull %19)
  br i1 %126, label %127, label %.critedge69

127:                                              ; preds = %.thread
  %128 = load float, ptr %19, align 4, !tbaa !11
  store float %128, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %46) #6
  br label %129

.critedge:                                        ; preds = %117
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %45) #6
  br label %129

.critedge69:                                      ; preds = %.thread
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %46) #6
  br label %129

129:                                              ; preds = %.critedge, %.critedge69, %127, %120
  %.2 = phi i1 [ true, %120 ], [ true, %127 ], [ false, %.critedge69 ], [ false, %.critedge ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #6
  br label %130

130:                                              ; preds = %66, %64, %129, %69
  %.3 = phi i1 [ true, %69 ], [ %.2, %129 ], [ false, %64 ], [ false, %66 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %16) #6
  br label %131

131:                                              ; preds = %130, %57, %52
  %.4 = phi i1 [ true, %52 ], [ true, %57 ], [ %.3, %130 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #6
  ret i1 %.4
}

declare void @_ZN7Riemann9Triangle329ClosestPointOnTriangleToPointERKN5Maths8TVector3IfEES5_S5_S5_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN5Quad317RayIntersectQuad2ERKN5Maths8TVector3IfEES4_S4_S4_S4_PfS5_S5_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn 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 #6 = { nounwind }
attributes #7 = { noreturn 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, !8, i64 12}
!6 = !{!"_ZTSN7Riemann7Sphere3E", !7, i64 0, !8, i64 12}
!7 = !{!"_ZTSN5Maths8TVector3IfEE", !8, i64 0, !8, i64 4, !8, i64 8}
!8 = !{!"float", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!8, !8, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !9, i64 0}


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