; LLVM IR from atlantis13579/Riemann :: Test/Test_Collision.ll (Z10TestSpherev)

; 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Maths::TVector3<float>, std::allocator<Maths::TVector3<float>>>::_Vector_impl" }
%"struct.std::_Vector_base<Maths::TVector3<float>, std::allocator<Maths::TVector3<float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Maths::TVector3<float>, std::allocator<Maths::TVector3<float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Maths::TVector3<float>, std::allocator<Maths::TVector3<float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1

declare i32 @printf(ptr noundef, ...) #0

; 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 nounwind uwtable
declare dso_local void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z10BreakPointPKcl(ptr noundef, i64 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z10TestSpherev() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.Maths::TVector3", align 4
  %2 = alloca %"class.Maths::TVector3", align 4
  %3 = alloca %"class.Maths::TVector3", align 4
  %4 = alloca %"class.Maths::TVector3", align 4
  %5 = alloca %"class.Riemann::Sphere3", align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.Maths::TVector3", align 4
  %10 = alloca %"class.Maths::TVector3", align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.Riemann::Sphere3", align 4
  %14 = alloca i32, align 4
  %15 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  call void @llvm.lifetime.start.p0(i64 12, ptr %1) #6
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %1, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 12, ptr %2) #6
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %2, float noundef 0.000000e+00, float noundef 1.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 12, ptr %3) #6
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %3, float noundef 1.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 12, ptr %4) #6
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #6
  call void @_ZN7Riemann7Sphere3C2ERKN5Maths8TVector3IfEES5_S5_S5_(ptr noundef nonnull align 4 dereferenceable(16) %5, 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)
  %16 = call noundef zeroext i1 @_ZNK7Riemann7Sphere314IntersectPointERKN5Maths8TVector3IfEE(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %1)
  br i1 %16, label %19, label %17

17:                                               ; preds = %0
  %18 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 115)
  call void @_Z10BreakPointPKcl(ptr noundef @.str.2, i64 noundef 115)
  br label %19

19:                                               ; preds = %17, %0
  %20 = call noundef zeroext i1 @_ZNK7Riemann7Sphere314IntersectPointERKN5Maths8TVector3IfEE(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %2)
  br i1 %20, label %23, label %21

21:                                               ; preds = %19
  %22 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 116)
  call void @_Z10BreakPointPKcl(ptr noundef @.str.2, i64 noundef 116)
  br label %23

23:                                               ; preds = %21, %19
  %24 = call noundef zeroext i1 @_ZNK7Riemann7Sphere314IntersectPointERKN5Maths8TVector3IfEE(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %2)
  br i1 %24, label %27, label %25

25:                                               ; preds = %23
  %26 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 117)
  call void @_Z10BreakPointPKcl(ptr noundef @.str.2, i64 noundef 117)
  br label %27

27:                                               ; preds = %25, %23
  %28 = call noundef zeroext i1 @_ZNK7Riemann7Sphere314IntersectPointERKN5Maths8TVector3IfEE(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %3)
  br i1 %28, label %31, label %29

29:                                               ; preds = %27
  %30 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 118)
  call void @_Z10BreakPointPKcl(ptr noundef @.str.2, i64 noundef 118)
  br label %31

31:                                               ; preds = %29, %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 1000, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #6
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %41, %31
  %33 = load i32, ptr %8, align 4, !tbaa !5
  %34 = load i32, ptr %6, align 4, !tbaa !5
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %48

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #6
  invoke void @_ZN5Maths8TVector3IfE6RandomEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %10)
          to label %38 unwind label %44

38:                                               ; preds = %37
  invoke void @_ZN5MathsmlIfEENS_8TVector3IT_EES2_RKS3_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %9, float noundef 1.000000e+01, ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %39 unwind label %44

39:                                               ; preds = %38
  invoke void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 4 dereferenceable(12) %9)
          to label %40 unwind label %44

40:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #6
  br label %41

41:                                               ; preds = %40
  %42 = load i32, ptr %8, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %8, align 4, !tbaa !5
  br label %32, !llvm.loop !9

44:                                               ; preds = %39, %38, %37
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %11, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %81

48:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  %49 = call noundef ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %50 = load i32, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7Riemann7Sphere327ComputeBoundingSphere_WelzlEPKN5Maths8TVector3IfEEi(ptr dead_on_unwind writable sret(%"class.Riemann::Sphere3") align 4 %13, ptr noundef %49, i32 noundef %50)
          to label %51 unwind label %57

51:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %76, %51
  %53 = load i32, ptr %14, align 4, !tbaa !5
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %61, label %56

56:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %79

57:                                               ; preds = %48
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %11, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %12, align 4
  br label %80

61:                                               ; preds = %52
  %62 = load i32, ptr %14, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %63) #6
  %65 = invoke noundef zeroext i1 @_ZNK7Riemann7Sphere314IntersectPointERKN5Maths8TVector3IfEE(ptr noundef nonnull align 4 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(12) %64)
          to label %66 unwind label %71

66:                                               ; preds = %61
  br i1 %65, label %75, label %67

67:                                               ; preds = %66
  %68 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 129)
          to label %69 unwind label %71

69:                                               ; preds = %67
  invoke void @_Z10BreakPointPKcl(ptr noundef @.str.2, i64 noundef 129)
          to label %70 unwind label %71

70:                                               ; preds = %69
  br label %75

71:                                               ; preds = %69, %67, %61
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %11, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %80

75:                                               ; preds = %70, %66
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %14, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %14, align 4, !tbaa !5
  br label %52, !llvm.loop !11

79:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %1) #6
  ret void

80:                                               ; preds = %71, %57
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  br label %81

81:                                               ; preds = %80, %44
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %1) #6
  br label %82

82:                                               ; preds = %81
  %83 = load ptr, ptr %11, align 8
  %84 = load i32, ptr %12, align 4
  %85 = insertvalue { ptr, i32 } poison, ptr %83, 0
  %86 = insertvalue { ptr, i32 } %85, i32 %84, 1
  resume { ptr, i32 } %86
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann7Sphere3C2ERKN5Maths8TVector3IfEES5_S5_S5_(ptr noundef nonnull align 4 dereferenceable(16), 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)) unnamed_addr #3 align 2

declare noundef zeroext i1 @_ZNK7Riemann7Sphere314IntersectPointERKN5Maths8TVector3IfEE(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12)) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths8TVector3IfE6RandomEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4) #3 align 2

declare i32 @__gxx_personality_v0(...)

declare void @_ZN7Riemann7Sphere327ComputeBoundingSphere_WelzlEPKN5Maths8TVector3IfEEi(ptr dead_on_unwind writable sret(%"class.Riemann::Sphere3") align 4, ptr noundef, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #4 align 2

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

attributes #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 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 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 = { 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 #6 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


; 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Maths::TVector3<float>, std::allocator<Maths::TVector3<float>>>::_Vector_impl" }
%"struct.std::_Vector_base<Maths::TVector3<float>, std::allocator<Maths::TVector3<float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Maths::TVector3<float>, std::allocator<Maths::TVector3<float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Maths::TVector3<float>, std::allocator<Maths::TVector3<float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #0

; 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 nounwind uwtable
declare dso_local void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) 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 nounwind uwtable
declare dso_local void @_Z10BreakPointPKcl(ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z10TestSpherev() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.Maths::TVector3", align 4
  %2 = alloca %"class.Maths::TVector3", align 4
  %3 = alloca %"class.Maths::TVector3", align 4
  %4 = alloca %"class.Maths::TVector3", align 4
  %5 = alloca %"class.Riemann::Sphere3", align 4
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.Maths::TVector3", align 4
  %8 = alloca %"class.Maths::TVector3", align 4
  %9 = alloca %"class.Riemann::Sphere3", align 4
  %10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %1) #7
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %1, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %2) #7
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %2, float noundef 0.000000e+00, float noundef 1.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #7
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %3, float noundef 1.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #7
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @_ZN7Riemann7Sphere3C2ERKN5Maths8TVector3IfEES5_S5_S5_(ptr noundef nonnull align 4 dereferenceable(16) %5, 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)
  %11 = call noundef zeroext i1 @_ZNK7Riemann7Sphere314IntersectPointERKN5Maths8TVector3IfEE(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %1)
  br i1 %11, label %14, label %12

12:                                               ; preds = %0
  %13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @.str.2, i32 noundef 115)
  call void @_Z10BreakPointPKcl(ptr noundef nonnull @.str.2, i64 noundef 115)
  br label %14

14:                                               ; preds = %12, %0
  %15 = call noundef zeroext i1 @_ZNK7Riemann7Sphere314IntersectPointERKN5Maths8TVector3IfEE(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %2)
  br i1 %15, label %18, label %16

