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

; 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.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = type { %"struct.std::_Vector_base<Maths::TAABB3<float>, std::allocator<Maths::TAABB3<float>>>::_Vector_impl" }
%"struct.std::_Vector_base<Maths::TAABB3<float>, std::allocator<Maths::TAABB3<float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Maths::TAABB3<float>, std::allocator<Maths::TAABB3<float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Maths::TAABB3<float>, std::allocator<Maths::TAABB3<float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.BVProxy2 = type { %"class.Riemann::SAP::BoundingVolumeProxy", ptr }
%"class.Riemann::SAP::BoundingVolumeProxy" = type { ptr }
%"class.Riemann::SAP" = type { ptr, %"class.std::vector.31", %"class.std::vector.36", i64 }
%"class.std::vector.31" = type { %"struct.std::_Vector_base.32" }
%"struct.std::_Vector_base.32" = type { %"struct.std::_Vector_base<std::vector<Riemann::SAP::SweepPoint>, std::allocator<std::vector<Riemann::SAP::SweepPoint>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<Riemann::SAP::SweepPoint>, std::allocator<std::vector<Riemann::SAP::SweepPoint>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<Riemann::SAP::SweepPoint>, std::allocator<std::vector<Riemann::SAP::SweepPoint>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<Riemann::SAP::SweepPoint>, std::allocator<std::vector<Riemann::SAP::SweepPoint>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.36" = type { %"struct.std::_Vector_base.37" }
%"struct.std::_Vector_base.37" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%"class.std::allocator.38" = type { i8 }
%"class.Maths::TAABB3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3" }

@.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.21 = external hidden unnamed_addr constant [17 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
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(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths6TAABB3IfEC2ERKNS_8TVector3IfEES5_(ptr noundef nonnull align 4 dereferenceable(24), 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 zeroext i1 @_ZNK5Maths6TAABB3IfE9IntersectERKS1_(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(24)) #2 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z7TestSAPv() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::set", align 8
  %2 = alloca %"class.std::vector.18", align 8
  %3 = alloca %"class.Maths::TVector3", align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, 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 %"class.Maths::TVector3", align 4
  %11 = alloca %class.BVProxy2, align 8
  %12 = alloca %"class.Riemann::SAP", align 8
  %13 = alloca %"class.std::vector.36", align 8
  %14 = alloca %"class.std::initializer_list", align 8
  %15 = alloca [3 x i32], align 4
  %16 = alloca %"class.std::allocator.38", align 1
  %17 = alloca %"class.Maths::TAABB3", align 4
  %18 = alloca %"class.Maths::TVector3", align 4
  %19 = alloca %"class.Maths::TVector3", align 4
  %20 = alloca i32, align 4
  %21 = alloca %"class.Maths::TVector3", align 4
  %22 = alloca %"class.Maths::TVector3", align 4
  %23 = alloca %"class.Maths::TVector3", align 4
  %24 = alloca %"class.Maths::TVector3", align 4
  %25 = alloca %"class.Maths::TVector3", align 4
  %26 = alloca i64, align 8
  %27 = alloca i32, align 4
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = call i32 (ptr, ...) @printf(ptr noundef @.str.21)
  call void @llvm.lifetime.start.p0(i64 48, ptr %1) #6
  call void @_ZNSt3setImSt4lessImESaImEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %2) #6
  call void @_ZNSt6vectorIN5Maths6TAABB3IfEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %3) #6
  invoke void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %3, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %31 unwind label %61

31:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 12, ptr %6) #6
  invoke void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %6, float noundef 2.000000e+00, float noundef 2.000000e+00, float noundef 2.000000e+00)
          to label %32 unwind label %65

32:                                               ; preds = %31
  %33 = invoke noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN5Maths6TAABB3IfEESaIS2_EE12emplace_backIJNS0_8TVector3IfEES7_EEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %6)
          to label %34 unwind label %65

34:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 12, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #6
  invoke void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %7, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00)
          to label %35 unwind label %70

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #6
  invoke void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %8, float noundef 3.000000e+00, float noundef 3.000000e+00, float noundef 3.000000e+00)
          to label %36 unwind label %74

