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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef float @_ZNK7Riemann15AxisAlignedBox317SqrDistanceToLineERKN5Maths8TVector3IfEES5_Pf(ptr noundef nonnull align 4 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef %3) #0 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %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 [3 x i8], align 1
  %15 = alloca i32, align 4
  %16 = alloca float, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %17 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #5
  call void @_ZNK7Riemann15AxisAlignedBox39GetCenterEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %10, ptr noundef nonnull align 4 dereferenceable(24) %17)
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %9, ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %18)
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #5
  %19 = getelementptr inbounds %"class.Riemann::AxisAlignedBox3", ptr %17, i32 0, i32 1
  %20 = getelementptr inbounds %"class.Riemann::AxisAlignedBox3", ptr %17, i32 0, i32 0
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %12, ptr noundef nonnull align 4 dereferenceable(12) %19, ptr noundef nonnull align 4 dereferenceable(12) %20)
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %12, float noundef 5.000000e-01)
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #5
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %21)
  call void @llvm.lifetime.start.p0(i64 3, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %52, %4
  %23 = load i32, ptr %15, align 4, !tbaa !9
  %24 = icmp slt i32 %23, 3
  br i1 %24, label %26, label %25

25:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %55

26:                                               ; preds = %22
  %27 = load i32, ptr %15, align 4, !tbaa !9
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %13, i32 noundef %27)
  %29 = load float, ptr %28, align 4, !tbaa !11
  %30 = fcmp olt float %29, 0.000000e+00
  br i1 %30, label %31, label %47

31:                                               ; preds = %26
  %32 = load i32, ptr %15, align 4, !tbaa !9
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef %32)
  %34 = load float, ptr %33, align 4, !tbaa !11
  %35 = fneg float %34
  %36 = load i32, ptr %15, align 4, !tbaa !9
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef %36)
  store float %35, ptr %37, align 4, !tbaa !11
  %38 = load i32, ptr %15, align 4, !tbaa !9
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %13, i32 noundef %38)
  %40 = load float, ptr %39, align 4, !tbaa !11
  %41 = fneg float %40
  %42 = load i32, ptr %15, align 4, !tbaa !9
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %13, i32 noundef %42)
  store float %41, ptr %43, align 4, !tbaa !11
  %44 = load i32, ptr %15, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [3 x i8], ptr %14, i64 0, i64 %45
  store i8 1, ptr %46, align 1, !tbaa !13
  br label %51

47:                                               ; preds = %26
  %48 = load i32, ptr %15, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [3 x i8], ptr %14, i64 0, i64 %49
  store i8 0, ptr %50, align 1, !tbaa !13
  br label %51

51:                                               ; preds = %47, %31
  br label %52

52:                                               ; preds = %51
  %53 = load i32, ptr %15, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %15, align 4, !tbaa !9
  br label %22, !llvm.loop !15

55:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store float 0.000000e+00, ptr %16, align 4, !tbaa !11
  %56 = getelementptr inbounds %"class.Maths::TVector3", ptr %13, i32 0, i32 0
  %57 = load float, ptr %56, align 4, !tbaa !17
  %58 = fcmp ogt float %57, 0.000000e+00
  br i1 %58, label %59, label %82

59:                                               ; preds = %55
  %60 = getelementptr inbounds %"class.Maths::TVector3", ptr %13, i32 0, i32 1
  %61 = load float, ptr %60, align 4, !tbaa !19
  %62 = fcmp ogt float %61, 0.000000e+00
  br i1 %62, label %63, label %72

63:                                               ; preds = %59
  %64 = getelementptr inbounds %"class.Maths::TVector3", ptr %13, i32 0, i32 2
  %65 = load float, ptr %64, align 4, !tbaa !20
  %66 = fcmp ogt float %65, 0.000000e+00
  br i1 %66, label %67, label %69

67:                                               ; preds = %63
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN7RiemannL11caseNoZerosERN5Maths8TVector3IfEERKS2_S5_PfRf(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef %68, ptr noundef nonnull align 4 dereferenceable(4) %16)
  br label %71

69:                                               ; preds = %63
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN7RiemannL5case0EjjjRN5Maths8TVector3IfEERKS2_S5_PfRf(i32 noundef 0, i32 noundef 1, i32 noundef 2, ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef %70, ptr noundef nonnull align 4 dereferenceable(4) %16)
  br label %71

71:                                               ; preds = %69, %67
  br label %81

72:                                               ; preds = %59
  %73 = getelementptr inbounds %"class.Maths::TVector3", ptr %13, i32 0, i32 2
  %74 = load float, ptr %73, align 4, !tbaa !20
  %75 = fcmp ogt float %74, 0.000000e+00
  br i1 %75, label %76, label %78

76:                                               ; preds = %72
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN7RiemannL5case0EjjjRN5Maths8TVector3IfEERKS2_S5_PfRf(i32 noundef 0, i32 noundef 2, i32 noundef 1, ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef %77, ptr noundef nonnull align 4 dereferenceable(4) %16)
  br label %80

78:                                               ; preds = %72
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN7RiemannL6case00EjjjRN5Maths8TVector3IfEERKS2_S5_PfRf(i32 noundef 0, i32 noundef 1, i32 noundef 2, ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef %79, ptr noundef nonnull align 4 dereferenceable(4) %16)
  br label %80

80:                                               ; preds = %78, %76
  br label %81

81:                                               ; preds = %80, %71
  br label %105

82:                                               ; preds = %55
  %83 = getelementptr inbounds %"class.Maths::TVector3", ptr %13, i32 0, i32 1
  %84 = load float, ptr %83, align 4, !tbaa !19
  %85 = fcmp ogt float %84, 0.000000e+00
  br i1 %85, label %86, label %95

86:                                               ; preds = %82
  %87 = getelementptr inbounds %"class.Maths::TVector3", ptr %13, i32 0, i32 2
  %88 = load float, ptr %87, align 4, !tbaa !20
  %89 = fcmp ogt float %88, 0.000000e+00
  br i1 %89, label %90, label %92

90:                                               ; preds = %86
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN7RiemannL5case0EjjjRN5Maths8TVector3IfEERKS2_S5_PfRf(i32 noundef 1, i32 noundef 2, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef %91, ptr noundef nonnull align 4 dereferenceable(4) %16)
  br label %94

92:                                               ; preds = %86
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN7RiemannL6case00EjjjRN5Maths8TVector3IfEERKS2_S5_PfRf(i32 noundef 1, i32 noundef 0, i32 noundef 2, ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef %93, ptr noundef nonnull align 4 dereferenceable(4) %16)
  br label %94

94:                                               ; preds = %92, %90
  br label %104

95:                                               ; preds = %82
  %96 = getelementptr inbounds %"class.Maths::TVector3", ptr %13, i32 0, i32 2
  %97 = load float, ptr %96, align 4, !tbaa !20
  %98 = fcmp ogt float %97, 0.000000e+00
  br i1 %98, label %99, label %101

99:                                               ; preds = %95
  %100 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN7RiemannL6case00EjjjRN5Maths8TVector3IfEERKS2_S5_PfRf(i32 noundef 2, i32 noundef 0, i32 noundef 1, ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef %100, ptr noundef nonnull align 4 dereferenceable(4) %16)
  br label %103

101:                                              ; preds = %95
  call void @_ZN7RiemannL7case000ERN5Maths8TVector3IfEERKS2_Rf(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  store float 0.000000e+00, ptr %102, align 4, !tbaa !11
  br label %103

103:                                              ; preds = %101, %99
  br label %104

104:                                              ; preds = %103, %94
  br label %105

105:                                              ; preds = %104, %81
  %106 = load float, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 3, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #5
  ret float %106
}

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

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

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; 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 void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7RiemannL11caseNoZerosERN5Maths8TVector3IfEERKS2_S5_PfRf(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 nonnull align 4 dereferenceable(4)) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7RiemannL5case0EjjjRN5Maths8TVector3IfEERKS2_S5_PfRf(i32 noundef, i32 noundef, i32 noundef, 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 nonnull align 4 dereferenceable(4)) #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7RiemannL6case00EjjjRN5Maths8TVector3IfEERKS2_S5_PfRf(i32 noundef, i32 noundef, i32 noundef, 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 nonnull align 4 dereferenceable(4)) #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN7RiemannL7case000ERN5Maths8TVector3IfEERKS2_Rf(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4)) #4

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { 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 #5 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !12, i64 0}
!18 = !{!"_ZTSN5Maths8TVector3IfEE", !12, i64 0, !12, i64 4, !12, i64 8}
!19 = !{!18, !12, i64 4}
!20 = !{!18, !12, i64 8}


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

; Function Attrs: mustprogress uwtable
define dso_local noundef float @_ZNK7Riemann15AxisAlignedBox317SqrDistanceToLineERKN5Maths8TVector3IfEES5_Pf(ptr noundef nonnull align 4 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef %3) local_unnamed_addr #0 align 2 {
  %5 = alloca %"class.Maths::TVector3", align 4
  %6 = alloca %"class.Maths::TVector3", align 4
  %7 = alloca %"class.Maths::TVector3", align 4
  %8 = alloca %"class.Maths::TVector3", align 4
  %9 = alloca %"class.Maths::TVector3", align 4
  %10 = alloca float, align 4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #5
  call void @_ZNK7Riemann15AxisAlignedBox39GetCenterEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %6, ptr noundef nonnull align 4 dereferenceable(24) %0)
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %5, ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(12) %1)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #5
  %11 = getelementptr inbounds i8, ptr %0, i64 12
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %8, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(12) %0)
  call void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %7, ptr noundef nonnull align 4 dereferenceable(12) %8, float noundef 5.000000e-01)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #5
  call void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %2)
  %12 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef 0)
  %13 = load float, ptr %12, align 4, !tbaa !5
  %14 = fcmp olt float %13, 0.000000e+00
  br i1 %14, label %15, label %24

15:                                               ; preds = %4
  %16 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 0)
  %17 = load float, ptr %16, align 4, !tbaa !5
  %18 = fneg float %17
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 0)
  store float %18, ptr %19, align 4, !tbaa !5
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef 0)
  %21 = load float, ptr %20, align 4, !tbaa !5
  %22 = fneg float %21
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef 0)
  store float %22, ptr %23, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %4, %15
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef 1)
  %26 = load float, ptr %25, align 4, !tbaa !5
  %27 = fcmp olt float %26, 0.000000e+00
  br i1 %27, label %28, label %37

28:                                               ; preds = %24
  %29 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 1)
  %30 = load float, ptr %29, align 4, !tbaa !5
  %31 = fneg float %30
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 1)
  store float %31, ptr %32, align 4, !tbaa !5
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef 1)
  %34 = load float, ptr %33, align 4, !tbaa !5
  %35 = fneg float %34
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef 1)
  store float %35, ptr %36, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %28, %24
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef 2)
  %39 = load float, ptr %38, align 4, !tbaa !5
  %40 = fcmp olt float %39, 0.000000e+00
  br i1 %40, label %41, label %50

41:                                               ; preds = %37
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 2)
  %43 = load float, ptr %42, align 4, !tbaa !5
  %44 = fneg float %43
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 2)
  store float %44, ptr %45, align 4, !tbaa !5
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef 2)
  %47 = load float, ptr %46, align 4, !tbaa !5
  %48 = fneg float %47
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 noundef 2)
  store float %48, ptr %49, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %41, %37
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  store float 0.000000e+00, ptr %10, align 4, !tbaa !5
  %51 = load float, ptr %9, align 4, !tbaa !9
  %52 = fcmp ogt float %51, 0.000000e+00
  %53 = getelementptr inbounds i8, ptr %9, i64 4
  %54 = load float, ptr %53, align 4, !tbaa !11
  %55 = fcmp ogt float %54, 0.000000e+00
  %56 = getelementptr inbounds i8, ptr %9, i64 8
  %57 = load float, ptr %56, align 4, !tbaa !12
  %58 = fcmp ogt float %57, 0.000000e+00
  br i1 %52, label %59, label %66

59:                                               ; preds = %50
  br i1 %55, label %60, label %63

60:                                               ; preds = %59
  br i1 %58, label %61, label %62

61:                                               ; preds = %60
  call void @_ZN7RiemannL11caseNoZerosERN5Maths8TVector3IfEERKS2_S5_PfRf(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef %3, ptr noundef nonnull align 4 dereferenceable(4) %10)
  br label %73

62:                                               ; preds = %60
  call void @_ZN7RiemannL5case0EjjjRN5Maths8TVector3IfEERKS2_S5_PfRf(i32 noundef 0, i32 noundef 1, i32 noundef 2, ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef %3, ptr noundef nonnull align 4 dereferenceable(4) %10)
  br label %73

63:                                               ; preds = %59
  br i1 %58, label %64, label %65

64:                                               ; preds = %63
  call void @_ZN7RiemannL5case0EjjjRN5Maths8TVector3IfEERKS2_S5_PfRf(i32 noundef 0, i32 noundef 2, i32 noundef 1, ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef %3, ptr noundef nonnull align 4 dereferenceable(4) %10)
  br label %73

65:                                               ; preds = %63
  call void @_ZN7RiemannL6case00EjjjRN5Maths8TVector3IfEERKS2_S5_PfRf(i32 noundef 0, i32 noundef 1, i32 noundef 2, ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef %3, ptr noundef nonnull align 4 dereferenceable(4) %10)
  br label %73

66:                                               ; preds = %50
  br i1 %55, label %67, label %70

67:                                               ; preds = %66
  br i1 %58, label %68, label %69

68:                                               ; preds = %67
  call void @_ZN7RiemannL5case0EjjjRN5Maths8TVector3IfEERKS2_S5_PfRf(i32 noundef 1, i32 noundef 2, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef %3, ptr noundef nonnull align 4 dereferenceable(4) %10)
  br label %73

69:                                               ; preds = %67
  call void @_ZN7RiemannL6case00EjjjRN5Maths8TVector3IfEERKS2_S5_PfRf(i32 noundef 1, i32 noundef 0, i32 noundef 2, ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef %3, ptr noundef nonnull align 4 dereferenceable(4) %10)
  br label %73

70:                                               ; preds = %66
  br i1 %58, label %71, label %72

71:                                               ; preds = %70
  call void @_ZN7RiemannL6case00EjjjRN5Maths8TVector3IfEERKS2_S5_PfRf(i32 noundef 2, i32 noundef 0, i32 noundef 1, ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef %3, ptr noundef nonnull align 4 dereferenceable(4) %10)
  br label %73

72:                                               ; preds = %70
  call void @_ZN7RiemannL7case000ERN5Maths8TVector3IfEERKS2_Rf(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(4) %10)
  store float 0.000000e+00, ptr %3, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %69, %68, %72, %71, %62, %61, %65, %64
  %74 = load float, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #5
  ret float %74
}

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

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

; 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; 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 void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7RiemannL11caseNoZerosERN5Maths8TVector3IfEERKS2_S5_PfRf(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 nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7RiemannL5case0EjjjRN5Maths8TVector3IfEERKS2_S5_PfRf(i32 noundef, i32 noundef, i32 noundef, 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 nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7RiemannL6case00EjjjRN5Maths8TVector3IfEERKS2_S5_PfRf(i32 noundef, i32 noundef, i32 noundef, 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 nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN7RiemannL7case000ERN5Maths8TVector3IfEERKS2_Rf(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { 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 #5 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSN5Maths8TVector3IfEE", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = !{!10, !6, i64 4}
!12 = !{!10, !6, i64 8}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,SROAPass,SimplifyCFGPass