16:                                               ; preds = %14
  %17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @.str.2, i32 noundef 116)
  call void @_Z10BreakPointPKcl(ptr noundef nonnull @.str.2, i64 noundef 116)
  br label %18

18:                                               ; preds = %16, %14
  %19 = call noundef zeroext i1 @_ZNK7Riemann7Sphere314IntersectPointERKN5Maths8TVector3IfEE(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %2)
  br i1 %19, label %22, label %20

20:                                               ; preds = %18
  %21 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @.str.2, i32 noundef 117)
  call void @_Z10BreakPointPKcl(ptr noundef nonnull @.str.2, i64 noundef 117)
  br label %22

22:                                               ; preds = %20, %18
  %23 = call noundef zeroext i1 @_ZNK7Riemann7Sphere314IntersectPointERKN5Maths8TVector3IfEE(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %3)
  br i1 %23, label %26, label %24

24:                                               ; preds = %22
  %25 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @.str.2, i32 noundef 118)
  call void @_Z10BreakPointPKcl(ptr noundef nonnull @.str.2, i64 noundef 118)
  br label %26

26:                                               ; preds = %24, %22
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #7
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  br label %29

27:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  %28 = call noundef ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  invoke void @_ZN7Riemann7Sphere327ComputeBoundingSphere_WelzlEPKN5Maths8TVector3IfEEi(ptr dead_on_unwind nonnull writable sret(%"class.Riemann::Sphere3") align 4 %9, ptr noundef %28, i32 noundef 1000)
          to label %.preheader unwind label %37

29:                                               ; preds = %26, %32
  %.01216 = phi i32 [ 0, %26 ], [ %33, %32 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #7
  invoke void @_ZN5Maths8TVector3IfE6RandomEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %8)
          to label %30 unwind label %34

30:                                               ; preds = %29
  invoke void @_ZN5MathsmlIfEENS_8TVector3IT_EES2_RKS3_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %7, float noundef 1.000000e+01, ptr noundef nonnull align 4 dereferenceable(12) %8)
          to label %31 unwind label %34

31:                                               ; preds = %30
  invoke void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(12) %7)
          to label %32 unwind label %34

32:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #7
  %33 = add nuw nsw i32 %.01216, 1
  %exitcond.not = icmp eq i32 %33, 1000
  br i1 %exitcond.not, label %27, label %29, !llvm.loop !5

34:                                               ; preds = %31, %30, %29
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #7
  br label %48

36:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %1) #7
  ret void

37:                                               ; preds = %27
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %47

.preheader:                                       ; preds = %27, %46
  %indvars.iv = phi i64 [ %indvars.iv.next, %46 ], [ 0, %27 ]
  %39 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv) #7
  %40 = invoke noundef zeroext i1 @_ZNK7Riemann7Sphere314IntersectPointERKN5Maths8TVector3IfEE(ptr noundef nonnull align 4 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(12) %39)
          to label %41 unwind label %44

41:                                               ; preds = %.preheader
  br i1 %40, label %46, label %42

42:                                               ; preds = %41
  %43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @.str.2, i32 noundef 129)
  call void @_Z10BreakPointPKcl(ptr noundef nonnull @.str.2, i64 noundef 129)
  br label %46

44:                                               ; preds = %.preheader
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %47

46:                                               ; preds = %41, %42
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond19.not = icmp eq i64 %indvars.iv.next, 1000
  br i1 %exitcond19.not, label %36, label %.preheader, !llvm.loop !7

47:                                               ; preds = %44, %37
  %.pn = phi { ptr, i32 } [ %45, %44 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  br label %48

48:                                               ; preds = %47, %34
  %.pn14 = phi { ptr, i32 } [ %35, %34 ], [ %.pn, %47 ]
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn14
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann7Sphere3C2ERKN5Maths8TVector3IfEES5_S5_S5_(ptr noundef nonnull align 4 dereferenceable(16), 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)) unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths8TVector3IfE6RandomEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4) local_unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

declare void @_ZN7Riemann7Sphere327ComputeBoundingSphere_WelzlEPKN5Maths8TVector3IfEEi(ptr dead_on_unwind writable sret(%"class.Riemann::Sphere3") align 4, ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

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

attributes #0 = { nofree 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { 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 #6 = { 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 #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}


; Effective O3 passes: GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass