; 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 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [90 x i8], align 1
@__PRETTY_FUNCTION__._ZNK7Riemann7Sphere313SweepTriangleERKN5Maths8TVector3IfEES5_S5_S5_PS3_S6_Pf = external hidden unnamed_addr constant [142 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: mustprogress uwtable
declare hidden void @_ZN7RiemannL22ClosestPtPointTriangleERKN5Maths8TVector3IfEES4_S4_S4_(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), ptr noundef nonnull align 4 dereferenceable(12)) #0

; 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
define dso_local noundef zeroext i1 @_ZNK7Riemann7Sphere313SweepTriangleERKN5Maths8TVector3IfEES5_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 %5, ptr noundef %6, ptr noundef %7) #0 align 2 {
  %9 = alloca i1, align 1
  %10 = alloca ptr, align 8
  %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 i8, align 1
  %20 = alloca %"class.Maths::TVector3", align 4
  %21 = alloca %"class.Maths::TVector3", align 4
  %22 = alloca %"class.Maths::TVector3", align 4
  %23 = alloca i32, align 4
  %24 = alloca %"class.Maths::TVector3", align 4
  %25 = alloca %"class.Maths::TVector3", align 4
  %26 = alloca %"class.Maths::TVector3", align 4
  %27 = alloca float, align 4
  %28 = alloca float, align 4
  %29 = alloca float, align 4
  %30 = alloca %"class.Maths::TVector3", align 4
  %31 = alloca %"class.Maths::TVector3", align 4
  %32 = alloca i32, align 4
  %33 = alloca %"class.Maths::TVector3", align 4
  %34 = alloca i8, align 1
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca [3 x %"class.Maths::TVector3"], align 16
  %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.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.Riemann::Sphere3", align 4
  %54 = alloca %"class.Riemann::Capsule3", align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store ptr %2, ptr %12, align 8, !tbaa !5
  store ptr %3, ptr %13, align 8, !tbaa !5
  store ptr %4, ptr %14, align 8, !tbaa !5
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  %55 = load ptr, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %56 = getelementptr inbounds %"class.Riemann::Sphere3", ptr %55, i32 0, i32 0
  store ptr %56, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #6
  store i8 1, ptr %19, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #6
  %57 = load ptr, ptr %18, align 8, !tbaa !5
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  %59 = load ptr, ptr %13, align 8, !tbaa !5
  %60 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN7RiemannL22ClosestPtPointTriangleERKN5Maths8TVector3IfEES4_S4_S4_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %20, ptr noundef nonnull align 4 dereferenceable(12) %57, ptr noundef nonnull align 4 dereferenceable(12) %58, ptr noundef nonnull align 4 dereferenceable(12) %59, ptr noundef nonnull align 4 dereferenceable(12) %60)
  call void @llvm.lifetime.start.p0(i64 12, ptr %21) #6
  %61 = load ptr, ptr %18, 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) %20, ptr noundef nonnull align 4 dereferenceable(12) %61)
  %62 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %21)
  %63 = getelementptr inbounds %"class.Riemann::Sphere3", ptr %55, i32 0, i32 1
  %64 = load float, ptr %63, align 4, !tbaa !11
  %65 = getelementptr inbounds %"class.Riemann::Sphere3", ptr %55, i32 0, i32 1
  %66 = load float, ptr %65, align 4, !tbaa !11
  %67 = fmul float %64, %66
  %68 = fcmp ole float %62, %67
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #6
  br i1 %68, label %69, label %74

69:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 12, ptr %22) #6
  %70 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZNK5Maths8TVector3IfEngEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %22, ptr noundef nonnull align 4 dereferenceable(12) %70)
  %71 = load ptr, ptr %16, align 8, !tbaa !5
  %72 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %71, ptr noundef nonnull align 4 dereferenceable(12) %22)
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #6
  %73 = load ptr, ptr %17, align 8, !tbaa !5
  store float 0.000000e+00, ptr %73, align 4, !tbaa !15
  store i1 true, ptr %9, align 1
  store i32 1, ptr %23, align 4
  br label %75

74:                                               ; preds = %8
  store i32 0, ptr %23, align 4
  br label %75

75:                                               ; preds = %74, %69
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #6
  %76 = load i32, ptr %23, align 4
  switch i32 %76, label %229 [
    i32 0, label %77
  ]

77:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #6
  %78 = load ptr, ptr %12, align 8, !tbaa !5
  %79 = load ptr, ptr %13, align 8, !tbaa !5
  %80 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN7Riemann9Triangle315CalculateNormalERKN5Maths8TVector3IfEES5_S5_b(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %24, ptr noundef nonnull align 4 dereferenceable(12) %78, ptr noundef nonnull align 4 dereferenceable(12) %79, ptr noundef nonnull align 4 dereferenceable(12) %80, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #6
  %81 = getelementptr inbounds %"class.Riemann::Sphere3", ptr %55, i32 0, i32 1
  %82 = load float, ptr %81, align 4, !tbaa !11
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %25, ptr noundef nonnull align 4 dereferenceable(12) %24, float noundef %82)
  %83 = load ptr, ptr %11, align 8, !tbaa !5
  %84 = call noundef float @_ZNK5Maths8TVector3IfE3DotERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %83, ptr noundef nonnull align 4 dereferenceable(12) %25)
  %85 = fcmp oge float %84, 0.000000e+00
  br i1 %85, label %86, label %88

86:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #6
  call void @_ZNK5Maths8TVector3IfEngEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %26, ptr noundef nonnull align 4 dereferenceable(12) %25)
  %87 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull align 4 dereferenceable(12) %26)
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #6
  br label %88

88:                                               ; preds = %86, %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %30) #6
  %89 = load ptr, ptr %13, align 8, !tbaa !5
  %90 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %30, ptr noundef nonnull align 4 dereferenceable(12) %89, ptr noundef nonnull align 4 dereferenceable(12) %90)
  call void @llvm.lifetime.start.p0(i64 12, ptr %31) #6
  %91 = load ptr, ptr %14, align 8, !tbaa !5
  %92 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %31, ptr noundef nonnull align 4 dereferenceable(12) %91, ptr noundef nonnull align 4 dereferenceable(12) %92)
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %33) #6
  %93 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %33, ptr noundef nonnull align 4 dereferenceable(12) %93, ptr noundef nonnull align 4 dereferenceable(12) %25)
  %94 = load ptr, ptr %11, align 8, !tbaa !5
  %95 = load ptr, ptr %12, align 8, !tbaa !5
  %96 = call noundef i32 @_ZN7Riemann9Triangle321RayIntersectTriangle2ERKN5Maths8TVector3IfEES5_S5_S5_S5_PfS6_S6_(ptr noundef nonnull align 4 dereferenceable(12) %33, ptr noundef nonnull align 4 dereferenceable(12) %94, ptr noundef nonnull align 4 dereferenceable(12) %95, ptr noundef nonnull align 4 dereferenceable(12) %30, ptr noundef nonnull align 4 dereferenceable(12) %31, ptr noundef %29, ptr noundef %27, ptr noundef %28)
  call void @llvm.lifetime.end.p0(i64 12, ptr %33) #6
  store i32 %96, ptr %32, align 4, !tbaa !16
  %97 = load i32, ptr %32, align 4, !tbaa !16
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %100, label %99

99:                                               ; preds = %88
  store i1 false, ptr %9, align 1
  store i32 1, ptr %23, align 4
  br label %228

100:                                              ; preds = %88
  %101 = load i32, ptr %32, align 4, !tbaa !16
  %102 = icmp eq i32 %101, 2
  br i1 %102, label %103, label %110

103:                                              ; preds = %100
  %104 = load float, ptr %29, align 4, !tbaa !15
  %105 = fcmp olt float %104, 0.000000e+00
  br i1 %105, label %106, label %107

106:                                              ; preds = %103
  store i1 false, ptr %9, align 1
  store i32 1, ptr %23, align 4
  br label %228

107:                                              ; preds = %103
  %108 = load float, ptr %29, align 4, !tbaa !15
  %109 = load ptr, ptr %17, align 8, !tbaa !5
  store float %108, ptr %109, align 4, !tbaa !15
  store i1 true, ptr %9, align 1
  store i32 1, ptr %23, align 4
  br label %228

110:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #6
  call void @llvm.lifetime.start.p0(i64 36, ptr %37) #6
  %111 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %37, ptr noundef nonnull align 4 dereferenceable(12) %111)
  %112 = getelementptr inbounds %"class.Maths::TVector3", ptr %37, i64 1
  %113 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %112, ptr noundef nonnull align 4 dereferenceable(12) %113)
  %114 = getelementptr inbounds %"class.Maths::TVector3", ptr %37, i64 2
  %115 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %114, ptr noundef nonnull align 4 dereferenceable(12) %115)
  %116 = load float, ptr %27, align 4, !tbaa !15
  %117 = fcmp olt float %116, 0.000000e+00
  br i1 %117, label %118, label %155

118:                                              ; preds = %110
  %119 = load float, ptr %28, align 4, !tbaa !15
  %120 = fcmp olt float %119, 0.000000e+00
  br i1 %120, label %121, label %134

121:                                              ; preds = %118
  store i32 0, ptr %35, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 12, ptr %38) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %39) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %40) #6
  %122 = load ptr, ptr %12, align 8, !tbaa !5
  %123 = load float, ptr %27, align 4, !tbaa !15
  %124 = fsub float 1.000000e+00, %123
  %125 = load float, ptr %28, align 4, !tbaa !15
  %126 = fsub float %124, %125
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %40, ptr noundef nonnull align 4 dereferenceable(12) %122, float noundef %126)
  call void @llvm.lifetime.start.p0(i64 12, ptr %41) #6
  %127 = load ptr, ptr %13, align 8, !tbaa !5
  %128 = load float, ptr %27, align 4, !tbaa !15
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %41, ptr noundef nonnull align 4 dereferenceable(12) %127, float noundef %128)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %39, ptr noundef nonnull align 4 dereferenceable(12) %40, ptr noundef nonnull align 4 dereferenceable(12) %41)
  call void @llvm.lifetime.start.p0(i64 12, ptr %42) #6
  %129 = load ptr, ptr %14, align 8, !tbaa !5
  %130 = load float, ptr %28, align 4, !tbaa !15
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %42, ptr noundef nonnull align 4 dereferenceable(12) %129, float noundef %130)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %38, ptr noundef nonnull align 4 dereferenceable(12) %39, ptr noundef nonnull align 4 dereferenceable(12) %42)
  call void @llvm.lifetime.end.p0(i64 12, ptr %42) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %41) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %40) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %39) #6
  %131 = getelementptr inbounds [3 x %"class.Maths::TVector3"], ptr %37, i64 0, i64 0
  %132 = call noundef zeroext i1 @_ZN7RiemannL16EdgeOrVertexTestERKN5Maths8TVector3IfEEPS3_iiiPi(ptr noundef nonnull align 4 dereferenceable(12) %38, ptr noundef %131, i32 noundef 0, i32 noundef 1, i32 noundef 2, ptr noundef %36)
  %133 = zext i1 %132 to i8
  store i8 %133, ptr %34, align 1, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 12, ptr %38) #6
  br label %154

134:                                              ; preds = %118
  %135 = load float, ptr %27, align 4, !tbaa !15
  %136 = load float, ptr %28, align 4, !tbaa !15
  %137 = fadd float %135, %136
  %138 = fcmp ogt float %137, 1.000000e+00
  br i1 %138, label %139, label %152

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

152:                                              ; preds = %134
  store i8 0, ptr %34, align 1, !tbaa !9
  store i32 0, ptr %35, align 4, !tbaa !16
  store i32 2, ptr %36, align 4, !tbaa !16
  br label %153

153:                                              ; preds = %152, %139
  br label %154

154:                                              ; preds = %153, %121
  br label %188

155:                                              ; preds = %110
  %156 = load float, ptr %28, align 4, !tbaa !15
  %157 = fcmp olt float %156, 0.000000e+00
  br i1 %157, label %158, label %178

158:                                              ; preds = %155
  %159 = load float, ptr %27, align 4, !tbaa !15
  %160 = load float, ptr %28, align 4, !tbaa !15
  %161 = fadd float %159, %160
  %162 = fcmp ogt float %161, 1.000000e+00
  br i1 %162, label %163, label %176

163:                                              ; preds = %158
  store i32 1, ptr %35, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 12, ptr %48) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %49) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %50) #6
  %164 = load ptr, ptr %12, align 8, !tbaa !5
  %165 = load float, ptr %27, align 4, !tbaa !15
  %166 = fsub float 1.000000e+00, %165
  %167 = load float, ptr %28, align 4, !tbaa !15
  %168 = fsub float %166, %167
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %50, ptr noundef nonnull align 4 dereferenceable(12) %164, float noundef %168)
  call void @llvm.lifetime.start.p0(i64 12, ptr %51) #6
  %169 = load ptr, ptr %13, align 8, !tbaa !5
  %170 = load float, ptr %27, align 4, !tbaa !15
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %51, ptr noundef nonnull align 4 dereferenceable(12) %169, float noundef %170)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %49, ptr noundef nonnull align 4 dereferenceable(12) %50, ptr noundef nonnull align 4 dereferenceable(12) %51)
  call void @llvm.lifetime.start.p0(i64 12, ptr %52) #6
  %171 = load ptr, ptr %14, align 8, !tbaa !5
  %172 = load float, ptr %28, align 4, !tbaa !15
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %52, ptr noundef nonnull align 4 dereferenceable(12) %171, float noundef %172)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %48, ptr noundef nonnull align 4 dereferenceable(12) %49, ptr noundef nonnull align 4 dereferenceable(12) %52)
  call void @llvm.lifetime.end.p0(i64 12, ptr %52) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %51) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %50) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %49) #6
  %173 = getelementptr inbounds [3 x %"class.Maths::TVector3"], ptr %37, i64 0, i64 0
  %174 = call noundef zeroext i1 @_ZN7RiemannL16EdgeOrVertexTestERKN5Maths8TVector3IfEEPS3_iiiPi(ptr noundef nonnull align 4 dereferenceable(12) %48, ptr noundef %173, i32 noundef 1, i32 noundef 0, i32 noundef 2, ptr noundef %36)
  %175 = zext i1 %174 to i8
  store i8 %175, ptr %34, align 1, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 12, ptr %48) #6
  br label %177

176:                                              ; preds = %158
  store i8 0, ptr %34, align 1, !tbaa !9
  store i32 0, ptr %35, align 4, !tbaa !16
  store i32 1, ptr %36, align 4, !tbaa !16
  br label %177

177:                                              ; preds = %176, %163
  br label %187

178:                                              ; preds = %155
  %179 = load float, ptr %27, align 4, !tbaa !15
  %180 = load float, ptr %28, align 4, !tbaa !15
  %181 = fadd float %179, %180
  %182 = fcmp oge float %181, 1.000000e+00
  br i1 %182, label %183, label %184

183:                                              ; preds = %178
  br label %186

184:                                              ; preds = %178
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 550, ptr noundef @__PRETTY_FUNCTION__._ZNK7Riemann7Sphere313SweepTriangleERKN5Maths8TVector3IfEES5_S5_S5_PS3_S6_Pf) #7
  unreachable

185:                                              ; No predecessors!
  br label %186

186:                                              ; preds = %185, %183
  store i8 0, ptr %34, align 1, !tbaa !9
  store i32 1, ptr %35, align 4, !tbaa !16
  store i32 2, ptr %36, align 4, !tbaa !16
  br label %187

187:                                              ; preds = %186, %177
  br label %188

188:                                              ; preds = %187, %154
  %189 = load i8, ptr %34, align 1, !tbaa !9, !range !18, !noundef !19
  %190 = trunc i8 %189 to i1
  br i1 %190, label %191, label %207

191:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 16, ptr %53) #6
  %192 = load i32, ptr %35, align 4, !tbaa !16
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [3 x %"class.Maths::TVector3"], ptr %37, i64 0, i64 %193
  %195 = getelementptr inbounds %"class.Riemann::Sphere3", ptr %55, i32 0, i32 1
  %196 = load float, ptr %195, align 4, !tbaa !11
  call void @_ZN7Riemann7Sphere3C2ERKN5Maths8TVector3IfEEf(ptr noundef nonnull align 4 dereferenceable(16) %53, ptr noundef nonnull align 4 dereferenceable(12) %194, float noundef %196)
  %197 = load ptr, ptr %18, align 8, !tbaa !5
  %198 = load ptr, ptr %11, align 8, !tbaa !5
  %199 = call noundef zeroext i1 @_ZNK7Riemann7Sphere312IntersectRayERKN5Maths8TVector3IfEES5_Pf(ptr noundef nonnull align 4 dereferenceable(16) %53, ptr noundef nonnull align 4 dereferenceable(12) %197, ptr noundef nonnull align 4 dereferenceable(12) %198, ptr noundef %29)
  br i1 %199, label %200, label %203

