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

; 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)) #1 align 2

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

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

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

24:                                               ; preds = %82, %4
  %25 = load i32, ptr %14, align 4, !tbaa !11
  %26 = icmp slt i32 %25, 3
  br i1 %26, label %28, label %27

27:                                               ; preds = %24
  store i32 2, ptr %15, align 4
  br label %85

28:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = load i32, ptr %14, align 4, !tbaa !11
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %29, i32 noundef %30)
  %32 = load float, ptr %31, align 4, !tbaa !9
  %33 = call float @llvm.fabs.f32(float %32)
  %34 = fcmp olt float %33, 0x3EE4F8B580000000
  br i1 %34, label %35, label %48

35:                                               ; preds = %28
  %36 = load i32, ptr %14, align 4, !tbaa !11
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %10, i32 noundef %36)
  %38 = load float, ptr %37, align 4, !tbaa !9
  %39 = fcmp ogt float %38, 0.000000e+00
  br i1 %39, label %45, label %40

40:                                               ; preds = %35
  %41 = load i32, ptr %14, align 4, !tbaa !11
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %11, i32 noundef %41)
  %43 = load float, ptr %42, align 4, !tbaa !9
  %44 = fcmp olt float %43, 0.000000e+00
  br i1 %44, label %45, label %46

45:                                               ; preds = %40, %35
  store i1 false, ptr %5, align 1
  store i32 1, ptr %15, align 4
  br label %79

46:                                               ; preds = %40
  store float 0.000000e+00, ptr %16, align 4, !tbaa !9
  store float 0x47EFFFFFE0000000, ptr %17, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %46
  br label %64

48:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = load i32, ptr %14, align 4, !tbaa !11
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %49, i32 noundef %50)
  %52 = load float, ptr %51, align 4, !tbaa !9
  %53 = fdiv float 1.000000e+00, %52
  store float %53, ptr %18, align 4, !tbaa !9
  %54 = load i32, ptr %14, align 4, !tbaa !11
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %10, i32 noundef %54)
  %56 = load float, ptr %55, align 4, !tbaa !9
  %57 = load float, ptr %18, align 4, !tbaa !9
  %58 = fmul float %56, %57
  store float %58, ptr %16, align 4, !tbaa !9
  %59 = load i32, ptr %14, align 4, !tbaa !11
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %11, i32 noundef %59)
  %61 = load float, ptr %60, align 4, !tbaa !9
  %62 = load float, ptr %18, align 4, !tbaa !9
  %63 = fmul float %61, %62
  store float %63, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %64

64:                                               ; preds = %48, %47
  %65 = load float, ptr %16, align 4, !tbaa !9
  %66 = load float, ptr %17, align 4, !tbaa !9
  %67 = fcmp ogt float %65, %66
  br i1 %67, label %68, label %69

68:                                               ; preds = %64
  call void @_ZSt4swapIfENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17) #5
  br label %69

69:                                               ; preds = %68, %64
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %71 = load float, ptr %70, align 4, !tbaa !9
  store float %71, ptr %12, align 4, !tbaa !9
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %73 = load float, ptr %72, align 4, !tbaa !9
  store float %73, ptr %13, align 4, !tbaa !9
  %74 = load float, ptr %12, align 4, !tbaa !9
  %75 = load float, ptr %13, align 4, !tbaa !9
  %76 = fcmp ogt float %74, %75
  br i1 %76, label %77, label %78

77:                                               ; preds = %69
  store i1 false, ptr %5, align 1
  store i32 1, ptr %15, align 4
  br label %79

78:                                               ; preds = %69
  store i32 0, ptr %15, align 4
  br label %79

79:                                               ; preds = %78, %77, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  %80 = load i32, ptr %15, align 4
  switch i32 %80, label %85 [
    i32 0, label %81
  ]

81:                                               ; preds = %79
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr %14, align 4, !tbaa !11
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %14, align 4, !tbaa !11
  br label %24, !llvm.loop !13

85:                                               ; preds = %79, %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  %86 = load i32, ptr %15, align 4
  switch i32 %86, label %94 [
    i32 2, label %87
  ]