36:                                               ; preds = %35
  %37 = invoke noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN5Maths6TAABB3IfEESaIS2_EE12emplace_backIJNS0_8TVector3IfEES7_EEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %8)
          to label %38 unwind label %74

38:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #6
  invoke void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %9, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %39 unwind label %79

39:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #6
  invoke void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %10, float noundef 1.500000e+01, float noundef 1.500000e+01, float noundef 1.500000e+01)
          to label %40 unwind label %83

40:                                               ; preds = %39
  %41 = invoke noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN5Maths6TAABB3IfEESaIS2_EE12emplace_backIJNS0_8TVector3IfEES7_EEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %42 unwind label %83

42:                                               ; preds = %40
  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.start.p0(i64 16, ptr %11) #6
  invoke void @_ZN8BVProxy2C2EPSt6vectorIN5Maths6TAABB3IfEESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %2)
          to label %43 unwind label %88

43:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 64, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  %44 = getelementptr inbounds i32, ptr %15, i64 1
  store i32 1, ptr %44, align 4, !tbaa !5
  %45 = getelementptr inbounds i32, ptr %15, i64 2
  store i32 2, ptr %45, align 4, !tbaa !5
  %46 = getelementptr inbounds %"class.std::initializer_list", ptr %14, i32 0, i32 0
  store ptr %15, ptr %46, align 8, !tbaa !9
  %47 = getelementptr inbounds %"class.std::initializer_list", ptr %14, i32 0, i32 1
  store i64 3, ptr %47, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  %48 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 0
  %49 = load ptr, ptr %48, align 8
  %50 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 1
  %51 = load i64, ptr %50, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr %49, i64 %51, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %52 unwind label %92

52:                                               ; preds = %43
  invoke void @_ZN7Riemann3SAPC2EPNS0_19BoundingVolumeProxyERKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(64) %12, ptr noundef %11, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %53 unwind label %96

53:                                               ; preds = %52
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  invoke void @_ZN7Riemann3SAP5PruneEPSt3setImSt4lessImESaImEE(ptr noundef nonnull align 8 dereferenceable(64) %12, ptr noundef %1)
          to label %54 unwind label %101

54:                                               ; preds = %53
  %55 = call noundef i64 @_ZNKSt3setImSt4lessImESaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #6
  %56 = icmp eq i64 %55, 3
  br i1 %56, label %105, label %57

57:                                               ; preds = %54
  %58 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 706)
          to label %59 unwind label %101

59:                                               ; preds = %57
  invoke void @_Z10BreakPointPKcl(ptr noundef @.str.2, i64 noundef 706)
          to label %60 unwind label %101

60:                                               ; preds = %59
  br label %105

61:                                               ; preds = %0
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %4, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %5, align 4
  br label %69

65:                                               ; preds = %32, %31
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %4, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %6) #6
  br label %69

69:                                               ; preds = %65, %61
  call void @llvm.lifetime.end.p0(i64 12, ptr %3) #6
  br label %223

70:                                               ; preds = %34
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %4, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %5, align 4
  br label %78

74:                                               ; preds = %36, %35
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %4, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #6
  br label %78

78:                                               ; preds = %74, %70
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #6
  br label %223

79:                                               ; preds = %38
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %4, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %5, align 4
  br label %87

83:                                               ; preds = %40, %39
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %4, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #6
  br label %87

87:                                               ; preds = %83, %79
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #6
  br label %223

88:                                               ; preds = %42
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %4, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %5, align 4
  br label %222

92:                                               ; preds = %43
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %4, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %5, align 4
  br label %100

96:                                               ; preds = %52
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %4, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %5, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  br label %100

100:                                              ; preds = %96, %92
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  br label %221

101:                                              ; preds = %158, %117, %115, %111, %59, %57, %53
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %4, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %5, align 4
  br label %220

105:                                              ; preds = %60, %54
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %18) #6
  invoke void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %18, float noundef 1.000000e+01, float noundef 1.000000e+01, float noundef 1.000000e+01)
          to label %106 unwind label %119

106:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #6
  invoke void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %19, float noundef 1.500000e+01, float noundef 1.500000e+01, float noundef 1.500000e+01)
          to label %107 unwind label %123

107:                                              ; preds = %106
  invoke void @_ZN5Maths6TAABB3IfEC2ERKNS_8TVector3IfEES5_(ptr noundef nonnull align 4 dereferenceable(24) %17, ptr noundef nonnull align 4 dereferenceable(12) %18, ptr noundef nonnull align 4 dereferenceable(12) %19)
          to label %108 unwind label %123

108:                                              ; preds = %107
  %109 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN5Maths6TAABB3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 2) #6
  %110 = invoke noundef nonnull align 4 dereferenceable(24) ptr @_ZN5Maths6TAABB3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %109, ptr noundef nonnull align 4 dereferenceable(24) %17)
          to label %111 unwind label %123

111:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #6
  invoke void @_ZN7Riemann3SAP5PruneEPSt3setImSt4lessImESaImEE(ptr noundef nonnull align 8 dereferenceable(64) %12, ptr noundef %1)
          to label %112 unwind label %101

112:                                              ; preds = %111
  %113 = call noundef i64 @_ZNKSt3setImSt4lessImESaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #6
  %114 = icmp eq i64 %113, 1
  br i1 %114, label %128, label %115

115:                                              ; preds = %112
  %116 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 710)
          to label %117 unwind label %101

117:                                              ; preds = %115
  invoke void @_Z10BreakPointPKcl(ptr noundef @.str.2, i64 noundef 710)
          to label %118 unwind label %101

118:                                              ; preds = %117
  br label %128

119:                                              ; preds = %105
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %4, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %5, align 4
  br label %127

123:                                              ; preds = %108, %107, %106
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %4, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #6
  br label %127

127:                                              ; preds = %123, %119
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #6
  br label %220

128:                                              ; preds = %118, %112
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %129

129:                                              ; preds = %141, %128
  %130 = load i32, ptr %20, align 4, !tbaa !5
  %131 = icmp slt i32 %130, 200
  br i1 %131, label %133, label %132

132:                                              ; preds = %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %158

133:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 12, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %22) #6
  invoke void @_ZN5Maths8TVector3IfE6RandomEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %22)
          to label %134 unwind label %144

134:                                              ; preds = %133
  invoke void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %21, ptr noundef nonnull align 4 dereferenceable(12) %22, float noundef 1.000000e+02)
          to label %135 unwind label %144

135:                                              ; preds = %134
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #6
  invoke void @_ZN5Maths8TVector3IfE6RandomEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %24)
          to label %136 unwind label %148

136:                                              ; preds = %135
  invoke void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %23, ptr noundef nonnull align 4 dereferenceable(12) %24, float noundef 1.000000e+02)
          to label %137 unwind label %148

137:                                              ; preds = %136
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #6
  invoke void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %25, ptr noundef nonnull align 4 dereferenceable(12) %21, ptr noundef nonnull align 4 dereferenceable(12) %23)
          to label %138 unwind label %152

138:                                              ; preds = %137
  %139 = invoke noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN5Maths6TAABB3IfEESaIS2_EE12emplace_backIJRNS0_8TVector3IfEES7_EEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(12) %21, ptr noundef nonnull align 4 dereferenceable(12) %25)
          to label %140 unwind label %152

140:                                              ; preds = %138
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #6
  br label %141

141:                                              ; preds = %140
  %142 = load i32, ptr %20, align 4, !tbaa !5
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %20, align 4, !tbaa !5
  br label %129, !llvm.loop !14

144:                                              ; preds = %134, %133
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %4, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #6
  br label %157

148:                                              ; preds = %136, %135
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %4, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #6
  br label %156

152:                                              ; preds = %138, %137
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %4, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #6
  br label %156

156:                                              ; preds = %152, %148
  call void @llvm.lifetime.end.p0(i64 12, ptr %23) #6
  br label %157

157:                                              ; preds = %156, %144
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %220

158:                                              ; preds = %132
  invoke void @_ZN7Riemann3SAP5PruneEPSt3setImSt4lessImESaImEE(ptr noundef nonnull align 8 dereferenceable(64) %12, ptr noundef %1)
          to label %159 unwind label %101

159:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  store i64 0, ptr %26, align 8, !tbaa !16
  br label %160

160:                                              ; preds = %216, %159
  %161 = load i64, ptr %26, align 8, !tbaa !16
  %162 = call noundef i64 @_ZNKSt6vectorIN5Maths6TAABB3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %163 = icmp ult i64 %161, %162
  br i1 %163, label %165, label %164

164:                                              ; preds = %160
  store i32 5, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %219

165:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  store i64 0, ptr %28, align 8, !tbaa !16
  br label %166

166:                                              ; preds = %212, %165
  %167 = load i64, ptr %28, align 8, !tbaa !16
  %168 = call noundef i64 @_ZNKSt6vectorIN5Maths6TAABB3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %169 = icmp ult i64 %167, %168
  br i1 %169, label %171, label %170

170:                                              ; preds = %166
  store i32 8, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %215

171:                                              ; preds = %166
  %172 = load i64, ptr %26, align 8, !tbaa !16
  %173 = load i64, ptr %28, align 8, !tbaa !16
  %174 = icmp eq i64 %172, %173
  br i1 %174, label %175, label %176

175:                                              ; preds = %171
  br label %212

176:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %177 = load i64, ptr %26, align 8, !tbaa !16
  %178 = trunc i64 %177 to i32
  %179 = load i64, ptr %28, align 8, !tbaa !16
  %180 = trunc i64 %179 to i32
  %181 = invoke noundef i64 @_ZN7Riemann3SAP14PackOverlapKeyEii(i32 noundef %178, i32 noundef %180)
          to label %182 unwind label %197

182:                                              ; preds = %176
  store i64 %181, ptr %29, align 8, !tbaa !16
  %183 = load i64, ptr %26, align 8, !tbaa !16
  %184 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN5Maths6TAABB3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %183) #6
  %185 = load i64, ptr %28, align 8, !tbaa !16
  %186 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN5Maths6TAABB3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %185) #6
  %187 = invoke noundef zeroext i1 @_ZNK5Maths6TAABB3IfE9IntersectERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %184, ptr noundef nonnull align 4 dereferenceable(24) %186)
          to label %188 unwind label %197

188:                                              ; preds = %182
  br i1 %187, label %189, label %202

189:                                              ; preds = %188
  %190 = invoke noundef i64 @_ZNKSt3setImSt4lessImESaImEE5countERKm(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %191 unwind label %197

191:                                              ; preds = %189
  %192 = icmp eq i64 %190, 1
  br i1 %192, label %201, label %193

193:                                              ; preds = %191
  %194 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 727)
          to label %195 unwind label %197

195:                                              ; preds = %193
  invoke void @_Z10BreakPointPKcl(ptr noundef @.str.2, i64 noundef 727)
          to label %196 unwind label %197

196:                                              ; preds = %195
  br label %201

197:                                              ; preds = %208, %206, %202, %195, %193, %189, %182, %176
  %198 = landingpad { ptr, i32 }
          cleanup
  %199 = extractvalue { ptr, i32 } %198, 0
  store ptr %199, ptr %4, align 8
  %200 = extractvalue { ptr, i32 } %198, 1
  store i32 %200, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %220

201:                                              ; preds = %196, %191
  br label %211

202:                                              ; preds = %188
  %203 = invoke noundef i64 @_ZNKSt3setImSt4lessImESaImEE5countERKm(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %204 unwind label %197

204:                                              ; preds = %202
  %205 = icmp eq i64 %203, 0
  br i1 %205, label %210, label %206

206:                                              ; preds = %204
  %207 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 731)
          to label %208 unwind label %197

208:                                              ; preds = %206
  invoke void @_Z10BreakPointPKcl(ptr noundef @.str.2, i64 noundef 731)
          to label %209 unwind label %197

209:                                              ; preds = %208
  br label %210

210:                                              ; preds = %209, %204
  br label %211

211:                                              ; preds = %210, %201
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %212

212:                                              ; preds = %211, %175
  %213 = load i64, ptr %28, align 8, !tbaa !16
  %214 = add i64 %213, 1
  store i64 %214, ptr %28, align 8, !tbaa !16
  br label %166, !llvm.loop !17

215:                                              ; preds = %170
  br label %216

216:                                              ; preds = %215
  %217 = load i64, ptr %26, align 8, !tbaa !16
  %218 = add i64 %217, 1
  store i64 %218, ptr %26, align 8, !tbaa !16
  br label %160, !llvm.loop !18

219:                                              ; preds = %164
  store i32 1, ptr %27, align 4
  call void @_ZN7Riemann3SAPD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %12) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  call void @_ZNSt6vectorIN5Maths6TAABB3IfEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #6
  call void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %1) #6
  ret void

220:                                              ; preds = %197, %157, %127, %101
  call void @_ZN7Riemann3SAPD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %12) #6
  br label %221

221:                                              ; preds = %220, %100
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #6
  br label %222

222:                                              ; preds = %221, %88
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  br label %223

223:                                              ; preds = %222, %87, %78, %69
  call void @_ZNSt6vectorIN5Maths6TAABB3IfEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #6
  call void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %1) #6
  br label %224

224:                                              ; preds = %223
  %225 = load ptr, ptr %4, align 8
  %226 = load i32, ptr %5, align 4
  %227 = insertvalue { ptr, i32 } poison, ptr %225, 0
  %228 = insertvalue { ptr, i32 } %227, i32 %226, 1
  resume { ptr, i32 } %228
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann3SAPC2EPNS0_19BoundingVolumeProxyERKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef, ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann3SAP5PruneEPSt3setImSt4lessImESaImEE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt3setImSt4lessImESaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN7Riemann3SAP14PackOverlapKeyEii(i32 noundef, i32 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3setImSt4lessImESaImEE5countERKm(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7Riemann3SAPD2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 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 = { 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 #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 = { 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 = !{!10, !11, i64 0}
!10 = !{!"_ZTSSt16initializer_listIiE", !11, i64 0, !12, i64 8}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!10, !12, i64 8}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!12, !12, i64 0}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !15}


; 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.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = type { %"struct.std::_Vector_base<Maths::TAABB3<float>, std::allocator<Maths::TAABB3<float>>>::_Vector_impl" }
%"struct.std::_Vector_base<Maths::TAABB3<float>, std::allocator<Maths::TAABB3<float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Maths::TAABB3<float>, std::allocator<Maths::TAABB3<float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Maths::TAABB3<float>, std::allocator<Maths::TAABB3<float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.BVProxy2 = type { %"class.Riemann::SAP::BoundingVolumeProxy", ptr }
%"class.Riemann::SAP::BoundingVolumeProxy" = type { ptr }
%"class.Riemann::SAP" = type { ptr, %"class.std::vector.31", %"class.std::vector.36", i64 }
%"class.std::vector.31" = type { %"struct.std::_Vector_base.32" }
%"struct.std::_Vector_base.32" = type { %"struct.std::_Vector_base<std::vector<Riemann::SAP::SweepPoint>, std::allocator<std::vector<Riemann::SAP::SweepPoint>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<Riemann::SAP::SweepPoint>, std::allocator<std::vector<Riemann::SAP::SweepPoint>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<Riemann::SAP::SweepPoint>, std::allocator<std::vector<Riemann::SAP::SweepPoint>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<Riemann::SAP::SweepPoint>, std::allocator<std::vector<Riemann::SAP::SweepPoint>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.36" = type { %"struct.std::_Vector_base.37" }
%"struct.std::_Vector_base.37" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.38" = type { i8 }
%"class.Maths::TAABB3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3" }

@.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.21 = external hidden unnamed_addr constant [17 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
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(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths6TAABB3IfEC2ERKNS_8TVector3IfEES5_(ptr noundef nonnull align 4 dereferenceable(24), 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 zeroext i1 @_ZNK5Maths6TAABB3IfE9IntersectERKS1_(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(24)) local_unnamed_addr #2 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z7TestSAPv() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::set", align 8
  %2 = alloca %"class.std::vector.18", align 8
  %3 = alloca %"class.Maths::TVector3", align 4
  %4 = alloca %"class.Maths::TVector3", align 4
  %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.BVProxy2, align 8
  %10 = alloca %"class.Riemann::SAP", align 8
  %11 = alloca %"class.std::vector.36", align 8
  %12 = alloca [3 x i32], align 4
  %13 = alloca %"class.std::allocator.38", align 1
  %14 = alloca %"class.Maths::TAABB3", align 4
  %15 = alloca %"class.Maths::TVector3", align 4
  %16 = alloca %"class.Maths::TVector3", align 4
  %17 = alloca %"class.Maths::TVector3", align 4
  %18 = alloca %"class.Maths::TVector3", align 4
  %19 = alloca %"class.Maths::TVector3", align 4
  %20 = alloca %"class.Maths::TVector3", align 4
  %21 = alloca %"class.Maths::TVector3", align 4
  %22 = alloca i64, align 8
  %23 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.21)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #6
  call void @_ZNSt3setImSt4lessImESaImEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #6
  call void @_ZNSt6vectorIN5Maths6TAABB3IfEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #6
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %3, 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 %4) #6
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef 2.000000e+00, float noundef 2.000000e+00, float noundef 2.000000e+00)
  %24 = invoke noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN5Maths6TAABB3IfEESaIS2_EE12emplace_backIJNS0_8TVector3IfEES7_EEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4)
          to label %25 unwind label %39

25:                                               ; preds = %0
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #6
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %5, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #6
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %6, float noundef 3.000000e+00, float noundef 3.000000e+00, float noundef 3.000000e+00)
  %26 = invoke noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN5Maths6TAABB3IfEESaIS2_EE12emplace_backIJNS0_8TVector3IfEES7_EEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %6)
          to label %27 unwind label %41

27:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #6
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %7, 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 %8) #6
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %8, float noundef 1.500000e+01, float noundef 1.500000e+01, float noundef 1.500000e+01)
  %28 = invoke noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN5Maths6TAABB3IfEESaIS2_EE12emplace_backIJNS0_8TVector3IfEES7_EEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %8)
          to label %29 unwind label %43

29:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  call void @_ZN8BVProxy2C2EPSt6vectorIN5Maths6TAABB3IfEESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %12, i64 4
  store i32 1, ptr %30, align 4, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %12, i64 8
  store i32 2, ptr %31, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr nonnull %12, i64 3, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %32 unwind label %45

32:                                               ; preds = %29
  invoke void @_ZN7Riemann3SAPC2EPNS0_19BoundingVolumeProxyERKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(64) %10, ptr noundef nonnull %9, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %33 unwind label %47

33:                                               ; preds = %32
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  invoke void @_ZN7Riemann3SAP5PruneEPSt3setImSt4lessImESaImEE(ptr noundef nonnull align 8 dereferenceable(64) %10, ptr noundef nonnull %1)
          to label %34 unwind label %50

34:                                               ; preds = %33
  %35 = call noundef i64 @_ZNKSt3setImSt4lessImESaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #6
  %36 = icmp eq i64 %35, 3
  br i1 %36, label %52, label %37

37:                                               ; preds = %34
  %38 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @.str.2, i32 noundef 706)
  call void @_Z10BreakPointPKcl(ptr noundef nonnull @.str.2, i64 noundef 706)
  br label %52

39:                                               ; preds = %0
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #6
  br label %113

41:                                               ; preds = %25
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  br label %113

43:                                               ; preds = %27
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #6
  br label %113

45:                                               ; preds = %29
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %49

47:                                               ; preds = %32
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  br label %49

49:                                               ; preds = %47, %45
  %.pn = phi { ptr, i32 } [ %48, %47 ], [ %46, %45 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  br label %112

50:                                               ; preds = %63, %53, %33
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %111

52:                                               ; preds = %37, %34
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #6
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %15, float noundef 1.000000e+01, float noundef 1.000000e+01, float noundef 1.000000e+01)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %16) #6
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %16, float noundef 1.500000e+01, float noundef 1.500000e+01, float noundef 1.500000e+01)
  invoke void @_ZN5Maths6TAABB3IfEC2ERKNS_8TVector3IfEES5_(ptr noundef nonnull align 4 dereferenceable(24) %14, ptr noundef nonnull align 4 dereferenceable(12) %15, ptr noundef nonnull align 4 dereferenceable(12) %16)
          to label %53 unwind label %61

53:                                               ; preds = %52
  %54 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN5Maths6TAABB3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 2) #6
  %55 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN5Maths6TAABB3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %54, ptr noundef nonnull align 4 dereferenceable(24) %14)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #6
  invoke void @_ZN7Riemann3SAP5PruneEPSt3setImSt4lessImESaImEE(ptr noundef nonnull align 8 dereferenceable(64) %10, ptr noundef nonnull %1)
          to label %56 unwind label %50

56:                                               ; preds = %53
  %57 = call noundef i64 @_ZNKSt3setImSt4lessImESaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #6
  %58 = icmp eq i64 %57, 1
  br i1 %58, label %.preheader36, label %59

.preheader36:                                     ; preds = %59, %56
  br label %65

59:                                               ; preds = %56
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @.str.2, i32 noundef 710)
  call void @_Z10BreakPointPKcl(ptr noundef nonnull @.str.2, i64 noundef 710)
  br label %.preheader36

61:                                               ; preds = %52
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #6
  br label %111

63:                                               ; preds = %72
  invoke void @_ZN7Riemann3SAP5PruneEPSt3setImSt4lessImESaImEE(ptr noundef nonnull align 8 dereferenceable(64) %10, ptr noundef nonnull %1)
          to label %.preheader29 unwind label %50

.preheader29:                                     ; preds = %63
  %64 = call noundef i64 @_ZNKSt6vectorIN5Maths6TAABB3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %.not = icmp eq i64 %64, 0
  br i1 %.not, label %._crit_edge33, label %.preheader

65:                                               ; preds = %.preheader36, %72
  %.01430 = phi i32 [ %73, %72 ], [ 0, %.preheader36 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %17) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %18) #6
  invoke void @_ZN5Maths8TVector3IfE6RandomEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %18)
          to label %66 unwind label %74

66:                                               ; preds = %65
  invoke void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %17, ptr noundef nonnull align 4 dereferenceable(12) %18, float noundef 1.000000e+02)
          to label %67 unwind label %74

67:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %19) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %20) #6
  invoke void @_ZN5Maths8TVector3IfE6RandomEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %20)
          to label %68 unwind label %76

68:                                               ; preds = %67
  invoke void @_ZNK5Maths8TVector3IfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %19, ptr noundef nonnull align 4 dereferenceable(12) %20, float noundef 1.000000e+02)
          to label %69 unwind label %76

69:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %21) #6
  invoke void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %21, ptr noundef nonnull align 4 dereferenceable(12) %17, ptr noundef nonnull align 4 dereferenceable(12) %19)
          to label %70 unwind label %78

70:                                               ; preds = %69
  %71 = invoke noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN5Maths6TAABB3IfEESaIS2_EE12emplace_backIJRNS0_8TVector3IfEES7_EEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(12) %17, ptr noundef nonnull align 4 dereferenceable(12) %21)
          to label %72 unwind label %78

72:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #6
  %73 = add nuw nsw i32 %.01430, 1
  %exitcond.not = icmp eq i32 %73, 200
  br i1 %exitcond.not, label %63, label %65, !llvm.loop !9

74:                                               ; preds = %66, %65
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #6
  br label %81

76:                                               ; preds = %68, %67
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #6
  br label %80

78:                                               ; preds = %70, %69
  %79 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #6
  br label %80

80:                                               ; preds = %78, %76
  %.pn23 = phi { ptr, i32 } [ %79, %78 ], [ %77, %76 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %19) #6
  br label %81

81:                                               ; preds = %80, %74
  %.pn23.pn = phi { ptr, i32 } [ %.pn23, %80 ], [ %75, %74 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #6
  br label %111

.preheader:                                       ; preds = %.preheader29, %._crit_edge
  %.01332 = phi i64 [ %84, %._crit_edge ], [ 0, %.preheader29 ]
  %82 = call noundef i64 @_ZNKSt6vectorIN5Maths6TAABB3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %.not34 = icmp eq i64 %82, 0
  br i1 %.not34, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %83 = trunc i64 %.01332 to i32
  br label %87

._crit_edge33:                                    ; preds = %._crit_edge, %.preheader29
  call void @_ZN7Riemann3SAPD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %10) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  call void @_ZNSt6vectorIN5Maths6TAABB3IfEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  call void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #6
  ret void

._crit_edge:                                      ; preds = %107, %.preheader
  %84 = add nuw i64 %.01332, 1
  %85 = call noundef i64 @_ZNKSt6vectorIN5Maths6TAABB3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %86 = icmp ult i64 %84, %85
  br i1 %86, label %.preheader, label %._crit_edge33, !llvm.loop !11

87:                                               ; preds = %.lr.ph, %107
  %.031 = phi i64 [ 0, %.lr.ph ], [ %108, %107 ]
  %88 = icmp eq i64 %.01332, %.031
  br i1 %88, label %107, label %89

89:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #6
  %90 = trunc i64 %.031 to i32
  %91 = call noundef i64 @_ZN7Riemann3SAP14PackOverlapKeyEii(i32 noundef %83, i32 noundef %90)
  store i64 %91, ptr %22, align 8, !tbaa !12
  %92 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN5Maths6TAABB3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.01332) #6
  %93 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNSt6vectorIN5Maths6TAABB3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.031) #6
  %94 = call noundef zeroext i1 @_ZNK5Maths6TAABB3IfE9IntersectERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %92, ptr noundef nonnull align 4 dereferenceable(24) %93)
  br i1 %94, label %95, label %101

95:                                               ; preds = %89
  %96 = invoke noundef i64 @_ZNKSt3setImSt4lessImESaImEE5countERKm(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %97 unwind label %99

97:                                               ; preds = %95
  %98 = icmp eq i64 %96, 1
  br i1 %98, label %106, label %.sink.split

99:                                               ; preds = %101, %95
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #6
  br label %111

101:                                              ; preds = %89
  %102 = invoke noundef i64 @_ZNKSt3setImSt4lessImESaImEE5countERKm(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %103 unwind label %99

103:                                              ; preds = %101
  %104 = icmp eq i64 %102, 0
  br i1 %104, label %106, label %.sink.split

.sink.split:                                      ; preds = %103, %97
  %.sink35 = phi i32 [ 727, %97 ], [ 731, %103 ]
  %.sink = phi i64 [ 727, %97 ], [ 731, %103 ]
  %105 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @.str.2, i32 noundef %.sink35)
  call void @_Z10BreakPointPKcl(ptr noundef nonnull @.str.2, i64 noundef %.sink)
  br label %106

106:                                              ; preds = %.sink.split, %103, %97
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #6
  br label %107

107:                                              ; preds = %87, %106
  %108 = add nuw i64 %.031, 1
  %109 = call noundef i64 @_ZNKSt6vectorIN5Maths6TAABB3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %110 = icmp ult i64 %108, %109
  br i1 %110, label %87, label %._crit_edge, !llvm.loop !14

111:                                              ; preds = %99, %81, %61, %50
  %.pn23.pn.pn = phi { ptr, i32 } [ %.pn23.pn, %81 ], [ %100, %99 ], [ %51, %50 ], [ %62, %61 ]
  call void @_ZN7Riemann3SAPD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %10) #6
  br label %112

112:                                              ; preds = %111, %49
  %.pn23.pn.pn.pn = phi { ptr, i32 } [ %.pn23.pn.pn, %111 ], [ %.pn, %49 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  br label %113

113:                                              ; preds = %112, %43, %41, %39
  %.pn23.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn23.pn.pn.pn, %112 ], [ %44, %43 ], [ %42, %41 ], [ %40, %39 ]
  call void @_ZNSt6vectorIN5Maths6TAABB3IfEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  call void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn23.pn.pn.pn.pn
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann3SAPC2EPNS0_19BoundingVolumeProxyERKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef, ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann3SAP5PruneEPSt3setImSt4lessImESaImEE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN7Riemann3SAP14PackOverlapKeyEii(i32 noundef, i32 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3setImSt4lessImESaImEE5countERKm(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7Riemann3SAPD2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { 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 #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 = { 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}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = distinct !{!14, !10}


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