200:                                              ; preds = %191
  %201 = load float, ptr %29, align 4, !tbaa !15
  %202 = load ptr, ptr %17, align 8, !tbaa !5
  store float %201, ptr %202, align 4, !tbaa !15
  store i1 true, ptr %9, align 1
  store i32 1, ptr %23, align 4
  br label %204

203:                                              ; preds = %191
  store i32 0, ptr %23, align 4
  br label %204

204:                                              ; preds = %203, %200
  call void @llvm.lifetime.end.p0(i64 16, ptr %53) #6
  %205 = load i32, ptr %23, align 4
  switch i32 %205, label %227 [
    i32 0, label %206
  ]

206:                                              ; preds = %204
  br label %226

207:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 32, ptr %54) #6
  %208 = load i32, ptr %35, align 4, !tbaa !16
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [3 x %"class.Maths::TVector3"], ptr %37, i64 0, i64 %209
  %211 = load i32, ptr %36, align 4, !tbaa !16
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [3 x %"class.Maths::TVector3"], ptr %37, i64 0, i64 %212
  %214 = getelementptr inbounds %"class.Riemann::Sphere3", ptr %55, i32 0, i32 1
  %215 = load float, ptr %214, align 4, !tbaa !11
  call void @_ZN7Riemann8Capsule3C2ERKN5Maths8TVector3IfEES5_f(ptr noundef nonnull align 4 dereferenceable(32) %54, ptr noundef nonnull align 4 dereferenceable(12) %210, ptr noundef nonnull align 4 dereferenceable(12) %213, float noundef %215)
  %216 = load ptr, ptr %18, align 8, !tbaa !5
  %217 = load ptr, ptr %11, align 8, !tbaa !5
  %218 = call noundef zeroext i1 @_ZNK7Riemann8Capsule312IntersectRayERKN5Maths8TVector3IfEES5_Pf(ptr noundef nonnull align 4 dereferenceable(32) %54, ptr noundef nonnull align 4 dereferenceable(12) %216, ptr noundef nonnull align 4 dereferenceable(12) %217, ptr noundef %29)
  br i1 %218, label %219, label %222

219:                                              ; preds = %207
  %220 = load float, ptr %29, align 4, !tbaa !15
  %221 = load ptr, ptr %17, align 8, !tbaa !5
  store float %220, ptr %221, align 4, !tbaa !15
  store i1 true, ptr %9, align 1
  store i32 1, ptr %23, align 4
  br label %223

222:                                              ; preds = %207
  store i32 0, ptr %23, align 4
  br label %223

223:                                              ; preds = %222, %219
  call void @llvm.lifetime.end.p0(i64 32, ptr %54) #6
  %224 = load i32, ptr %23, align 4
  switch i32 %224, label %227 [
    i32 0, label %225
  ]

225:                                              ; preds = %223
  br label %226

226:                                              ; preds = %225, %206
  store i1 false, ptr %9, align 1
  store i32 1, ptr %23, align 4
  br label %227

227:                                              ; preds = %226, %223, %204
  call void @llvm.lifetime.end.p0(i64 36, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #6
  br label %228

228:                                              ; preds = %227, %107, %106, %99
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #6
  br label %229

229:                                              ; preds = %228, %75
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  %230 = load i1, ptr %9, align 1
  ret i1 %230
}

; 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

declare noundef i32 @_ZN7Riemann9Triangle321RayIntersectTriangle2ERKN5Maths8TVector3IfEES5_S5_S5_S5_PfS6_S6_(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) #4

; 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

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, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !14, i64 12}
!12 = !{!"_ZTSN7Riemann7Sphere3E", !13, i64 0, !14, i64 12}
!13 = !{!"_ZTSN5Maths8TVector3IfEE", !14, i64 0, !14, i64 4, !14, i64 8}
!14 = !{!"float", !7, i64 0}
!15 = !{!14, !14, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !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 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [90 x i8], align 1
@__PRETTY_FUNCTION__._ZNK7Riemann7Sphere313SweepTriangleERKN5Maths8TVector3IfEES5_S5_S5_PS3_S6_Pf = external hidden unnamed_addr constant [142 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: mustprogress uwtable
declare hidden void @_ZN7RiemannL22ClosestPtPointTriangleERKN5Maths8TVector3IfEES4_S4_S4_(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), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0

; 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
define dso_local noundef zeroext i1 @_ZNK7Riemann7Sphere313SweepTriangleERKN5Maths8TVector3IfEES5_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 nocapture noundef readnone %5, ptr noundef %6, ptr nocapture noundef writeonly %7) local_unnamed_addr #0 align 2 {
  %9 = alloca %"class.Maths::TVector3", align 4
  %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 float, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca %"class.Maths::TVector3", align 4
  %19 = alloca %"class.Maths::TVector3", align 4
  %20 = alloca %"class.Maths::TVector3", align 4
  %21 = alloca i32, align 4
  %22 = alloca [3 x %"class.Maths::TVector3"], align 16
  %23 = alloca %"class.Maths::TVector3", align 4
  %24 = alloca %"class.Maths::TVector3", align 4
  %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.Riemann::Sphere3", align 4
  %39 = alloca %"class.Riemann::Capsule3", align 4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #6
  call void @_ZN7RiemannL22ClosestPtPointTriangleERKN5Maths8TVector3IfEES4_S4_S4_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %9, 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 %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) %9, ptr noundef nonnull align 4 dereferenceable(12) %0)
  %40 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %10)
  %41 = getelementptr inbounds i8, ptr %0, i64 12
  %42 = load float, ptr %41, align 4, !tbaa !5
  %43 = fmul float %42, %42
  %44 = fcmp ugt float %40, %43
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #6
  %.0.sroa.gep64 = getelementptr inbounds i8, ptr %22, i64 24
  %.0.sroa.gep66 = getelementptr inbounds i8, ptr %22, i64 12
  br i1 %44, label %.critedge, label %45

45:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #6
  call void @_ZNK5Maths8TVector3IfEngEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %1)
  %46 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(12) %11)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #6
  store float 0.000000e+00, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #6
  br label %109

.critedge:                                        ; preds = %8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #6
  call void @_ZN7Riemann9Triangle315CalculateNormalERKN5Maths8TVector3IfEES5_S5_b(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %12, 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 %13) #6
  %47 = load float, ptr %41, align 4, !tbaa !5
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %13, ptr noundef nonnull align 4 dereferenceable(12) %12, float noundef %47)
  %48 = call noundef float @_ZNK5Maths8TVector3IfE3DotERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %13)
  %49 = fcmp ult float %48, 0.000000e+00
  br i1 %49, label %52, label %50

50:                                               ; preds = %.critedge
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #6
  call void @_ZNK5Maths8TVector3IfEngEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %14, ptr noundef nonnull align 4 dereferenceable(12) %13)
  %51 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #6
  br label %52

52:                                               ; preds = %50, %.critedge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %18) #6
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %18, 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 %19) #6
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %19, ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %2)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %20) #6
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %20, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %13)
  %53 = call noundef i32 @_ZN7Riemann9Triangle321RayIntersectTriangle2ERKN5Maths8TVector3IfEES5_S5_S5_S5_PfS6_S6_(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %18, ptr noundef nonnull align 4 dereferenceable(12) %19, ptr noundef nonnull %17, ptr noundef nonnull %15, ptr noundef nonnull %16)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #6
  switch i32 %53, label %58 [
    i32 0, label %108
    i32 2, label %54
  ]

54:                                               ; preds = %52
  %55 = load float, ptr %17, align 4, !tbaa !11
  %56 = fcmp olt float %55, 0.000000e+00
  br i1 %56, label %108, label %57

57:                                               ; preds = %54
  store float %55, ptr %7, align 4, !tbaa !11
  br label %108

58:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #6
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %22) #6
  call void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %22, ptr noundef nonnull align 4 dereferenceable(12) %2)
  call void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %.0.sroa.gep66, ptr noundef nonnull align 4 dereferenceable(12) %3)
  call void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %.0.sroa.gep64, ptr noundef nonnull align 4 dereferenceable(12) %4)
  %59 = load float, ptr %15, align 4, !tbaa !11
  %60 = fcmp olt float %59, 0.000000e+00
  %61 = load float, ptr %16, align 4, !tbaa !11
  %62 = fcmp olt float %61, 0.000000e+00
  br i1 %60, label %63, label %80

63:                                               ; preds = %58
  br i1 %62, label %64, label %70

64:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %23) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %24) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %25) #6
  %65 = fsub float 1.000000e+00, %59
  %66 = fsub float %65, %61
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %25, ptr noundef nonnull align 4 dereferenceable(12) %2, float noundef %66)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %26) #6
  %67 = load float, ptr %15, align 4, !tbaa !11
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %26, ptr noundef nonnull align 4 dereferenceable(12) %3, float noundef %67)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %24, ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull align 4 dereferenceable(12) %26)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %27) #6
  %68 = load float, ptr %16, align 4, !tbaa !11
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %27, ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef %68)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %23, 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 nonnull %27) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %26) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %25) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %24) #6
  %69 = call noundef zeroext i1 @_ZN7RiemannL16EdgeOrVertexTestERKN5Maths8TVector3IfEEPS3_iiiPi(ptr noundef nonnull align 4 dereferenceable(12) %23, ptr noundef nonnull %22, i32 noundef 0, i32 noundef 1, i32 noundef 2, ptr noundef nonnull %21)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %23) #6
  br i1 %69, label %95, label %.thread

70:                                               ; preds = %63
  %71 = fadd float %59, %61
  %72 = fcmp ogt float %71, 1.000000e+00
  br i1 %72, label %73, label %79

73:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %28) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %29) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %30) #6
  %74 = fsub float 1.000000e+00, %59
  %75 = fsub float %74, %61
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %30, ptr noundef nonnull align 4 dereferenceable(12) %2, float noundef %75)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %31) #6
  %76 = load float, ptr %15, align 4, !tbaa !11
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %31, ptr noundef nonnull align 4 dereferenceable(12) %3, float noundef %76)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %29, ptr noundef nonnull align 4 dereferenceable(12) %30, ptr noundef nonnull align 4 dereferenceable(12) %31)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %32) #6
  %77 = load float, ptr %16, align 4, !tbaa !11
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %32, ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef %77)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %28, ptr noundef nonnull align 4 dereferenceable(12) %29, ptr noundef nonnull align 4 dereferenceable(12) %32)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %32) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %31) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %30) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %29) #6
  %78 = call noundef zeroext i1 @_ZN7RiemannL16EdgeOrVertexTestERKN5Maths8TVector3IfEEPS3_iiiPi(ptr noundef nonnull align 4 dereferenceable(12) %28, ptr noundef nonnull %22, i32 noundef 2, i32 noundef 0, i32 noundef 1, ptr noundef nonnull %21)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %28) #6
  br i1 %78, label %95, label %.thread

79:                                               ; preds = %70
  store i32 2, ptr %21, align 4, !tbaa !12
  br label %.thread

80:                                               ; preds = %58
  %81 = fadd float %59, %61
  br i1 %62, label %82, label %85

82:                                               ; preds = %80
  %83 = fcmp ogt float %81, 1.000000e+00
  br i1 %83, label %89, label %84

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

85:                                               ; preds = %80
  %86 = fcmp ult float %81, 1.000000e+00
  br i1 %86, label %87, label %88

87:                                               ; preds = %85
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 550, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK7Riemann7Sphere313SweepTriangleERKN5Maths8TVector3IfEES5_S5_S5_PS3_S6_Pf) #7
  unreachable

88:                                               ; preds = %85
  store i32 2, ptr %21, align 4, !tbaa !12
  br label %.thread

89:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %33) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %34) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %35) #6
  %90 = fsub float 1.000000e+00, %59
  %91 = fsub float %90, %61
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %35, ptr noundef nonnull align 4 dereferenceable(12) %2, float noundef %91)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %36) #6
  %92 = load float, ptr %15, align 4, !tbaa !11
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %36, ptr noundef nonnull align 4 dereferenceable(12) %3, float noundef %92)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %34, ptr noundef nonnull align 4 dereferenceable(12) %35, ptr noundef nonnull align 4 dereferenceable(12) %36)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %37) #6
  %93 = load float, ptr %16, align 4, !tbaa !11
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %37, ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef %93)
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %33, ptr noundef nonnull align 4 dereferenceable(12) %34, ptr noundef nonnull align 4 dereferenceable(12) %37)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %37) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %36) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %35) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %34) #6
  %94 = call noundef zeroext i1 @_ZN7RiemannL16EdgeOrVertexTestERKN5Maths8TVector3IfEEPS3_iiiPi(ptr noundef nonnull align 4 dereferenceable(12) %33, ptr noundef nonnull %22, i32 noundef 1, i32 noundef 0, i32 noundef 2, ptr noundef nonnull %21)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %33) #6
  br i1 %94, label %95, label %.thread

95:                                               ; preds = %73, %64, %89
  %.0.sroa.phi80 = phi ptr [ %22, %64 ], [ %.0.sroa.gep66, %89 ], [ %.0.sroa.gep64, %73 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %38) #6
  %96 = load float, ptr %41, align 4, !tbaa !5
  call void @_ZN7Riemann7Sphere3C2ERKN5Maths8TVector3IfEEf(ptr noundef nonnull align 4 dereferenceable(16) %38, ptr noundef nonnull align 4 dereferenceable(12) %.0.sroa.phi80, float noundef %96)
  %97 = call noundef zeroext i1 @_ZNK7Riemann7Sphere312IntersectRayERKN5Maths8TVector3IfEES5_Pf(ptr noundef nonnull align 4 dereferenceable(16) %38, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull %17)
  br i1 %97, label %98, label %.critedge61

98:                                               ; preds = %95
  %99 = load float, ptr %17, align 4, !tbaa !11
  store float %99, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %38) #6
  br label %107

.thread:                                          ; preds = %88, %84, %79, %73, %64, %89
  %.0.sroa.phi6979 = phi ptr [ %.0.sroa.gep66, %89 ], [ %22, %64 ], [ %.0.sroa.gep64, %73 ], [ %.0.sroa.gep66, %88 ], [ %22, %84 ], [ %22, %79 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %39) #6
  %100 = load i32, ptr %21, align 4, !tbaa !12
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [3 x %"class.Maths::TVector3"], ptr %22, i64 0, i64 %101
  %103 = load float, ptr %41, align 4, !tbaa !5
  call void @_ZN7Riemann8Capsule3C2ERKN5Maths8TVector3IfEES5_f(ptr noundef nonnull align 4 dereferenceable(32) %39, ptr noundef nonnull align 4 dereferenceable(12) %.0.sroa.phi6979, ptr noundef nonnull align 4 dereferenceable(12) %102, float noundef %103)
  %104 = call noundef zeroext i1 @_ZNK7Riemann8Capsule312IntersectRayERKN5Maths8TVector3IfEES5_Pf(ptr noundef nonnull align 4 dereferenceable(32) %39, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull %17)
  br i1 %104, label %105, label %.critedge63

105:                                              ; preds = %.thread
  %106 = load float, ptr %17, align 4, !tbaa !11
  store float %106, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %39) #6
  br label %107

.critedge61:                                      ; preds = %95
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %38) #6
  br label %107

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

107:                                              ; preds = %.critedge61, %.critedge63, %105, %98
  %.3 = phi i1 [ true, %98 ], [ true, %105 ], [ false, %.critedge63 ], [ false, %.critedge61 ]
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #6
  br label %108

108:                                              ; preds = %54, %52, %107, %57
  %.4 = phi i1 [ true, %57 ], [ %.3, %107 ], [ false, %52 ], [ false, %54 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #6
  br label %109

109:                                              ; preds = %45, %108
  %.5 = phi i1 [ %.4, %108 ], [ true, %45 ]
  ret i1 %.5
}

; 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

declare noundef i32 @_ZN7Riemann9Triangle321RayIntersectTriangle2ERKN5Maths8TVector3IfEES5_S5_S5_S5_PfS6_S6_(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 #4

; 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

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