87:                                               ; preds = %85
  %88 = load float, ptr %13, align 4, !tbaa !9
  %89 = fcmp olt float %88, 0.000000e+00
  br i1 %89, label %90, label %91

90:                                               ; preds = %87
  store i1 false, ptr %5, align 1
  store i32 1, ptr %15, align 4
  br label %94

91:                                               ; preds = %87
  %92 = load float, ptr %12, align 4, !tbaa !9
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  store float %92, ptr %93, align 4, !tbaa !9
  store i1 true, ptr %5, align 1
  store i32 1, ptr %15, align 4
  br label %94

94:                                               ; preds = %91, %90, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #5
  %95 = load i1, ptr %5, align 1
  ret i1 %95
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #4

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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

; 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 #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK7Riemann15AxisAlignedBox312IntersectRayERKN5Maths8TVector3IfEES5_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 nocapture noundef writeonly %3) local_unnamed_addr #3 align 2 {
  %5 = alloca %"class.Maths::TVector3", align 4
  %6 = alloca %"class.Maths::TVector3", align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #5
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %5, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %1)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #5
  %11 = getelementptr inbounds i8, ptr %0, i64 12
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %6, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(12) %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  store float 0.000000e+00, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  store float 0x47EFFFFFE0000000, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  %12 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %2, i32 noundef 0)
  %13 = load float, ptr %12, align 4, !tbaa !5
  %14 = call float @llvm.fabs.f32(float %13)
  %15 = fcmp olt float %14, 0x3EE4F8B580000000
  br i1 %15, label %80, label %88

16:                                               ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  %17 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %2, i32 noundef 1)
  %18 = load float, ptr %17, align 4, !tbaa !5
  %19 = call float @llvm.fabs.f32(float %18)
  %20 = fcmp olt float %19, 0x3EE4F8B580000000
  br i1 %20, label %21, label %29

21:                                               ; preds = %16
  %22 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 1)
  %23 = load float, ptr %22, align 4, !tbaa !5
  %24 = fcmp ogt float %23, 0.000000e+00
  br i1 %24, label %.critedge, label %25

25:                                               ; preds = %21
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 1)
  %27 = load float, ptr %26, align 4, !tbaa !5
  %28 = fcmp olt float %27, 0.000000e+00
  br i1 %28, label %.critedge, label %.thread

.thread:                                          ; preds = %25
  store float 0.000000e+00, ptr %9, align 4, !tbaa !5
  store float 0x47EFFFFFE0000000, ptr %10, align 4, !tbaa !5
  br label %41

29:                                               ; preds = %16
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %2, i32 noundef 1)
  %31 = load float, ptr %30, align 4, !tbaa !5
  %32 = fdiv float 1.000000e+00, %31
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 1)
  %34 = load float, ptr %33, align 4, !tbaa !5
  %35 = fmul float %32, %34
  store float %35, ptr %9, align 4, !tbaa !5
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 1)
  %37 = load float, ptr %36, align 4, !tbaa !5
  %38 = fmul float %32, %37
  %.pre = load float, ptr %9, align 4, !tbaa !5
  store float %38, ptr %10, align 4, !tbaa !5
  %39 = fcmp ogt float %.pre, %38
  br i1 %39, label %40, label %41

40:                                               ; preds = %29
  call void @_ZSt4swapIfENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10) #5
  br label %41

41:                                               ; preds = %.thread, %40, %29
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %43 = load float, ptr %42, align 4, !tbaa !5
  store float %43, ptr %7, align 4, !tbaa !5
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %45 = load float, ptr %44, align 4, !tbaa !5
  store float %45, ptr %8, align 4, !tbaa !5
  %46 = load float, ptr %7, align 4, !tbaa !5
  %47 = fcmp ule float %46, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  br i1 %47, label %48, label %.loopexit

48:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %2, i32 noundef 2)
  %50 = load float, ptr %49, align 4, !tbaa !5
  %51 = call float @llvm.fabs.f32(float %50)
  %52 = fcmp olt float %51, 0x3EE4F8B580000000
  br i1 %52, label %53, label %61

53:                                               ; preds = %48
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 2)
  %55 = load float, ptr %54, align 4, !tbaa !5
  %56 = fcmp ogt float %55, 0.000000e+00
  br i1 %56, label %.critedge, label %57

57:                                               ; preds = %53
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 2)
  %59 = load float, ptr %58, align 4, !tbaa !5
  %60 = fcmp olt float %59, 0.000000e+00
  br i1 %60, label %.critedge, label %.thread28

.thread28:                                        ; preds = %57
  store float 0.000000e+00, ptr %9, align 4, !tbaa !5
  store float 0x47EFFFFFE0000000, ptr %10, align 4, !tbaa !5
  br label %73

61:                                               ; preds = %48
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %2, i32 noundef 2)
  %63 = load float, ptr %62, align 4, !tbaa !5
  %64 = fdiv float 1.000000e+00, %63
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 2)
  %66 = load float, ptr %65, align 4, !tbaa !5
  %67 = fmul float %64, %66
  store float %67, ptr %9, align 4, !tbaa !5
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 2)
  %69 = load float, ptr %68, align 4, !tbaa !5
  %70 = fmul float %64, %69
  %.pre26 = load float, ptr %9, align 4, !tbaa !5
  store float %70, ptr %10, align 4, !tbaa !5
  %71 = fcmp ogt float %.pre26, %70
  br i1 %71, label %72, label %73

72:                                               ; preds = %61
  call void @_ZSt4swapIfENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10) #5
  br label %73

73:                                               ; preds = %.thread28, %72, %61
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %75 = load float, ptr %74, align 4, !tbaa !5
  store float %75, ptr %7, align 4, !tbaa !5
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %77 = load float, ptr %76, align 4, !tbaa !5
  %78 = load float, ptr %7, align 4, !tbaa !5
  %79 = fcmp ogt float %78, %77
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  %.old24 = fcmp olt float %77, 0.000000e+00
  %or.cond = or i1 %79, %.old24
  br i1 %or.cond, label %.loopexit, label %107

80:                                               ; preds = %4
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 0)
  %82 = load float, ptr %81, align 4, !tbaa !5
  %83 = fcmp ogt float %82, 0.000000e+00
  br i1 %83, label %.critedge, label %84

84:                                               ; preds = %80
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 0)
  %86 = load float, ptr %85, align 4, !tbaa !5
  %87 = fcmp olt float %86, 0.000000e+00
  br i1 %87, label %.critedge, label %.thread30

.thread30:                                        ; preds = %84
  store float 0.000000e+00, ptr %9, align 4, !tbaa !5
  store float 0x47EFFFFFE0000000, ptr %10, align 4, !tbaa !5
  br label %100

88:                                               ; preds = %4
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %2, i32 noundef 0)
  %90 = load float, ptr %89, align 4, !tbaa !5
  %91 = fdiv float 1.000000e+00, %90
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 noundef 0)
  %93 = load float, ptr %92, align 4, !tbaa !5
  %94 = fmul float %91, %93
  store float %94, ptr %9, align 4, !tbaa !5
  %95 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths8TVector3IfEixEi(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 0)
  %96 = load float, ptr %95, align 4, !tbaa !5
  %97 = fmul float %91, %96
  store float %97, ptr %10, align 4, !tbaa !5
  %98 = fcmp ogt float %94, %97
  br i1 %98, label %99, label %100

99:                                               ; preds = %88
  call void @_ZSt4swapIfENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10) #5
  br label %100

100:                                              ; preds = %.thread30, %99, %88
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %102 = load float, ptr %101, align 4, !tbaa !5
  store float %102, ptr %7, align 4, !tbaa !5
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %104 = load float, ptr %103, align 4, !tbaa !5
  store float %104, ptr %8, align 4, !tbaa !5
  %105 = load float, ptr %7, align 4, !tbaa !5
  %106 = fcmp ule float %105, %104
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  br i1 %106, label %16, label %.loopexit

.critedge:                                        ; preds = %57, %53, %25, %21, %80, %84
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  br label %.loopexit

107:                                              ; preds = %73
  store float %78, ptr %3, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %100, %41, %73, %.critedge, %107
  %.3 = phi i1 [ true, %107 ], [ false, %.critedge ], [ false, %73 ], [ false, %41 ], [ false, %100 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #5
  ret i1 %.3
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIfENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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"}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass