; LLVM IR from atlantis13579/Riemann :: Src/Geometry/GeometryBoolean.ll (ZN7Riemann15GeometryBoolean7ComputeEv)

; 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::TIndex2" = type { i32, i32 }
%"class.Maths::TVector3" = type { float, float, float }
%"class.Riemann::DynamicMesh" = type <{ %"class.std::vector.7", %"class.std::vector.7", %"class.std::vector.7", %"class.std::vector.12", %"class.std::vector.17", %"class.Riemann::ListSet", %"class.std::vector.32", %"class.std::vector.32", %"class.std::vector.17", %"class.std::vector", i32, [4 x i8], %"class.std::vector.37", %"class.std::vector.17", ptr, %"class.Maths::TAABB3", %"struct.Maths::Transform", [4 x i8], i64, %"class.std::__cxx11::basic_string", i8, i8, i8, i8, [4 x i8] }>
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = 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 }
%"class.std::vector.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = type { %"struct.std::_Vector_base<Maths::TVector2<float>, std::allocator<Maths::TVector2<float>>>::_Vector_impl" }
%"struct.std::_Vector_base<Maths::TVector2<float>, std::allocator<Maths::TVector2<float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Maths::TVector2<float>, std::allocator<Maths::TVector2<float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Maths::TVector2<float>, std::allocator<Maths::TVector2<float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Riemann::ListSet" = type { %"class.std::vector.22", %"class.std::vector.27", %"class.std::vector" }
%"class.std::vector.22" = type { %"struct.std::_Vector_base.23" }
%"struct.std::_Vector_base.23" = type { %"struct.std::_Vector_base<Riemann::ListSet<int>::Header, std::allocator<Riemann::ListSet<int>::Header>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::ListSet<int>::Header, std::allocator<Riemann::ListSet<int>::Header>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::ListSet<int>::Header, std::allocator<Riemann::ListSet<int>::Header>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::ListSet<int>::Header, std::allocator<Riemann::ListSet<int>::Header>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.27" = type { %"struct.std::_Vector_base.28" }
%"struct.std::_Vector_base.28" = type { %"struct.std::_Vector_base<Riemann::ListSet<int>::Block, std::allocator<Riemann::ListSet<int>::Block>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::ListSet<int>::Block, std::allocator<Riemann::ListSet<int>::Block>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::ListSet<int>::Block, std::allocator<Riemann::ListSet<int>::Block>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::ListSet<int>::Block, std::allocator<Riemann::ListSet<int>::Block>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.32" = type { %"struct.std::_Vector_base.33" }
%"struct.std::_Vector_base.33" = type { %"struct.std::_Vector_base<Maths::TIndex3<int>, std::allocator<Maths::TIndex3<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<Maths::TIndex3<int>, std::allocator<Maths::TIndex3<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Maths::TIndex3<int>, std::allocator<Maths::TIndex3<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Maths::TIndex3<int>, std::allocator<Maths::TIndex3<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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::vector.37" = type { %"struct.std::_Vector_base.38" }
%"struct.std::_Vector_base.38" = type { %"struct.std::_Vector_base<Riemann::DynamicMesh::Edge, std::allocator<Riemann::DynamicMesh::Edge>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::DynamicMesh::Edge, std::allocator<Riemann::DynamicMesh::Edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::DynamicMesh::Edge, std::allocator<Riemann::DynamicMesh::Edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::DynamicMesh::Edge, std::allocator<Riemann::DynamicMesh::Edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Maths::TAABB3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3" }
%"struct.Maths::Transform" = type { %"class.Maths::TVector3", %"class.Maths::Quaternion" }
%"class.Maths::Quaternion" = type { float, float, float, float }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.Riemann::DynamicMeshAABBTree" = type { ptr, %"class.std::vector", %"class.std::vector.60", %"class.std::vector", i32, i32 }
%"class.std::vector.60" = type { %"struct.std::_Vector_base.61" }
%"struct.std::_Vector_base.61" = 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 }
%"struct.Riemann::IntersectionsQueryResult" = type { %"class.std::vector.65", %"class.std::vector.70", %"class.std::vector.75" }
%"class.std::vector.65" = type { %"struct.std::_Vector_base.66" }
%"struct.std::_Vector_base.66" = type { %"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::PointIntersection, std::allocator<Riemann::IntersectionsQueryResult::PointIntersection>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::PointIntersection, std::allocator<Riemann::IntersectionsQueryResult::PointIntersection>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::PointIntersection, std::allocator<Riemann::IntersectionsQueryResult::PointIntersection>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::PointIntersection, std::allocator<Riemann::IntersectionsQueryResult::PointIntersection>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.70" = type { %"struct.std::_Vector_base.71" }
%"struct.std::_Vector_base.71" = type { %"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::SegmentIntersection, std::allocator<Riemann::IntersectionsQueryResult::SegmentIntersection>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::SegmentIntersection, std::allocator<Riemann::IntersectionsQueryResult::SegmentIntersection>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::SegmentIntersection, std::allocator<Riemann::IntersectionsQueryResult::SegmentIntersection>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::SegmentIntersection, std::allocator<Riemann::IntersectionsQueryResult::SegmentIntersection>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.75" = type { %"struct.std::_Vector_base.76" }
%"struct.std::_Vector_base.76" = type { %"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::PolygonIntersection, std::allocator<Riemann::IntersectionsQueryResult::PolygonIntersection>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::PolygonIntersection, std::allocator<Riemann::IntersectionsQueryResult::PolygonIntersection>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::PolygonIntersection, std::allocator<Riemann::IntersectionsQueryResult::PolygonIntersection>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::PolygonIntersection, std::allocator<Riemann::IntersectionsQueryResult::PolygonIntersection>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Riemann::GeometryCut" = type { [2 x ptr], float, i8, i8, [2 x %"class.std::vector"], [2 x %"class.std::vector"] }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_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.__gnu_cxx::__normal_iterator.57" = type { ptr }
%"struct.Riemann::FEdgeCollapseInfo" = type { i32, i32, %"class.Maths::TIndex2", i8, i32, %"class.Maths::TIndex2", %"class.Maths::TIndex2", %"class.Maths::TIndex2", float }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.std::vector.106" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.Riemann::TFastWindingTree" = type { ptr, %"class.std::map.110", float, i32, i64 }
%"class.std::map.110" = type { %"class.std::_Rb_tree.111" }
%"class.std::_Rb_tree.111" = type { %"struct.std::_Rb_tree<int, std::pair<const int, Riemann::TFastWindingTree::FWNInfo>, std::_Select1st<std::pair<const int, Riemann::TFastWindingTree::FWNInfo>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, Riemann::TFastWindingTree::FWNInfo>, std::_Select1st<std::pair<const int, Riemann::TFastWindingTree::FWNInfo>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::allocator.9" = type { i8 }
%"struct.Riemann::FQueryOptions" = type { float, %"class.std::function" }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.115 = type { ptr }
%"class.Riemann::Triangle3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3" }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.std::map" = type { %"class.std::_Rb_tree.3" }
%"class.std::_Rb_tree.3" = type { %"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.Riemann::SparseSpatialHash3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.std::vector.116" }
%"class.std::vector.116" = type { %"struct.std::_Vector_base.117" }
%"struct.std::_Vector_base.117" = type { %"struct.std::_Vector_base<std::vector<Riemann::SparseSpatialHash3<int>::Element>, std::allocator<std::vector<Riemann::SparseSpatialHash3<int>::Element>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<Riemann::SparseSpatialHash3<int>::Element>, std::allocator<std::vector<Riemann::SparseSpatialHash3<int>::Element>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<Riemann::SparseSpatialHash3<int>::Element>, std::allocator<std::vector<Riemann::SparseSpatialHash3<int>::Element>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<Riemann::SparseSpatialHash3<int>::Element>, std::allocator<std::vector<Riemann::SparseSpatialHash3<int>::Element>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Riemann::SparseOctree" = type <{ %"class.std::vector.121", %"class.Riemann::SparseGrid3", %"class.Riemann::ListSet", %"class.std::set", %"class.std::unordered_map", %"class.Maths::TVector3", float, i32, [4 x i8] }>
%"class.std::vector.121" = type { %"struct.std::_Vector_base.122" }
%"struct.std::_Vector_base.122" = type { %"struct.std::_Vector_base<Riemann::SparseOctree::Cell, std::allocator<Riemann::SparseOctree::Cell>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::SparseOctree::Cell, std::allocator<Riemann::SparseOctree::Cell>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::SparseOctree::Cell, std::allocator<Riemann::SparseOctree::Cell>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::SparseOctree::Cell, std::allocator<Riemann::SparseOctree::Cell>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Riemann::SparseGrid3" = type { %"class.std::map.126" }
%"class.std::map.126" = type { %"class.std::_Rb_tree.127" }
%"class.std::_Rb_tree.127" = type { %"struct.std::_Rb_tree<Maths::TVector3<int>, std::pair<const Maths::TVector3<int>, int>, std::_Select1st<std::pair<const Maths::TVector3<int>, int>>, std::less<Maths::TVector3<int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<Maths::TVector3<int>, std::pair<const Maths::TVector3<int>, int>, std::_Select1st<std::pair<const Maths::TVector3<int>, int>>, std::less<Maths::TVector3<int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%class.anon.137 = type { ptr }
%class.anon.138 = type { ptr, ptr, %class.anon.137 }
%class.anon.139 = type { ptr, ptr, %class.anon.137 }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair.142" = type <{ %"struct.std::_Rb_tree_iterator", i8, [7 x i8] }>
%"class.Riemann::Segment3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3" }
%"struct.Riemann::FEdgeSplitInfo" = type { i32, %"class.Maths::TIndex2", %"class.Maths::TIndex2", %"class.Maths::TIndex2", i8, i32, %"class.Maths::TIndex2", %"class.Maths::TIndex3", float }
%"class.Maths::TIndex3" = type { i32, i32, i32 }
%"class.Riemann::FDynamicMeshEditor" = type { ptr }
%"class.Riemann::FMeshIndexMappings" = type { %"struct.Riemann::FIndexMapi", %"struct.Riemann::FIndexMapi", %"struct.Riemann::FIndexMapi", %"struct.Riemann::FIndexMapi", %"class.std::vector.45", %"class.std::vector.45" }
%"struct.Riemann::FIndexMapi" = type <{ %"class.std::map", %"class.std::map", i8, i8, [6 x i8] }>
%"class.std::vector.45" = type { %"struct.std::_Vector_base.46" }
%"struct.std::_Vector_base.46" = type { %"struct.std::_Vector_base<Riemann::FIndexMapi, std::allocator<Riemann::FIndexMapi>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::FIndexMapi, std::allocator<Riemann::FIndexMapi>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::FIndexMapi, std::allocator<Riemann::FIndexMapi>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::FIndexMapi, std::allocator<Riemann::FIndexMapi>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::function.145" = type { %"class.std::_Function_base", ptr }
%"class.Riemann::GeometryBoolean" = type { i32, float, i8, i8, i8, i8, i8, float, float, i8, i8, i8, float, i8, float, i32, [2 x ptr], [2 x %"struct.Maths::Transform"], ptr, %"struct.Maths::Transform", %"class.std::vector", %"class.std::set", i8, [7 x i8], %"struct.Riemann::FIndexMapi" }
%"struct.Riemann::DynamicMesh::Edge" = type { %"class.Maths::TIndex2", %"class.Maths::TIndex2" }
%"struct.std::pair.140" = type { i32, i32 }

@.str.1 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@__PRETTY_FUNCTION__._ZN7Riemann15GeometryBoolean7ComputeEv = external hidden unnamed_addr constant [41 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Riemann10MergeEdgesERKNS_18FMeshIndexMappingsEPPNS_11DynamicMeshEPKSt6vectorIiSaIiEERKSt3mapIiiSt4lessIiESaISt4pairIKiiEEEPNS_15GeometryBooleanE(ptr noundef nonnull align 8 dereferenceable(464), ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(48), 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 noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef) #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK7Riemann11DynamicMesh8GetEdgeVEi(ptr dead_on_unwind noalias writable sret(%"class.Maths::TIndex2") align 4, ptr noundef nonnull align 8 dereferenceable(452), i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK7Riemann11DynamicMesh8FindEdgeEii(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef, i32 noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK7Riemann18FMeshIndexMappings12GetNewVertexEi(ptr noundef nonnull align 8 dereferenceable(464), i32 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsBoundaryEdgeEi(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK7Riemann11DynamicMesh8GetEdgeVEiRN5Maths8TVector3IfEES4_(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef, 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(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #4 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann21SimplifyAlongNewEdgesEiPPNS_11DynamicMeshEPSt6vectorIiSaIiEERSt3mapIiiSt4lessIiESaISt4pairIKiiEEEPNS_15GeometryBooleanE(i32 noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(48), ptr noundef) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt3setIiSt4lessIiESaIiEEC2IN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiS2_EEEEET_SB_(ptr noundef nonnull align 8 dereferenceable(48), ptr, ptr) unnamed_addr #0 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZN7Riemann11DynamicMesh7GetEdgeEi(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef) #2 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7Riemann17FEdgeCollapseInfoC2Ev(ptr noundef nonnull align 4 dereferenceable(52)) unnamed_addr #3 align 2

declare noundef i32 @_ZN7Riemann11DynamicMesh12CollapseEdgeEiifRNS_17FEdgeCollapseInfoE(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef, i32 noundef, float noundef, ptr noundef nonnull align 4 dereferenceable(52)) #7

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Riemann15GeometryBoolean7ComputeEv(ptr noundef nonnull align 8 dereferenceable(344) %0) #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca %"class.Riemann::DynamicMesh", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca [2 x ptr], align 16
  %8 = alloca %"class.Maths::TAABB3", align 4
  %9 = alloca %"class.Maths::TAABB3", align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.Maths::Transform", align 4
  %12 = alloca %"class.Maths::TVector3", align 4
  %13 = alloca %"class.Maths::TVector3", align 4
  %14 = alloca %"struct.Maths::Transform", align 4
  %15 = alloca %"class.Maths::TVector3", align 4
  %16 = alloca [2 x %"class.Riemann::DynamicMeshAABBTree"], align 16
  %17 = alloca ptr, align 8
  %18 = alloca %"struct.Riemann::IntersectionsQueryResult", align 8
  %19 = alloca i8, align 1
  %20 = alloca %"class.Riemann::GeometryCut", align 8
  %21 = alloca i32, align 4
  %22 = alloca float, align 4
  %23 = alloca float, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %"class.std::vector", align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca [2 x i32], align 4
  %32 = alloca %"class.Maths::TVector3", align 4
  %33 = alloca %"class.Maths::TVector3", align 4
  %34 = alloca %"class.Maths::TVector3", align 4
  %35 = alloca i32, align 4
  %36 = alloca %"class.std::set", align 8
  %37 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %38 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  %41 = alloca %"class.Maths::TVector3", align 4
  %42 = alloca %"class.Maths::TVector3", align 4
  %43 = alloca %"class.Maths::TVector3", align 4
  %44 = alloca %"class.Maths::TIndex2", align 4
  %45 = alloca %"struct.Riemann::FEdgeCollapseInfo", align 4
  %46 = alloca i32, align 4
  %47 = alloca i32, align 4
  %48 = alloca i32, align 4
  %49 = alloca i8, align 1
  %50 = alloca %"struct.std::pair", align 8
  %51 = alloca [2 x %"class.std::vector"], align 16
  %52 = alloca [2 x %"class.std::set"], align 16
  %53 = alloca float, align 4
  %54 = alloca [2 x %"class.std::vector.106"], align 16
  %55 = alloca %"class.std::vector", align 8
  %56 = alloca i32, align 4
  %57 = alloca i32, align 4
  %58 = alloca %"class.Riemann::TFastWindingTree", align 8
  %59 = alloca ptr, align 8
  %60 = alloca ptr, align 8
  %61 = alloca i32, align 4
  %62 = alloca i8, align 1
  %63 = alloca i8, align 1
  %64 = alloca %"class.std::vector.7", align 8
  %65 = alloca %"class.std::allocator.9", align 1
  %66 = alloca i64, align 8
  %67 = alloca %"class.Maths::TVector3", align 4
  %68 = alloca float, align 4
  %69 = alloca %"struct.Riemann::FQueryOptions", align 8
  %70 = alloca %"class.std::function", align 8
  %71 = alloca %class.anon.115, align 8
  %72 = alloca i32, align 4
  %73 = alloca %"class.Riemann::Triangle3", align 4
  %74 = alloca %"class.Maths::TVector3", align 4
  %75 = alloca float, align 4
  %76 = alloca i32, align 4
  %77 = alloca %"class.Maths::TVector3", align 4
  %78 = alloca %"class.Maths::TVector3", align 4
  %79 = alloca float, align 4
  %80 = alloca i8, align 1
  %81 = alloca i32, align 4
  %82 = alloca %"struct.Riemann::FQueryOptions", align 8
  %83 = alloca %"class.std::function", align 8
  %84 = alloca %"struct.std::_Bit_reference", align 8
  %85 = alloca i8, align 1
  %86 = alloca %"struct.std::_Bit_reference", align 8
  %87 = alloca float, align 4
  %88 = alloca %"struct.std::_Bit_reference", align 8
  %89 = alloca i32, align 4
  %90 = alloca i32, align 4
  %91 = alloca %"struct.std::_Bit_reference", align 8
  %92 = alloca %"struct.std::_Bit_reference", align 8
  %93 = alloca i32, align 4
  %94 = alloca ptr, align 8
  %95 = alloca i32, align 4
  %96 = alloca ptr, align 8
  %97 = alloca %"struct.std::_Bit_reference", align 8
  %98 = alloca %"struct.std::_Bit_reference", align 8
  %99 = alloca %"struct.std::pair", align 8
  %100 = alloca %"struct.std::pair", align 8
  %101 = alloca i32, align 4
  %102 = alloca ptr, align 8
  %103 = alloca i32, align 4
  %104 = alloca %"struct.std::_Bit_reference", align 8
  %105 = alloca %"class.std::map", align 8
  %106 = alloca [2 x %"class.std::map"], align 16
  %107 = alloca float, align 4
  %108 = alloca i32, align 4
  %109 = alloca i32, align 4
  %110 = alloca ptr, align 8
  %111 = alloca %"class.Riemann::SparseSpatialHash3", align 8
  %112 = alloca ptr, align 8
  %113 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %114 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %115 = alloca i32, align 4
  %116 = alloca %"class.Maths::TVector3", align 4
  %117 = alloca %"class.Riemann::SparseOctree", align 8
  %118 = alloca %class.anon.137, align 8
  %119 = alloca %class.anon.138, align 8
  %120 = alloca %class.anon.139, align 8
  %121 = alloca ptr, align 8
  %122 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %123 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %124 = alloca i32, align 4
  %125 = alloca %"class.std::vector", align 8
  %126 = alloca ptr, align 8
  %127 = alloca ptr, align 8
  %128 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %129 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %130 = alloca i32, align 4
  %131 = alloca %"class.Maths::TVector3", align 4
  %132 = alloca i32, align 4
  %133 = alloca float, align 4
  %134 = alloca %"class.Maths::TVector3", align 4
  %135 = alloca %"class.Maths::TVector3", align 4
  %136 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %137 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %138 = alloca i32, align 4
  %139 = alloca float, align 4
  %140 = alloca %"class.Maths::TVector3", align 4
  %141 = alloca %"class.Maths::TVector3", align 4
  %142 = alloca %"class.Maths::TVector3", align 4
  %143 = alloca i32, align 4
  %144 = alloca %"struct.std::pair.142", align 8
  %145 = alloca %"class.Maths::TVector3", align 4
  %146 = alloca %"struct.std::pair.142", align 8
  %147 = alloca %"class.Maths::TAABB3", align 4
  %148 = alloca i32, align 4
  %149 = alloca [2 x %"class.Maths::TVector3"], align 16
  %150 = alloca %"class.Maths::TVector3", align 4
  %151 = alloca %"class.Maths::TVector3", align 4
  %152 = alloca %"class.Riemann::Segment3", align 4
  %153 = alloca float, align 4
  %154 = alloca %"struct.Riemann::FEdgeSplitInfo", align 4
  %155 = alloca %"struct.std::pair.142", align 8
  %156 = alloca ptr, align 8
  %157 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %158 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %159 = alloca ptr, align 8
  %160 = alloca %"class.Maths::TVector3", align 4
  %161 = alloca [2 x i32], align 4
  %162 = alloca %"struct.std::pair.142", align 8
  %163 = alloca i8, align 1
  %164 = alloca %"class.std::vector", align 8
  %165 = alloca i32, align 4
  %166 = alloca %"class.Riemann::FDynamicMeshEditor", align 8
  %167 = alloca %"class.Riemann::FDynamicMeshEditor", align 8
  %168 = alloca %"class.Riemann::FMeshIndexMappings", align 8
  %169 = alloca %"class.std::function.145", align 8
  %170 = alloca %"class.std::function.145", align 8
  %171 = alloca i8, align 1
  %172 = alloca ptr, align 8
  %173 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %174 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %175 = alloca i32, align 4
  %176 = alloca %"class.Maths::TIndex2", align 4
  %177 = alloca i32, align 4
  %178 = alloca ptr, align 8
  %179 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %180 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %181 = alloca i32, align 4
  %182 = alloca %"struct.std::pair", align 8
  %183 = alloca %"struct.Maths::Transform", align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %184 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 456, ptr %4) #11
  %185 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 16
  %186 = getelementptr inbounds [2 x ptr], ptr %185, i64 0, i64 1
  %187 = load ptr, ptr %186, align 8, !tbaa !5
  call void @_ZN7Riemann11DynamicMeshC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(452) %4, ptr noundef nonnull align 8 dereferenceable(452) %187)
  %188 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 456) #12
          to label %189 unwind label %230

189:                                              ; preds = %1
  invoke void @_ZN7Riemann11DynamicMeshC1Ev(ptr noundef nonnull align 8 dereferenceable(452) %188)
          to label %190 unwind label %234

190:                                              ; preds = %189
  %191 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 18
  store ptr %188, ptr %191, align 8, !tbaa !9
  %192 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 16
  %193 = getelementptr inbounds [2 x ptr], ptr %192, i64 0, i64 0
  %194 = load ptr, ptr %193, align 8, !tbaa !5
  %195 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 18
  %196 = load ptr, ptr %195, align 8, !tbaa !9
  %197 = invoke noundef nonnull align 8 dereferenceable(452) ptr @_ZN7Riemann11DynamicMeshaSERKS0_(ptr noundef nonnull align 8 dereferenceable(452) %196, ptr noundef nonnull align 8 dereferenceable(452) %194)
          to label %198 unwind label %230

198:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #11
  %199 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 18
  %200 = load ptr, ptr %199, align 8, !tbaa !9
  store ptr %200, ptr %7, align 8, !tbaa !5
  %201 = getelementptr inbounds ptr, ptr %7, i64 1
  store ptr %4, ptr %201, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #11
  %202 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 0
  %203 = load ptr, ptr %202, align 16, !tbaa !5
  %204 = invoke noundef nonnull align 4 dereferenceable(24) ptr @_ZNK7Riemann11DynamicMesh9GetBoundsEv(ptr noundef nonnull align 8 dereferenceable(452) %203)
          to label %205 unwind label %238

205:                                              ; preds = %198
  %206 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 17
  %207 = getelementptr inbounds [2 x %"struct.Maths::Transform"], ptr %206, i64 0, i64 0
  %208 = getelementptr inbounds %"struct.Maths::Transform", ptr %207, i32 0, i32 0
  %209 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 17
  %210 = getelementptr inbounds [2 x %"struct.Maths::Transform"], ptr %209, i64 0, i64 0
  %211 = getelementptr inbounds %"struct.Maths::Transform", ptr %210, i32 0, i32 1
  invoke void @_ZN5Maths6TAABB3IfE9TransformERKS1_RKNS_8TVector3IfEERKNS_10QuaternionE(ptr dead_on_unwind writable sret(%"class.Maths::TAABB3") align 4 %8, ptr noundef nonnull align 4 dereferenceable(24) %204, ptr noundef nonnull align 4 dereferenceable(12) %208, ptr noundef nonnull align 4 dereferenceable(16) %211)
          to label %212 unwind label %238

212:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #11
  %213 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 1
  %214 = load ptr, ptr %213, align 8, !tbaa !5
  %215 = invoke noundef nonnull align 4 dereferenceable(24) ptr @_ZNK7Riemann11DynamicMesh9GetBoundsEv(ptr noundef nonnull align 8 dereferenceable(452) %214)
          to label %216 unwind label %242

216:                                              ; preds = %212
  %217 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 17
  %218 = getelementptr inbounds [2 x %"struct.Maths::Transform"], ptr %217, i64 0, i64 1
  %219 = getelementptr inbounds %"struct.Maths::Transform", ptr %218, i32 0, i32 0
  %220 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 17
  %221 = getelementptr inbounds [2 x %"struct.Maths::Transform"], ptr %220, i64 0, i64 1
  %222 = getelementptr inbounds %"struct.Maths::Transform", ptr %221, i32 0, i32 1
  invoke void @_ZN5Maths6TAABB3IfE9TransformERKS1_RKNS_8TVector3IfEERKNS_10QuaternionE(ptr dead_on_unwind writable sret(%"class.Maths::TAABB3") align 4 %9, ptr noundef nonnull align 4 dereferenceable(24) %215, ptr noundef nonnull align 4 dereferenceable(12) %219, ptr noundef nonnull align 4 dereferenceable(16) %222)
          to label %223 unwind label %242

223:                                              ; preds = %216
  %224 = invoke noundef nonnull align 4 dereferenceable(24) ptr @_ZN5Maths6TAABB3IfE11EncapsulateERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %8, ptr noundef nonnull align 4 dereferenceable(24) %9)
          to label %225 unwind label %242

225:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #11
  store i32 0, ptr %10, align 4, !tbaa !35
  br label %226

226:                                              ; preds = %263, %225
  %227 = load i32, ptr %10, align 4, !tbaa !35
  %228 = icmp slt i32 %227, 2
  br i1 %228, label %246, label %229

229:                                              ; preds = %226
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #11
  br label %275

230:                                              ; preds = %190, %1
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %5, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %6, align 4
  br label %2064

234:                                              ; preds = %189
  %235 = landingpad { ptr, i32 }
          cleanup
  %236 = extractvalue { ptr, i32 } %235, 0
  store ptr %236, ptr %5, align 8
  %237 = extractvalue { ptr, i32 } %235, 1
  store i32 %237, ptr %6, align 4
  call void @_ZdlPvm(ptr noundef %188, i64 noundef 456) #13
  br label %2064

238:                                              ; preds = %205, %198
  %239 = landingpad { ptr, i32 }
          cleanup
  %240 = extractvalue { ptr, i32 } %239, 0
  store ptr %240, ptr %5, align 8
  %241 = extractvalue { ptr, i32 } %239, 1
  store i32 %241, ptr %6, align 4
  br label %2063

242:                                              ; preds = %223, %216, %212
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %5, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %6, align 4
  br label %2062

246:                                              ; preds = %226
  call void @llvm.lifetime.start.p0(i64 28, ptr %11) #11
  %247 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 17
  %248 = load i32, ptr %10, align 4, !tbaa !35
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [2 x %"struct.Maths::Transform"], ptr %247, i64 0, i64 %249
  invoke void @_ZN5Maths9TransformC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(28) %11, ptr noundef nonnull align 4 dereferenceable(28) %250)
          to label %251 unwind label %266

251:                                              ; preds = %246
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #11
  %252 = getelementptr inbounds %"struct.Maths::Transform", ptr %11, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #11
  invoke void @_ZNK5Maths6TAABB3IfE9GetCenterEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %13, ptr noundef nonnull align 4 dereferenceable(24) %8)
          to label %253 unwind label %270

253:                                              ; preds = %251
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %12, ptr noundef nonnull align 4 dereferenceable(12) %252, ptr noundef nonnull align 4 dereferenceable(12) %13)
          to label %254 unwind label %270

254:                                              ; preds = %253
  %255 = getelementptr inbounds %"struct.Maths::Transform", ptr %11, i32 0, i32 0
  %256 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %255, ptr noundef nonnull align 4 dereferenceable(12) %12)
          to label %257 unwind label %270

257:                                              ; preds = %254
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #11
  %258 = load i32, ptr %10, align 4, !tbaa !35
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %259
  %261 = load ptr, ptr %260, align 8, !tbaa !5
  invoke void @_ZN7Riemann11DynamicMesh14ApplyTransformERKN5Maths9TransformEb(ptr noundef nonnull align 8 dereferenceable(452) %261, ptr noundef nonnull align 4 dereferenceable(28) %11, i1 noundef zeroext true)
          to label %262 unwind label %266

262:                                              ; preds = %257
  call void @llvm.lifetime.end.p0(i64 28, ptr %11) #11
  br label %263

263:                                              ; preds = %262
  %264 = load i32, ptr %10, align 4, !tbaa !35
  %265 = add nsw i32 %264, 1
  store i32 %265, ptr %10, align 4, !tbaa !35
  br label %226, !llvm.loop !36

266:                                              ; preds = %257, %246
  %267 = landingpad { ptr, i32 }
          cleanup
  %268 = extractvalue { ptr, i32 } %267, 0
  store ptr %268, ptr %5, align 8
  %269 = extractvalue { ptr, i32 } %267, 1
  store i32 %269, ptr %6, align 4
  br label %274

270:                                              ; preds = %254, %253, %251
  %271 = landingpad { ptr, i32 }
          cleanup
  %272 = extractvalue { ptr, i32 } %271, 0
  store ptr %272, ptr %5, align 8
  %273 = extractvalue { ptr, i32 } %271, 1
  store i32 %273, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #11
  br label %274

274:                                              ; preds = %270, %266
  call void @llvm.lifetime.end.p0(i64 28, ptr %11) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #11
  br label %2062

275:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 28, ptr %14) #11
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #11
  invoke void @_ZNK5Maths6TAABB3IfE9GetCenterEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %15, ptr noundef nonnull align 4 dereferenceable(24) %8)
          to label %276 unwind label %320

276:                                              ; preds = %275
  invoke void @_ZN5Maths9TransformC2ERKNS_8TVector3IfEE(ptr noundef nonnull align 4 dereferenceable(28) %14, ptr noundef nonnull align 4 dereferenceable(12) %15)
          to label %277 unwind label %320

277:                                              ; preds = %276
  %278 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 19
  %279 = invoke noundef nonnull align 4 dereferenceable(28) ptr @_ZN5Maths9TransformaSERKS0_(ptr noundef nonnull align 4 dereferenceable(28) %278, ptr noundef nonnull align 4 dereferenceable(28) %14)
          to label %280 unwind label %320

280:                                              ; preds = %277
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #11
  call void @llvm.lifetime.end.p0(i64 28, ptr %14) #11
  call void @llvm.lifetime.start.p0(i64 176, ptr %16) #11
  store ptr %16, ptr %17, align 8
  %281 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 0
  %282 = load ptr, ptr %281, align 16, !tbaa !5
  invoke void @_ZN7Riemann19DynamicMeshAABBTreeC1EPNS_11DynamicMeshE(ptr noundef nonnull align 8 dereferenceable(88) %16, ptr noundef %282)
          to label %283 unwind label %324

283:                                              ; preds = %280
  %284 = getelementptr inbounds %"class.Riemann::DynamicMeshAABBTree", ptr %16, i64 1
  store ptr %284, ptr %17, align 8
  %285 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 1
  %286 = load ptr, ptr %285, align 8, !tbaa !5
  invoke void @_ZN7Riemann19DynamicMeshAABBTreeC1EPNS_11DynamicMeshE(ptr noundef nonnull align 8 dereferenceable(88) %284, ptr noundef %286)
          to label %287 unwind label %324

287:                                              ; preds = %283
  call void @llvm.lifetime.start.p0(i64 72, ptr %18) #11
  %288 = getelementptr inbounds [2 x %"class.Riemann::DynamicMeshAABBTree"], ptr %16, i64 0, i64 0
  %289 = getelementptr inbounds [2 x %"class.Riemann::DynamicMeshAABBTree"], ptr %16, i64 0, i64 1
  invoke void @_ZNK7Riemann19DynamicMeshAABBTree20FindAllIntersectionsERKS0_PKN5Maths9TransformE(ptr dead_on_unwind writable sret(%"struct.Riemann::IntersectionsQueryResult") align 8 %18, ptr noundef nonnull align 8 dereferenceable(88) %288, ptr noundef nonnull align 8 dereferenceable(88) %289, ptr noundef null)
          to label %290 unwind label %335

290:                                              ; preds = %287
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #11
  store i8 0, ptr %19, align 1, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 120, ptr %20) #11
  %291 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 0
  %292 = load ptr, ptr %291, align 16, !tbaa !5
  %293 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 1
  %294 = load ptr, ptr %293, align 8, !tbaa !5
  invoke void @_ZN7Riemann11GeometryCutC2EPNS_11DynamicMeshES2_(ptr noundef nonnull align 8 dereferenceable(120) %20, ptr noundef %292, ptr noundef %294)
          to label %295 unwind label %339

295:                                              ; preds = %290
  %296 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 1
  %297 = load float, ptr %296, align 4, !tbaa !39
  %298 = getelementptr inbounds %"class.Riemann::GeometryCut", ptr %20, i32 0, i32 1
  store float %297, ptr %298, align 8, !tbaa !40
  %299 = getelementptr inbounds %"class.Riemann::GeometryCut", ptr %20, i32 0, i32 2
  store i8 1, ptr %299, align 4, !tbaa !42
  %300 = invoke noundef zeroext i1 @_ZN7Riemann11GeometryCut7ComputeERKNS_24IntersectionsQueryResultE(ptr noundef nonnull align 8 dereferenceable(120) %20, ptr noundef nonnull align 8 dereferenceable(72) %18)
          to label %301 unwind label %343

301:                                              ; preds = %295
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #11
  store i32 2, ptr %21, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #11
  store float 1.500000e+00, ptr %22, align 4, !tbaa !43
  %302 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 2
  %303 = load i8, ptr %302, align 8, !tbaa !44, !range !45, !noundef !46
  %304 = trunc i8 %303 to i1
  br i1 %304, label %305, label %660

305:                                              ; preds = %301
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #11
  %306 = load float, ptr %22, align 4, !tbaa !43
  %307 = load float, ptr %22, align 4, !tbaa !43
  %308 = fmul float %306, %307
  %309 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 1
  %310 = load float, ptr %309, align 4, !tbaa !39
  %311 = fmul float %308, %310
  %312 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 1
  %313 = load float, ptr %312, align 4, !tbaa !39
  %314 = fmul float %311, %313
  store float %314, ptr %23, align 4, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #11
  store i32 0, ptr %24, align 4, !tbaa !35
  br label %315

315:                                              ; preds = %654, %305
  %316 = load i32, ptr %24, align 4, !tbaa !35
  %317 = load i32, ptr %21, align 4, !tbaa !35
  %318 = icmp slt i32 %316, %317
  br i1 %318, label %347, label %319

319:                                              ; preds = %315
  store i32 5, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #11
  br label %659

320:                                              ; preds = %277, %276, %275
  %321 = landingpad { ptr, i32 }
          cleanup
  %322 = extractvalue { ptr, i32 } %321, 0
  store ptr %322, ptr %5, align 8
  %323 = extractvalue { ptr, i32 } %321, 1
  store i32 %323, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #11
  call void @llvm.lifetime.end.p0(i64 28, ptr %14) #11
  br label %2062

324:                                              ; preds = %283, %280
  %325 = landingpad { ptr, i32 }
          cleanup
  %326 = extractvalue { ptr, i32 } %325, 0
  store ptr %326, ptr %5, align 8
  %327 = extractvalue { ptr, i32 } %325, 1
  store i32 %327, ptr %6, align 4
  %328 = load ptr, ptr %17, align 8
  %329 = icmp eq ptr %16, %328
  br i1 %329, label %334, label %330

330:                                              ; preds = %330, %324
  %331 = phi ptr [ %328, %324 ], [ %332, %330 ]
  %332 = getelementptr inbounds %"class.Riemann::DynamicMeshAABBTree", ptr %331, i64 -1
  call void @_ZN7Riemann19DynamicMeshAABBTreeD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %332) #11
  %333 = icmp eq ptr %332, %16
  br i1 %333, label %334, label %330

334:                                              ; preds = %330, %324
  br label %2061

335:                                              ; preds = %287
  %336 = landingpad { ptr, i32 }
          cleanup
  %337 = extractvalue { ptr, i32 } %336, 0
  store ptr %337, ptr %5, align 8
  %338 = extractvalue { ptr, i32 } %336, 1
  store i32 %338, ptr %6, align 4
  br label %2047

339:                                              ; preds = %290
  %340 = landingpad { ptr, i32 }
          cleanup
  %341 = extractvalue { ptr, i32 } %340, 0
  store ptr %341, ptr %5, align 8
  %342 = extractvalue { ptr, i32 } %340, 1
  store i32 %342, ptr %6, align 4
  br label %2046

343:                                              ; preds = %295
  %344 = landingpad { ptr, i32 }
          cleanup
  %345 = extractvalue { ptr, i32 } %344, 0
  store ptr %345, ptr %5, align 8
  %346 = extractvalue { ptr, i32 } %344, 1
  store i32 %346, ptr %6, align 4
  br label %2045

347:                                              ; preds = %315
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #11
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #11
  store i32 0, ptr %27, align 4, !tbaa !35
  br label %348

348:                                              ; preds = %447, %347
  %349 = load i32, ptr %27, align 4, !tbaa !35
  %350 = sext i32 %349 to i64
  %351 = getelementptr inbounds %"class.Riemann::GeometryCut", ptr %20, i32 0, i32 4
  %352 = load i32, ptr %24, align 4, !tbaa !35
  %353 = sext i32 %352 to i64
  %354 = getelementptr inbounds [2 x %"class.std::vector"], ptr %351, i64 0, i64 %353
  %355 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %354) #11
  %356 = icmp ult i64 %350, %355
  br i1 %356, label %358, label %357

357:                                              ; preds = %348
  store i32 8, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #11
  br label %449

358:                                              ; preds = %348
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #11
  %359 = getelementptr inbounds %"class.Riemann::GeometryCut", ptr %20, i32 0, i32 4
  %360 = load i32, ptr %24, align 4, !tbaa !35
  %361 = sext i32 %360 to i64
  %362 = getelementptr inbounds [2 x %"class.std::vector"], ptr %359, i64 0, i64 %361
  %363 = load i32, ptr %27, align 4, !tbaa !35
  %364 = sext i32 %363 to i64
  %365 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %362, i64 noundef %364) #11
  %366 = load i32, ptr %365, align 4, !tbaa !35
  store i32 %366, ptr %28, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #11
  %367 = load i32, ptr %27, align 4, !tbaa !35
  %368 = add nsw i32 %367, 1
  %369 = load i32, ptr %28, align 4, !tbaa !35
  %370 = add nsw i32 %368, %369
  store i32 %370, ptr %29, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #11
  %371 = load i32, ptr %27, align 4, !tbaa !35
  %372 = add nsw i32 %371, 1
  store i32 %372, ptr %30, align 4, !tbaa !35
  br label %373

373:                                              ; preds = %443, %358
  %374 = load i32, ptr %30, align 4, !tbaa !35
  %375 = add nsw i32 %374, 1
  %376 = load i32, ptr %29, align 4, !tbaa !35
  %377 = icmp slt i32 %375, %376
  br i1 %377, label %379, label %378

378:                                              ; preds = %373
  store i32 10, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #11
  br label %447

379:                                              ; preds = %373
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #11
  %380 = getelementptr inbounds %"class.Riemann::GeometryCut", ptr %20, i32 0, i32 4
  %381 = load i32, ptr %24, align 4, !tbaa !35
  %382 = sext i32 %381 to i64
  %383 = getelementptr inbounds [2 x %"class.std::vector"], ptr %380, i64 0, i64 %382
  %384 = load i32, ptr %30, align 4, !tbaa !35
  %385 = sext i32 %384 to i64
  %386 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %383, i64 noundef %385) #11
  %387 = load i32, ptr %386, align 4, !tbaa !35
  store i32 %387, ptr %31, align 4, !tbaa !35
  %388 = getelementptr inbounds i32, ptr %31, i64 1
  %389 = getelementptr inbounds %"class.Riemann::GeometryCut", ptr %20, i32 0, i32 4
  %390 = load i32, ptr %24, align 4, !tbaa !35
  %391 = sext i32 %390 to i64
  %392 = getelementptr inbounds [2 x %"class.std::vector"], ptr %389, i64 0, i64 %391
  %393 = load i32, ptr %30, align 4, !tbaa !35
  %394 = add nsw i32 %393, 1
  %395 = sext i32 %394 to i64
  %396 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %392, i64 noundef %395) #11
  %397 = load i32, ptr %396, align 4, !tbaa !35
  store i32 %397, ptr %388, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 12, ptr %32) #11
  call void @llvm.lifetime.start.p0(i64 12, ptr %33) #11
  %398 = load i32, ptr %24, align 4, !tbaa !35
  %399 = sext i32 %398 to i64
  %400 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %399
  %401 = load ptr, ptr %400, align 8, !tbaa !5
  %402 = getelementptr inbounds [2 x i32], ptr %31, i64 0, i64 0
  %403 = load i32, ptr %402, align 4, !tbaa !35
  invoke void @_ZNK7Riemann11DynamicMesh9GetVertexEi(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %33, ptr noundef nonnull align 8 dereferenceable(452) %401, i32 noundef %403)
          to label %404 unwind label %429

404:                                              ; preds = %379
  call void @llvm.lifetime.start.p0(i64 12, ptr %34) #11
  %405 = load i32, ptr %24, align 4, !tbaa !35
  %406 = sext i32 %405 to i64
  %407 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %406
  %408 = load ptr, ptr %407, align 8, !tbaa !5
  %409 = getelementptr inbounds [2 x i32], ptr %31, i64 0, i64 1
  %410 = load i32, ptr %409, align 4, !tbaa !35
  invoke void @_ZNK7Riemann11DynamicMesh9GetVertexEi(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %34, ptr noundef nonnull align 8 dereferenceable(452) %408, i32 noundef %410)
          to label %411 unwind label %433

411:                                              ; preds = %404
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %32, ptr noundef nonnull align 4 dereferenceable(12) %33, ptr noundef nonnull align 4 dereferenceable(12) %34)
          to label %412 unwind label %433

412:                                              ; preds = %411
  %413 = invoke noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %32)
          to label %414 unwind label %433

414:                                              ; preds = %412
  %415 = load float, ptr %23, align 4, !tbaa !43
  %416 = fcmp olt float %413, %415
  call void @llvm.lifetime.end.p0(i64 12, ptr %34) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr %33) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #11
  br i1 %416, label %417, label %442

417:                                              ; preds = %414
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #11
  %418 = load i32, ptr %24, align 4, !tbaa !35
  %419 = sext i32 %418 to i64
  %420 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %419
  %421 = load ptr, ptr %420, align 8, !tbaa !5
  %422 = getelementptr inbounds [2 x i32], ptr %31, i64 0, i64 0
  %423 = load i32, ptr %422, align 4, !tbaa !35
  %424 = getelementptr inbounds [2 x i32], ptr %31, i64 0, i64 1
  %425 = load i32, ptr %424, align 4, !tbaa !35
  %426 = invoke noundef i32 @_ZNK7Riemann11DynamicMesh8FindEdgeEii(ptr noundef nonnull align 8 dereferenceable(452) %421, i32 noundef %423, i32 noundef %425)
          to label %427 unwind label %438

427:                                              ; preds = %417
  store i32 %426, ptr %35, align 4, !tbaa !35
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 4 dereferenceable(4) %35)
          to label %428 unwind label %438

428:                                              ; preds = %427
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #11
  br label %442

429:                                              ; preds = %379
  %430 = landingpad { ptr, i32 }
          cleanup
  %431 = extractvalue { ptr, i32 } %430, 0
  store ptr %431, ptr %5, align 8
  %432 = extractvalue { ptr, i32 } %430, 1
  store i32 %432, ptr %6, align 4
  br label %437

433:                                              ; preds = %412, %411, %404
  %434 = landingpad { ptr, i32 }
          cleanup
  %435 = extractvalue { ptr, i32 } %434, 0
  store ptr %435, ptr %5, align 8
  %436 = extractvalue { ptr, i32 } %434, 1
  store i32 %436, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %34) #11
  br label %437

437:                                              ; preds = %433, %429
  call void @llvm.lifetime.end.p0(i64 12, ptr %33) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #11
  br label %446

438:                                              ; preds = %427, %417
  %439 = landingpad { ptr, i32 }
          cleanup
  %440 = extractvalue { ptr, i32 } %439, 0
  store ptr %440, ptr %5, align 8
  %441 = extractvalue { ptr, i32 } %439, 1
  store i32 %441, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #11
  br label %446

442:                                              ; preds = %428, %414
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #11
  br label %443

443:                                              ; preds = %442
  %444 = load i32, ptr %30, align 4, !tbaa !35
  %445 = add nsw i32 %444, 1
  store i32 %445, ptr %30, align 4, !tbaa !35
  br label %373, !llvm.loop !47

446:                                              ; preds = %438, %437
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #11
  br label %658

447:                                              ; preds = %378
  %448 = load i32, ptr %29, align 4, !tbaa !35
  store i32 %448, ptr %27, align 4, !tbaa !35
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #11
  br label %348, !llvm.loop !48

449:                                              ; preds = %357
  call void @llvm.lifetime.start.p0(i64 48, ptr %36) #11
  %450 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #11
  %451 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.57", ptr %37, i32 0, i32 0
  store ptr %450, ptr %451, align 8
  %452 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #11
  %453 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.57", ptr %38, i32 0, i32 0
  store ptr %452, ptr %453, align 8
  %454 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.57", ptr %37, i32 0, i32 0
  %455 = load ptr, ptr %454, align 8
  %456 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.57", ptr %38, i32 0, i32 0
  %457 = load ptr, ptr %456, align 8
  invoke void @_ZNSt3setIiSt4lessIiESaIiEEC2IN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiS2_EEEEET_SB_(ptr noundef nonnull align 8 dereferenceable(48) %36, ptr %455, ptr %457)
          to label %458 unwind label %465

458:                                              ; preds = %449
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #11
  store i32 0, ptr %39, align 4, !tbaa !35
  br label %459

459:                                              ; preds = %644, %458
  %460 = load i32, ptr %39, align 4, !tbaa !35
  %461 = sext i32 %460 to i64
  %462 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #11
  %463 = icmp ult i64 %461, %462
  br i1 %463, label %469, label %464

464:                                              ; preds = %459
  store i32 13, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #11
  br label %653

465:                                              ; preds = %449
  %466 = landingpad { ptr, i32 }
          cleanup
  %467 = extractvalue { ptr, i32 } %466, 0
  store ptr %467, ptr %5, align 8
  %468 = extractvalue { ptr, i32 } %466, 1
  store i32 %468, ptr %6, align 4
  br label %657

469:                                              ; preds = %459
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #11
  %470 = load i32, ptr %39, align 4, !tbaa !35
  %471 = sext i32 %470 to i64
  %472 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %471) #11
  %473 = load i32, ptr %472, align 4, !tbaa !35
  store i32 %473, ptr %40, align 4, !tbaa !35
  %474 = load i32, ptr %24, align 4, !tbaa !35
  %475 = sext i32 %474 to i64
  %476 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %475
  %477 = load ptr, ptr %476, align 8, !tbaa !5
  %478 = load i32, ptr %40, align 4, !tbaa !35
  %479 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %477, i32 noundef %478)
          to label %480 unwind label %482

480:                                              ; preds = %469
  br i1 %479, label %486, label %481

481:                                              ; preds = %480
  store i32 15, ptr %25, align 4
  br label %641

482:                                              ; preds = %469
  %483 = landingpad { ptr, i32 }
          cleanup
  %484 = extractvalue { ptr, i32 } %483, 0
  store ptr %484, ptr %5, align 8
  %485 = extractvalue { ptr, i32 } %483, 1
  store i32 %485, ptr %6, align 4
  br label %652

486:                                              ; preds = %480
  call void @llvm.lifetime.start.p0(i64 12, ptr %41) #11
  invoke void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %41)
          to label %487 unwind label %501

487:                                              ; preds = %486
  call void @llvm.lifetime.start.p0(i64 12, ptr %42) #11
  invoke void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %42)
          to label %488 unwind label %505

488:                                              ; preds = %487
  %489 = load i32, ptr %24, align 4, !tbaa !35
  %490 = sext i32 %489 to i64
  %491 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %490
  %492 = load ptr, ptr %491, align 8, !tbaa !5
  %493 = load i32, ptr %40, align 4, !tbaa !35
  invoke void @_ZNK7Riemann11DynamicMesh8GetEdgeVEiRN5Maths8TVector3IfEES4_(ptr noundef nonnull align 8 dereferenceable(452) %492, i32 noundef %493, ptr noundef nonnull align 4 dereferenceable(12) %41, ptr noundef nonnull align 4 dereferenceable(12) %42)
          to label %494 unwind label %505

494:                                              ; preds = %488
  call void @llvm.lifetime.start.p0(i64 12, ptr %43) #11
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %43, ptr noundef nonnull align 4 dereferenceable(12) %41, ptr noundef nonnull align 4 dereferenceable(12) %42)
          to label %495 unwind label %509

495:                                              ; preds = %494
  %496 = invoke noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %43)
          to label %497 unwind label %509

497:                                              ; preds = %495
  %498 = load float, ptr %23, align 4, !tbaa !43
  %499 = fcmp ogt float %496, %498
  call void @llvm.lifetime.end.p0(i64 12, ptr %43) #11
  br i1 %499, label %500, label %513

500:                                              ; preds = %497
  store i32 15, ptr %25, align 4
  br label %640

501:                                              ; preds = %486
  %502 = landingpad { ptr, i32 }
          cleanup
  %503 = extractvalue { ptr, i32 } %502, 0
  store ptr %503, ptr %5, align 8
  %504 = extractvalue { ptr, i32 } %502, 1
  store i32 %504, ptr %6, align 4
  br label %651

505:                                              ; preds = %488, %487
  %506 = landingpad { ptr, i32 }
          cleanup
  %507 = extractvalue { ptr, i32 } %506, 0
  store ptr %507, ptr %5, align 8
  %508 = extractvalue { ptr, i32 } %506, 1
  store i32 %508, ptr %6, align 4
  br label %650

509:                                              ; preds = %495, %494
  %510 = landingpad { ptr, i32 }
          cleanup
  %511 = extractvalue { ptr, i32 } %510, 0
  store ptr %511, ptr %5, align 8
  %512 = extractvalue { ptr, i32 } %510, 1
  store i32 %512, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %43) #11
  br label %650

513:                                              ; preds = %497
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #11
  %514 = load i32, ptr %24, align 4, !tbaa !35
  %515 = sext i32 %514 to i64
  %516 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %515
  %517 = load ptr, ptr %516, align 8, !tbaa !5
  %518 = load i32, ptr %40, align 4, !tbaa !35
  invoke void @_ZNK7Riemann11DynamicMesh8GetEdgeVEi(ptr dead_on_unwind writable sret(%"class.Maths::TIndex2") align 4 %44, ptr noundef nonnull align 8 dereferenceable(452) %517, i32 noundef %518)
          to label %519 unwind label %558

519:                                              ; preds = %513
  %520 = load i32, ptr %24, align 4, !tbaa !35
  %521 = sext i32 %520 to i64
  %522 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %521
  %523 = load ptr, ptr %522, align 8, !tbaa !5
  %524 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh13HasAttributesEv(ptr noundef nonnull align 8 dereferenceable(452) %523)
          to label %525 unwind label %558

525:                                              ; preds = %519
  br i1 %524, label %526, label %563

526:                                              ; preds = %525
  %527 = load i32, ptr %24, align 4, !tbaa !35
  %528 = sext i32 %527 to i64
  %529 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %528
  %530 = load ptr, ptr %529, align 8, !tbaa !5
  %531 = invoke noundef ptr @_ZN7Riemann11DynamicMesh10AttributesEv(ptr noundef nonnull align 8 dereferenceable(452) %530)
          to label %532 unwind label %558

532:                                              ; preds = %526
  %533 = getelementptr inbounds %"class.Maths::TIndex2", ptr %44, i32 0, i32 1
  %534 = load i32, ptr %533, align 4, !tbaa !49
  %535 = invoke noundef zeroext i1 @_ZNK7Riemann23DynamicMeshAttributeSet12IsSeamVertexEib(ptr noundef nonnull align 8 dereferenceable(168) %531, i32 noundef %534, i1 noundef zeroext false)
          to label %536 unwind label %558

536:                                              ; preds = %532
  br i1 %535, label %537, label %563

537:                                              ; preds = %536
  %538 = getelementptr inbounds %"class.Maths::TIndex2", ptr %44, i32 0, i32 0
  %539 = getelementptr inbounds %"class.Maths::TIndex2", ptr %44, i32 0, i32 1
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %538, ptr noundef nonnull align 4 dereferenceable(4) %539) #11
  %540 = load i32, ptr %24, align 4, !tbaa !35
  %541 = sext i32 %540 to i64
  %542 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %541
  %543 = load ptr, ptr %542, align 8, !tbaa !5
  %544 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh13HasAttributesEv(ptr noundef nonnull align 8 dereferenceable(452) %543)
          to label %545 unwind label %558

545:                                              ; preds = %537
  br i1 %544, label %546, label %562

546:                                              ; preds = %545
  %547 = load i32, ptr %24, align 4, !tbaa !35
  %548 = sext i32 %547 to i64
  %549 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %548
  %550 = load ptr, ptr %549, align 8, !tbaa !5
  %551 = invoke noundef ptr @_ZN7Riemann11DynamicMesh10AttributesEv(ptr noundef nonnull align 8 dereferenceable(452) %550)
          to label %552 unwind label %558

552:                                              ; preds = %546
  %553 = getelementptr inbounds %"class.Maths::TIndex2", ptr %44, i32 0, i32 1
  %554 = load i32, ptr %553, align 4, !tbaa !49
  %555 = invoke noundef zeroext i1 @_ZNK7Riemann23DynamicMeshAttributeSet12IsSeamVertexEib(ptr noundef nonnull align 8 dereferenceable(168) %551, i32 noundef %554, i1 noundef zeroext false)
          to label %556 unwind label %558

556:                                              ; preds = %552
  br i1 %555, label %557, label %562

557:                                              ; preds = %556
  store i32 15, ptr %25, align 4
  br label %639

558:                                              ; preds = %552, %546, %537, %532, %526, %519, %513
  %559 = landingpad { ptr, i32 }
          cleanup
  %560 = extractvalue { ptr, i32 } %559, 0
  store ptr %560, ptr %5, align 8
  %561 = extractvalue { ptr, i32 } %559, 1
  store i32 %561, ptr %6, align 4
  br label %649

562:                                              ; preds = %556, %545
  br label %563

563:                                              ; preds = %562, %536, %525
  call void @llvm.lifetime.start.p0(i64 52, ptr %45) #11
  invoke void @_ZN7Riemann17FEdgeCollapseInfoC2Ev(ptr noundef nonnull align 4 dereferenceable(52) %45)
          to label %564 unwind label %582

564:                                              ; preds = %563
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #11
  %565 = load i32, ptr %24, align 4, !tbaa !35
  %566 = sext i32 %565 to i64
  %567 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %566
  %568 = load ptr, ptr %567, align 8, !tbaa !5
  %569 = getelementptr inbounds %"class.Maths::TIndex2", ptr %44, i32 0, i32 0
  %570 = load i32, ptr %569, align 4, !tbaa !51
  %571 = getelementptr inbounds %"class.Maths::TIndex2", ptr %44, i32 0, i32 1
  %572 = load i32, ptr %571, align 4, !tbaa !49
  %573 = invoke noundef i32 @_ZN7Riemann11DynamicMesh12CollapseEdgeEiifRNS_17FEdgeCollapseInfoE(ptr noundef nonnull align 8 dereferenceable(452) %568, i32 noundef %570, i32 noundef %572, float noundef 5.000000e-01, ptr noundef nonnull align 4 dereferenceable(52) %45)
          to label %574 unwind label %586

574:                                              ; preds = %564
  store i32 %573, ptr %46, align 4, !tbaa !52
  %575 = load i32, ptr %46, align 4, !tbaa !52
  %576 = icmp ne i32 %575, 0
  br i1 %576, label %577, label %638

577:                                              ; preds = %574
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #11
  store i32 0, ptr %47, align 4, !tbaa !35
  br label %578

578:                                              ; preds = %633, %577
  %579 = load i32, ptr %47, align 4, !tbaa !35
  %580 = icmp slt i32 %579, 2
  br i1 %580, label %590, label %581

581:                                              ; preds = %578
  store i32 16, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #11
  br label %637

582:                                              ; preds = %563
  %583 = landingpad { ptr, i32 }
          cleanup
  %584 = extractvalue { ptr, i32 } %583, 0
  store ptr %584, ptr %5, align 8
  %585 = extractvalue { ptr, i32 } %583, 1
  store i32 %585, ptr %6, align 4
  br label %648

586:                                              ; preds = %564
  %587 = landingpad { ptr, i32 }
          cleanup
  %588 = extractvalue { ptr, i32 } %587, 0
  store ptr %588, ptr %5, align 8
  %589 = extractvalue { ptr, i32 } %587, 1
  store i32 %589, ptr %6, align 4
  br label %647

590:                                              ; preds = %578
  %591 = getelementptr inbounds %"struct.Riemann::FEdgeCollapseInfo", ptr %45, i32 0, i32 6
  %592 = load i32, ptr %47, align 4, !tbaa !35
  %593 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %591, i32 noundef %592)
          to label %594 unwind label %618

594:                                              ; preds = %590
  %595 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %36, ptr noundef nonnull align 4 dereferenceable(4) %593)
          to label %596 unwind label %618

596:                                              ; preds = %594
  %597 = icmp ugt i64 %595, 0
  br i1 %597, label %598, label %632

598:                                              ; preds = %596
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #11
  %599 = getelementptr inbounds %"struct.Riemann::FEdgeCollapseInfo", ptr %45, i32 0, i32 7
  %600 = load i32, ptr %47, align 4, !tbaa !35
  %601 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %599, i32 noundef %600)
          to label %602 unwind label %622

602:                                              ; preds = %598
  %603 = load i32, ptr %601, align 4, !tbaa !35
  store i32 %603, ptr %48, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 1, ptr %49) #11
  %604 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %36, ptr noundef nonnull align 4 dereferenceable(4) %48)
          to label %605 unwind label %626

605:                                              ; preds = %602
  %606 = icmp ugt i64 %604, 0
  %607 = zext i1 %606 to i8
  store i8 %607, ptr %49, align 1, !tbaa !38
  %608 = load i8, ptr %49, align 1, !tbaa !38, !range !45, !noundef !46
  %609 = trunc i8 %608 to i1
  br i1 %609, label %630, label %610

610:                                              ; preds = %605
  %611 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %36, ptr noundef nonnull align 4 dereferenceable(4) %48)
          to label %612 unwind label %626

612:                                              ; preds = %610
  %613 = getelementptr inbounds { ptr, i8 }, ptr %50, i32 0, i32 0
  %614 = extractvalue { ptr, i8 } %611, 0
  store ptr %614, ptr %613, align 8
  %615 = getelementptr inbounds { ptr, i8 }, ptr %50, i32 0, i32 1
  %616 = extractvalue { ptr, i8 } %611, 1
  store i8 %616, ptr %615, align 8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 4 dereferenceable(4) %48)
          to label %617 unwind label %626

617:                                              ; preds = %612
  br label %630

618:                                              ; preds = %594, %590
  %619 = landingpad { ptr, i32 }
          cleanup
  %620 = extractvalue { ptr, i32 } %619, 0
  store ptr %620, ptr %5, align 8
  %621 = extractvalue { ptr, i32 } %619, 1
  store i32 %621, ptr %6, align 4
  br label %636

622:                                              ; preds = %598
  %623 = landingpad { ptr, i32 }
          cleanup
  %624 = extractvalue { ptr, i32 } %623, 0
  store ptr %624, ptr %5, align 8
  %625 = extractvalue { ptr, i32 } %623, 1
  store i32 %625, ptr %6, align 4
  br label %631

626:                                              ; preds = %612, %610, %602
  %627 = landingpad { ptr, i32 }
          cleanup
  %628 = extractvalue { ptr, i32 } %627, 0
  store ptr %628, ptr %5, align 8
  %629 = extractvalue { ptr, i32 } %627, 1
  store i32 %629, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %49) #11
  br label %631

630:                                              ; preds = %617, %605
  call void @llvm.lifetime.end.p0(i64 1, ptr %49) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #11
  br label %632

631:                                              ; preds = %626, %622
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #11
  br label %636

632:                                              ; preds = %630, %596
  br label %633

633:                                              ; preds = %632
  %634 = load i32, ptr %47, align 4, !tbaa !35
  %635 = add nsw i32 %634, 1
  store i32 %635, ptr %47, align 4, !tbaa !35
  br label %578, !llvm.loop !54

636:                                              ; preds = %631, %618
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #11
  br label %647

637:                                              ; preds = %581
  br label %638

638:                                              ; preds = %637, %574
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #11
  call void @llvm.lifetime.end.p0(i64 52, ptr %45) #11
  store i32 0, ptr %25, align 4
  br label %639

639:                                              ; preds = %638, %557
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #11
  br label %640

640:                                              ; preds = %639, %500
  call void @llvm.lifetime.end.p0(i64 12, ptr %42) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr %41) #11
  br label %641

641:                                              ; preds = %640, %481
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #11
  %642 = load i32, ptr %25, align 4
  switch i32 %642, label %2070 [
    i32 0, label %643
    i32 15, label %644
  ]

643:                                              ; preds = %641
  br label %644

644:                                              ; preds = %643, %641
  %645 = load i32, ptr %39, align 4, !tbaa !35
  %646 = add nsw i32 %645, 1
  store i32 %646, ptr %39, align 4, !tbaa !35
  br label %459, !llvm.loop !55

647:                                              ; preds = %636, %586
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #11
  br label %648

648:                                              ; preds = %647, %582
  call void @llvm.lifetime.end.p0(i64 52, ptr %45) #11
  br label %649

649:                                              ; preds = %648, %558
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #11
  br label %650

650:                                              ; preds = %649, %509, %505
  call void @llvm.lifetime.end.p0(i64 12, ptr %42) #11
  br label %651

651:                                              ; preds = %650, %501
  call void @llvm.lifetime.end.p0(i64 12, ptr %41) #11
  br label %652

652:                                              ; preds = %651, %482
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #11
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %36) #11
  br label %657

653:                                              ; preds = %464
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %36) #11
  call void @llvm.lifetime.end.p0(i64 48, ptr %36) #11
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #11
  br label %654

654:                                              ; preds = %653
  %655 = load i32, ptr %24, align 4, !tbaa !35
  %656 = add nsw i32 %655, 1
  store i32 %656, ptr %24, align 4, !tbaa !35
  br label %315, !llvm.loop !56

657:                                              ; preds = %652, %465
  call void @llvm.lifetime.end.p0(i64 48, ptr %36) #11
  br label %658

658:                                              ; preds = %657, %446
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #11
  br label %2044

659:                                              ; preds = %319
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #11
  br label %660

660:                                              ; preds = %659, %301
  call void @llvm.lifetime.start.p0(i64 48, ptr %51) #11
  %661 = getelementptr inbounds [2 x %"class.std::vector"], ptr %51, i32 0, i32 0
  %662 = getelementptr inbounds %"class.std::vector", ptr %661, i64 2
  br label %663

663:                                              ; preds = %663, %660
  %664 = phi ptr [ %661, %660 ], [ %665, %663 ]
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %664) #11
  %665 = getelementptr inbounds %"class.std::vector", ptr %664, i64 1
  %666 = icmp eq ptr %665, %662
  br i1 %666, label %667, label %663

667:                                              ; preds = %663
  call void @llvm.lifetime.start.p0(i64 96, ptr %52) #11
  %668 = getelementptr inbounds [2 x %"class.std::set"], ptr %52, i32 0, i32 0
  %669 = getelementptr inbounds %"class.std::set", ptr %668, i64 2
  br label %670

670:                                              ; preds = %670, %667
  %671 = phi ptr [ %668, %667 ], [ %672, %670 ]
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %671) #11
  %672 = getelementptr inbounds %"class.std::set", ptr %671, i64 1
  %673 = icmp eq ptr %672, %669
  br i1 %673, label %674, label %670

674:                                              ; preds = %670
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #11
  store float 5.000000e-01, ptr %53, align 4, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 80, ptr %54) #11
  %675 = getelementptr inbounds [2 x %"class.std::vector.106"], ptr %54, i32 0, i32 0
  %676 = getelementptr inbounds %"class.std::vector.106", ptr %675, i64 2
  br label %677

677:                                              ; preds = %677, %674
  %678 = phi ptr [ %675, %674 ], [ %679, %677 ]
  call void @_ZNSt6vectorIbSaIbEEC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %678) #11
  %679 = getelementptr inbounds %"class.std::vector.106", ptr %678, i64 1
  %680 = icmp eq ptr %679, %676
  br i1 %680, label %681, label %677

681:                                              ; preds = %677
  call void @llvm.lifetime.start.p0(i64 24, ptr %55) #11
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %55) #11
  %682 = load i32, ptr %21, align 4, !tbaa !35
  %683 = icmp sgt i32 %682, 1
  br i1 %683, label %684, label %699

684:                                              ; preds = %681
  %685 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 0
  %686 = load ptr, ptr %685, align 16, !tbaa !5
  %687 = invoke noundef i32 @_ZNK7Riemann11DynamicMesh16GetTriangleCountEv(ptr noundef nonnull align 8 dereferenceable(452) %686)
          to label %688 unwind label %691

688:                                              ; preds = %684
  %689 = sext i32 %687 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #11
  store i32 -1, ptr %56, align 4, !tbaa !35
  invoke void @_ZNSt6vectorIiSaIiEE6resizeEmRKi(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %689, ptr noundef nonnull align 4 dereferenceable(4) %56)
          to label %690 unwind label %695

690:                                              ; preds = %688
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #11
  br label %699

691:                                              ; preds = %684
  %692 = landingpad { ptr, i32 }
          cleanup
  %693 = extractvalue { ptr, i32 } %692, 0
  store ptr %693, ptr %5, align 8
  %694 = extractvalue { ptr, i32 } %692, 1
  store i32 %694, ptr %6, align 4
  br label %1320

695:                                              ; preds = %688
  %696 = landingpad { ptr, i32 }
          cleanup
  %697 = extractvalue { ptr, i32 } %696, 0
  store ptr %697, ptr %5, align 8
  %698 = extractvalue { ptr, i32 } %696, 1
  store i32 %698, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #11
  br label %1320

699:                                              ; preds = %690, %681
  call void @llvm.lifetime.start.p0(i64 4, ptr %57) #11
  store i32 0, ptr %57, align 4, !tbaa !35
  br label %700

700:                                              ; preds = %1022, %699
  %701 = load i32, ptr %57, align 4, !tbaa !35
  %702 = load i32, ptr %21, align 4, !tbaa !35
  %703 = icmp slt i32 %701, %702
  br i1 %703, label %705, label %704

704:                                              ; preds = %700
  store i32 19, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #11
  br label %1030

705:                                              ; preds = %700
  call void @llvm.lifetime.start.p0(i64 72, ptr %58) #11
  %706 = load i32, ptr %57, align 4, !tbaa !35
  %707 = sub nsw i32 1, %706
  %708 = sext i32 %707 to i64
  %709 = getelementptr inbounds [2 x %"class.Riemann::DynamicMeshAABBTree"], ptr %16, i64 0, i64 %708
  invoke void @_ZN7Riemann16TFastWindingTreeC2EPNS_19DynamicMeshAABBTreeE(ptr noundef nonnull align 8 dereferenceable(72) %58, ptr noundef %709)
          to label %710 unwind label %743

710:                                              ; preds = %705
  call void @llvm.lifetime.start.p0(i64 8, ptr %59) #11
  %711 = load i32, ptr %57, align 4, !tbaa !35
  %712 = sub nsw i32 1, %711
  %713 = sext i32 %712 to i64
  %714 = getelementptr inbounds [2 x %"class.Riemann::DynamicMeshAABBTree"], ptr %16, i64 0, i64 %713
  store ptr %714, ptr %59, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #11
  %715 = load i32, ptr %57, align 4, !tbaa !35
  %716 = sext i32 %715 to i64
  %717 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %716
  %718 = load ptr, ptr %717, align 8, !tbaa !5
  store ptr %718, ptr %60, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %61) #11
  %719 = load ptr, ptr %60, align 8, !tbaa !5
  %720 = invoke noundef i32 @_ZNK7Riemann11DynamicMesh16GetTriangleCountEv(ptr noundef nonnull align 8 dereferenceable(452) %719)
          to label %721 unwind label %747

721:                                              ; preds = %710
  store i32 %720, ptr %61, align 4, !tbaa !35
  %722 = load i32, ptr %57, align 4, !tbaa !35
  %723 = sext i32 %722 to i64
  %724 = getelementptr inbounds [2 x %"class.std::vector.106"], ptr %54, i64 0, i64 %723
  %725 = load i32, ptr %61, align 4, !tbaa !35
  %726 = sext i32 %725 to i64
  invoke void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40) %724, i64 noundef %726, i1 noundef zeroext false)
          to label %727 unwind label %747

727:                                              ; preds = %721
  call void @llvm.lifetime.start.p0(i64 1, ptr %62) #11
  %728 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 0
  %729 = load i32, ptr %728, align 8, !tbaa !57
  %730 = icmp ne i32 %729, 1
  %731 = zext i1 %730 to i8
  store i8 %731, ptr %62, align 1, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 1, ptr %63) #11
  store i8 1, ptr %63, align 1, !tbaa !38
  %732 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 0
  %733 = load i32, ptr %732, align 8, !tbaa !57
  %734 = icmp eq i32 %733, 2
  br i1 %734, label %742, label %735

735:                                              ; preds = %727
  %736 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 0
  %737 = load i32, ptr %736, align 8, !tbaa !57
  %738 = icmp eq i32 %737, 1
  br i1 %738, label %739, label %751

739:                                              ; preds = %735
  %740 = load i32, ptr %57, align 4, !tbaa !35
  %741 = icmp eq i32 %740, 1
  br i1 %741, label %742, label %751

742:                                              ; preds = %739, %727
  store i8 0, ptr %63, align 1, !tbaa !38
  br label %751

743:                                              ; preds = %705
  %744 = landingpad { ptr, i32 }
          cleanup
  %745 = extractvalue { ptr, i32 } %744, 0
  store ptr %745, ptr %5, align 8
  %746 = extractvalue { ptr, i32 } %744, 1
  store i32 %746, ptr %6, align 4
  br label %1029

747:                                              ; preds = %721, %710
  %748 = landingpad { ptr, i32 }
          cleanup
  %749 = extractvalue { ptr, i32 } %748, 0
  store ptr %749, ptr %5, align 8
  %750 = extractvalue { ptr, i32 } %748, 1
  store i32 %750, ptr %6, align 4
  br label %1028

751:                                              ; preds = %742, %739, %735
  call void @llvm.lifetime.start.p0(i64 24, ptr %64) #11
  %752 = load ptr, ptr %59, align 8, !tbaa !5
  %753 = getelementptr inbounds %"class.Riemann::DynamicMeshAABBTree", ptr %752, i32 0, i32 0
  %754 = load ptr, ptr %753, align 8, !tbaa !58
  %755 = invoke noundef i32 @_ZNK7Riemann11DynamicMesh16GetTriangleCountEv(ptr noundef nonnull align 8 dereferenceable(452) %754)
          to label %756 unwind label %764

756:                                              ; preds = %751
  %757 = sext i32 %755 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %65) #11
  call void @_ZNSaIN5Maths8TVector3IfEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %65) #11
  invoke void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEC2EmRKS3_(ptr noundef nonnull align 8 dereferenceable(24) %64, i64 noundef %757, ptr noundef nonnull align 1 dereferenceable(1) %65)
          to label %758 unwind label %768

758:                                              ; preds = %756
  call void @_ZNSt15__new_allocatorIN5Maths8TVector3IfEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %65) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %65) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %66) #11
  store i64 0, ptr %66, align 8, !tbaa !64
  br label %759

759:                                              ; preds = %783, %758
  %760 = load i64, ptr %66, align 8, !tbaa !64
  %761 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %64) #11
  %762 = icmp ult i64 %760, %761
  br i1 %762, label %772, label %763

763:                                              ; preds = %759
  store i32 22, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #11
  br label %790

764:                                              ; preds = %751
  %765 = landingpad { ptr, i32 }
          cleanup
  %766 = extractvalue { ptr, i32 } %765, 0
  store ptr %766, ptr %5, align 8
  %767 = extractvalue { ptr, i32 } %765, 1
  store i32 %767, ptr %6, align 4
  br label %1027

768:                                              ; preds = %756
  %769 = landingpad { ptr, i32 }
          cleanup
  %770 = extractvalue { ptr, i32 } %769, 0
  store ptr %770, ptr %5, align 8
  %771 = extractvalue { ptr, i32 } %769, 1
  store i32 %771, ptr %6, align 4
  call void @_ZNSt15__new_allocatorIN5Maths8TVector3IfEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %65) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %65) #11
  br label %1027

772:                                              ; preds = %759
  call void @llvm.lifetime.start.p0(i64 12, ptr %67) #11
  %773 = load ptr, ptr %59, align 8, !tbaa !5
  %774 = getelementptr inbounds %"class.Riemann::DynamicMeshAABBTree", ptr %773, i32 0, i32 0
  %775 = load ptr, ptr %774, align 8, !tbaa !58
  %776 = load i64, ptr %66, align 8, !tbaa !64
  %777 = trunc i64 %776 to i32
  invoke void @_ZNK7Riemann11DynamicMesh12GetTriNormalEi(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %67, ptr noundef nonnull align 8 dereferenceable(452) %775, i32 noundef %777)
          to label %778 unwind label %786

778:                                              ; preds = %772
  %779 = load i64, ptr %66, align 8, !tbaa !64
  %780 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %64, i64 noundef %779) #11
  %781 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %780, ptr noundef nonnull align 4 dereferenceable(12) %67)
          to label %782 unwind label %786

782:                                              ; preds = %778
  call void @llvm.lifetime.end.p0(i64 12, ptr %67) #11
  br label %783

783:                                              ; preds = %782
  %784 = load i64, ptr %66, align 8, !tbaa !64
  %785 = add i64 %784, 1
  store i64 %785, ptr %66, align 8, !tbaa !64
  br label %759, !llvm.loop !65

786:                                              ; preds = %778, %772
  %787 = landingpad { ptr, i32 }
          cleanup
  %788 = extractvalue { ptr, i32 } %787, 0
  store ptr %788, ptr %5, align 8
  %789 = extractvalue { ptr, i32 } %787, 1
  store i32 %789, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %67) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #11
  br label %1026

790:                                              ; preds = %763
  call void @llvm.lifetime.start.p0(i64 4, ptr %68) #11
  %791 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 1
  %792 = load float, ptr %791, align 4, !tbaa !39
  store float %792, ptr %68, align 4, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 40, ptr %69) #11
  %793 = load float, ptr %68, align 4, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 8, ptr %71) #11
  %794 = getelementptr inbounds %class.anon.115, ptr %71, i32 0, i32 0
  store ptr %64, ptr %794, align 8, !tbaa !5
  call void @"_ZNSt8functionIFbiEEC2IZN7Riemann15GeometryBoolean7ComputeEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %70, ptr noundef nonnull align 8 dereferenceable(8) %71) #11
  invoke void @_ZN7Riemann13FQueryOptionsC2EfSt8functionIFbiEE(ptr noundef nonnull align 8 dereferenceable(40) %69, float noundef %793, ptr noundef %70)
          to label %795 unwind label %801

795:                                              ; preds = %790
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %70) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %71) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %72) #11
  store i32 0, ptr %72, align 4, !tbaa !35
  br label %796

796:                                              ; preds = %1005, %795
  %797 = load i32, ptr %72, align 4, !tbaa !35
  %798 = load i32, ptr %61, align 4, !tbaa !35
  %799 = icmp slt i32 %797, %798
  br i1 %799, label %805, label %800

800:                                              ; preds = %796
  store i32 25, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %72) #11
  br label %1021

801:                                              ; preds = %790
  %802 = landingpad { ptr, i32 }
          cleanup
  %803 = extractvalue { ptr, i32 } %802, 0
  store ptr %803, ptr %5, align 8
  %804 = extractvalue { ptr, i32 } %802, 1
  store i32 %804, ptr %6, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %70) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %71) #11
  br label %1025

805:                                              ; preds = %796
  %806 = load ptr, ptr %60, align 8, !tbaa !5
  %807 = load i32, ptr %72, align 4, !tbaa !35
  %808 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh10IsTriangleEi(ptr noundef nonnull align 8 dereferenceable(452) %806, i32 noundef %807)
          to label %809 unwind label %811

809:                                              ; preds = %805
  br i1 %808, label %815, label %810

810:                                              ; preds = %809
  br label %1005

811:                                              ; preds = %805
  %812 = landingpad { ptr, i32 }
          cleanup
  %813 = extractvalue { ptr, i32 } %812, 0
  store ptr %813, ptr %5, align 8
  %814 = extractvalue { ptr, i32 } %812, 1
  store i32 %814, ptr %6, align 4
  br label %1020

815:                                              ; preds = %809
  call void @llvm.lifetime.start.p0(i64 36, ptr %73) #11
  invoke void @_ZN7Riemann9Triangle3C2Ev(ptr noundef nonnull align 4 dereferenceable(36) %73)
          to label %816 unwind label %843

816:                                              ; preds = %815
  %817 = load ptr, ptr %60, align 8, !tbaa !5
  %818 = load i32, ptr %72, align 4, !tbaa !35
  %819 = getelementptr inbounds %"class.Riemann::Triangle3", ptr %73, i32 0, i32 0
  %820 = getelementptr inbounds %"class.Riemann::Triangle3", ptr %73, i32 0, i32 1
  %821 = getelementptr inbounds %"class.Riemann::Triangle3", ptr %73, i32 0, i32 2
  invoke void @_ZNK7Riemann11DynamicMesh14GetTriVerticesEiRN5Maths8TVector3IfEES4_S4_(ptr noundef nonnull align 8 dereferenceable(452) %817, i32 noundef %818, ptr noundef nonnull align 4 dereferenceable(12) %819, ptr noundef nonnull align 4 dereferenceable(12) %820, ptr noundef nonnull align 4 dereferenceable(12) %821)
          to label %822 unwind label %843

822:                                              ; preds = %816
  call void @llvm.lifetime.start.p0(i64 12, ptr %74) #11
  invoke void @_ZNK7Riemann9Triangle39GetCenterEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %74, ptr noundef nonnull align 4 dereferenceable(36) %73)
          to label %823 unwind label %847

823:                                              ; preds = %822
  call void @llvm.lifetime.start.p0(i64 4, ptr %75) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %76) #11
  %824 = load ptr, ptr %59, align 8, !tbaa !5
  %825 = invoke noundef i32 @_ZNK7Riemann19DynamicMeshAABBTree19FindNearestTriangleERKN5Maths8TVector3IfEERfRKNS_13FQueryOptionsE(ptr noundef nonnull align 8 dereferenceable(88) %824, ptr noundef nonnull align 4 dereferenceable(12) %74, ptr noundef nonnull align 4 dereferenceable(4) %75, ptr noundef nonnull align 8 dereferenceable(40) %69)
          to label %826 unwind label %851

826:                                              ; preds = %823
  store i32 %825, ptr %76, align 4, !tbaa !35
  %827 = load i32, ptr %76, align 4, !tbaa !35
  %828 = icmp sgt i32 %827, -1
  br i1 %828, label %829, label %977

829:                                              ; preds = %826
  call void @llvm.lifetime.start.p0(i64 12, ptr %77) #11
  %830 = load i32, ptr %76, align 4, !tbaa !35
  %831 = sext i32 %830 to i64
  %832 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %64, i64 noundef %831) #11
  invoke void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %77, ptr noundef nonnull align 4 dereferenceable(12) %832)
          to label %833 unwind label %855

833:                                              ; preds = %829
  call void @llvm.lifetime.start.p0(i64 12, ptr %78) #11
  %834 = load ptr, ptr %60, align 8, !tbaa !5
  %835 = load i32, ptr %72, align 4, !tbaa !35
  invoke void @_ZNK7Riemann11DynamicMesh12GetTriNormalEi(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %78, ptr noundef nonnull align 8 dereferenceable(452) %834, i32 noundef %835)
          to label %836 unwind label %859

836:                                              ; preds = %833
  call void @llvm.lifetime.start.p0(i64 4, ptr %79) #11
  %837 = invoke noundef float @_ZNK5Maths8TVector3IfE3DotERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %77, ptr noundef nonnull align 4 dereferenceable(12) %78)
          to label %838 unwind label %863

838:                                              ; preds = %836
  store float %837, ptr %79, align 4, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 1, ptr %80) #11
  store i8 1, ptr %80, align 1, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 4, ptr %81) #11
  store i32 0, ptr %81, align 4, !tbaa !35
  br label %839

839:                                              ; preds = %893, %838
  %840 = load i32, ptr %81, align 4, !tbaa !35
  %841 = icmp slt i32 %840, 3
  br i1 %841, label %867, label %842

842:                                              ; preds = %839
  store i32 28, ptr %25, align 4
  br label %896

843:                                              ; preds = %816, %815
  %844 = landingpad { ptr, i32 }
          cleanup
  %845 = extractvalue { ptr, i32 } %844, 0
  store ptr %845, ptr %5, align 8
  %846 = extractvalue { ptr, i32 } %844, 1
  store i32 %846, ptr %6, align 4
  br label %1019

847:                                              ; preds = %822
  %848 = landingpad { ptr, i32 }
          cleanup
  %849 = extractvalue { ptr, i32 } %848, 0
  store ptr %849, ptr %5, align 8
  %850 = extractvalue { ptr, i32 } %848, 1
  store i32 %850, ptr %6, align 4
  br label %1018

851:                                              ; preds = %823
  %852 = landingpad { ptr, i32 }
          cleanup
  %853 = extractvalue { ptr, i32 } %852, 0
  store ptr %853, ptr %5, align 8
  %854 = extractvalue { ptr, i32 } %852, 1
  store i32 %854, ptr %6, align 4
  br label %1008

855:                                              ; preds = %829
  %856 = landingpad { ptr, i32 }
          cleanup
  %857 = extractvalue { ptr, i32 } %856, 0
  store ptr %857, ptr %5, align 8
  %858 = extractvalue { ptr, i32 } %856, 1
  store i32 %858, ptr %6, align 4
  br label %976

859:                                              ; preds = %833
  %860 = landingpad { ptr, i32 }
          cleanup
  %861 = extractvalue { ptr, i32 } %860, 0
  store ptr %861, ptr %5, align 8
  %862 = extractvalue { ptr, i32 } %860, 1
  store i32 %862, ptr %6, align 4
  br label %975

863:                                              ; preds = %836
  %864 = landingpad { ptr, i32 }
          cleanup
  %865 = extractvalue { ptr, i32 } %864, 0
  store ptr %865, ptr %5, align 8
  %866 = extractvalue { ptr, i32 } %864, 1
  store i32 %866, ptr %6, align 4
  br label %974

867:                                              ; preds = %839
  %868 = load ptr, ptr %59, align 8, !tbaa !5
  %869 = load i32, ptr %81, align 4, !tbaa !35
  %870 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Riemann9Triangle3ixEi(ptr noundef nonnull align 4 dereferenceable(36) %73, i32 noundef %869)
          to label %871 unwind label %879

871:                                              ; preds = %867
  call void @llvm.lifetime.start.p0(i64 40, ptr %82) #11
  %872 = load float, ptr %68, align 4, !tbaa !43
  %873 = fmul float %872, 2.000000e+00
  call void @_ZNSt8functionIFbiEEC2EDn(ptr noundef nonnull align 8 dereferenceable(32) %83, ptr null) #11
  invoke void @_ZN7Riemann13FQueryOptionsC2EfSt8functionIFbiEE(ptr noundef nonnull align 8 dereferenceable(40) %82, float noundef %873, ptr noundef %83)
          to label %874 unwind label %883

874:                                              ; preds = %871
  %875 = invoke noundef i32 @_ZNK7Riemann19DynamicMeshAABBTree19FindNearestTriangleERKN5Maths8TVector3IfEERfRKNS_13FQueryOptionsE(ptr noundef nonnull align 8 dereferenceable(88) %868, ptr noundef nonnull align 4 dereferenceable(12) %870, ptr noundef nonnull align 4 dereferenceable(4) %75, ptr noundef nonnull align 8 dereferenceable(40) %82)
          to label %876 unwind label %887

876:                                              ; preds = %874
  %877 = icmp eq i32 %875, -1
  call void @_ZN7Riemann13FQueryOptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %82) #11
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %83) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr %82) #11
  br i1 %877, label %878, label %892

878:                                              ; preds = %876
  store i8 0, ptr %80, align 1, !tbaa !38
  store i32 28, ptr %25, align 4
  br label %896

879:                                              ; preds = %867
  %880 = landingpad { ptr, i32 }
          cleanup
  %881 = extractvalue { ptr, i32 } %880, 0
  store ptr %881, ptr %5, align 8
  %882 = extractvalue { ptr, i32 } %880, 1
  store i32 %882, ptr %6, align 4
  br label %897

883:                                              ; preds = %871
  %884 = landingpad { ptr, i32 }
          cleanup
  %885 = extractvalue { ptr, i32 } %884, 0
  store ptr %885, ptr %5, align 8
  %886 = extractvalue { ptr, i32 } %884, 1
  store i32 %886, ptr %6, align 4
  br label %891

887:                                              ; preds = %874
  %888 = landingpad { ptr, i32 }
          cleanup
  %889 = extractvalue { ptr, i32 } %888, 0
  store ptr %889, ptr %5, align 8
  %890 = extractvalue { ptr, i32 } %888, 1
  store i32 %890, ptr %6, align 4
  call void @_ZN7Riemann13FQueryOptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %82) #11
  br label %891

891:                                              ; preds = %887, %883
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %83) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr %82) #11
  br label %897

892:                                              ; preds = %876
  br label %893

893:                                              ; preds = %892
  %894 = load i32, ptr %81, align 4, !tbaa !35
  %895 = add nsw i32 %894, 1
  store i32 %895, ptr %81, align 4, !tbaa !35
  br label %839, !llvm.loop !66

896:                                              ; preds = %878, %842
  call void @llvm.lifetime.end.p0(i64 4, ptr %81) #11
  br label %898

897:                                              ; preds = %891, %879
  call void @llvm.lifetime.end.p0(i64 4, ptr %81) #11
  br label %973

898:                                              ; preds = %896
  %899 = load i8, ptr %80, align 1, !tbaa !38, !range !45, !noundef !46
  %900 = trunc i8 %899 to i1
  br i1 %900, label %901, label %966

901:                                              ; preds = %898
  %902 = load i32, ptr %57, align 4, !tbaa !35
  %903 = icmp ne i32 %902, 0
  br i1 %903, label %907, label %904

904:                                              ; preds = %901
  %905 = invoke noundef zeroext i1 @_ZNK5Maths8TVector3IfE6IsZeroEv(ptr noundef nonnull align 4 dereferenceable(12) %78)
          to label %906 unwind label %920

906:                                              ; preds = %904
  br i1 %905, label %907, label %928

907:                                              ; preds = %906, %901
  call void @llvm.lifetime.start.p0(i64 16, ptr %84) #11
  %908 = load i32, ptr %57, align 4, !tbaa !35
  %909 = sext i32 %908 to i64
  %910 = getelementptr inbounds [2 x %"class.std::vector.106"], ptr %54, i64 0, i64 %909
  %911 = load i32, ptr %72, align 4, !tbaa !35
  %912 = sext i32 %911 to i64
  %913 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %910, i64 noundef %912)
          to label %914 unwind label %924

914:                                              ; preds = %907
  %915 = getelementptr inbounds { ptr, i64 }, ptr %84, i32 0, i32 0
  %916 = extractvalue { ptr, i64 } %913, 0
  store ptr %916, ptr %915, align 8
  %917 = getelementptr inbounds { ptr, i64 }, ptr %84, i32 0, i32 1
  %918 = extractvalue { ptr, i64 } %913, 1
  store i64 %918, ptr %917, align 8
  %919 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %84, i1 noundef zeroext false) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %84) #11
  store i32 27, ptr %25, align 4
  br label %967

920:                                              ; preds = %904
  %921 = landingpad { ptr, i32 }
          cleanup
  %922 = extractvalue { ptr, i32 } %921, 0
  store ptr %922, ptr %5, align 8
  %923 = extractvalue { ptr, i32 } %921, 1
  store i32 %923, ptr %6, align 4
  br label %973

924:                                              ; preds = %907
  %925 = landingpad { ptr, i32 }
          cleanup
  %926 = extractvalue { ptr, i32 } %925, 0
  store ptr %926, ptr %5, align 8
  %927 = extractvalue { ptr, i32 } %925, 1
  store i32 %927, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %84) #11
  br label %973

928:                                              ; preds = %906
  call void @llvm.lifetime.start.p0(i64 1, ptr %85) #11
  %929 = load float, ptr %79, align 4, !tbaa !43
  %930 = fcmp ogt float %929, 0.000000e+00
  %931 = zext i1 %930 to i32
  %932 = load i8, ptr %62, align 1, !tbaa !38, !range !45, !noundef !46
  %933 = trunc i8 %932 to i1
  %934 = zext i1 %933 to i32
  %935 = icmp eq i32 %931, %934
  %936 = zext i1 %935 to i8
  store i8 %936, ptr %85, align 1, !tbaa !38
  %937 = load i8, ptr %85, align 1, !tbaa !38, !range !45, !noundef !46
  %938 = trunc i8 %937 to i1
  call void @llvm.lifetime.start.p0(i64 16, ptr %86) #11
  %939 = load i32, ptr %57, align 4, !tbaa !35
  %940 = sext i32 %939 to i64
  %941 = getelementptr inbounds [2 x %"class.std::vector.106"], ptr %54, i64 0, i64 %940
  %942 = load i32, ptr %72, align 4, !tbaa !35
  %943 = sext i32 %942 to i64
  %944 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %941, i64 noundef %943)
          to label %945 unwind label %961

945:                                              ; preds = %928
  %946 = getelementptr inbounds { ptr, i64 }, ptr %86, i32 0, i32 0
  %947 = extractvalue { ptr, i64 } %944, 0
  store ptr %947, ptr %946, align 8
  %948 = getelementptr inbounds { ptr, i64 }, ptr %86, i32 0, i32 1
  %949 = extractvalue { ptr, i64 } %944, 1
  store i64 %949, ptr %948, align 8
  %950 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %86, i1 noundef zeroext %938) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %86) #11
  %951 = load i32, ptr %21, align 4, !tbaa !35
  %952 = icmp sgt i32 %951, 1
  br i1 %952, label %953, label %965

953:                                              ; preds = %945
  %954 = load i8, ptr %85, align 1, !tbaa !38, !range !45, !noundef !46
  %955 = trunc i8 %954 to i1
  br i1 %955, label %956, label %965

956:                                              ; preds = %953
  %957 = load i32, ptr %76, align 4, !tbaa !35
  %958 = load i32, ptr %72, align 4, !tbaa !35
  %959 = sext i32 %958 to i64
  %960 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %959) #11
  store i32 %957, ptr %960, align 4, !tbaa !35
  br label %965

961:                                              ; preds = %928
  %962 = landingpad { ptr, i32 }
          cleanup
  %963 = extractvalue { ptr, i32 } %962, 0
  store ptr %963, ptr %5, align 8
  %964 = extractvalue { ptr, i32 } %962, 1
  store i32 %964, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %86) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %85) #11
  br label %973

965:                                              ; preds = %956, %953, %945
  store i32 27, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %85) #11
  br label %967

966:                                              ; preds = %898
  store i32 0, ptr %25, align 4
  br label %967

967:                                              ; preds = %966, %965, %914
  call void @llvm.lifetime.end.p0(i64 1, ptr %80) #11
  %968 = load i32, ptr %25, align 4
  switch i32 %968, label %970 [
    i32 0, label %969
  ]

969:                                              ; preds = %967
  store i32 0, ptr %25, align 4
  br label %970

970:                                              ; preds = %969, %967
  call void @llvm.lifetime.end.p0(i64 4, ptr %79) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr %78) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr %77) #11
  %971 = load i32, ptr %25, align 4
  switch i32 %971, label %978 [
    i32 0, label %972
  ]

972:                                              ; preds = %970
  br label %977

973:                                              ; preds = %961, %924, %920, %897
  call void @llvm.lifetime.end.p0(i64 1, ptr %80) #11
  br label %974

974:                                              ; preds = %973, %863
  call void @llvm.lifetime.end.p0(i64 4, ptr %79) #11
  br label %975

975:                                              ; preds = %974, %859
  call void @llvm.lifetime.end.p0(i64 12, ptr %78) #11
  br label %976

976:                                              ; preds = %975, %855
  call void @llvm.lifetime.end.p0(i64 12, ptr %77) #11
  br label %1008

977:                                              ; preds = %972, %826
  store i32 0, ptr %25, align 4
  br label %978

978:                                              ; preds = %977, %970
  call void @llvm.lifetime.end.p0(i64 4, ptr %76) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %75) #11
  %979 = load i32, ptr %25, align 4
  switch i32 %979, label %1002 [
    i32 0, label %980
  ]

980:                                              ; preds = %978
  call void @llvm.lifetime.start.p0(i64 4, ptr %87) #11
  %981 = invoke noundef float @_ZN7Riemann16TFastWindingTree17FastWindingNumberERKN5Maths8TVector3IfEE(ptr noundef nonnull align 8 dereferenceable(72) %58, ptr noundef nonnull align 4 dereferenceable(12) %74)
          to label %982 unwind label %1009

982:                                              ; preds = %980
  store float %981, ptr %87, align 4, !tbaa !43
  %983 = load float, ptr %87, align 4, !tbaa !43
  %984 = fcmp ogt float %983, 5.000000e-01
  %985 = zext i1 %984 to i32
  %986 = load i8, ptr %63, align 1, !tbaa !38, !range !45, !noundef !46
  %987 = trunc i8 %986 to i1
  %988 = zext i1 %987 to i32
  %989 = icmp ne i32 %985, %988
  call void @llvm.lifetime.start.p0(i64 16, ptr %88) #11
  %990 = load i32, ptr %57, align 4, !tbaa !35
  %991 = sext i32 %990 to i64
  %992 = getelementptr inbounds [2 x %"class.std::vector.106"], ptr %54, i64 0, i64 %991
  %993 = load i32, ptr %72, align 4, !tbaa !35
  %994 = sext i32 %993 to i64
  %995 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %992, i64 noundef %994)
          to label %996 unwind label %1013

996:                                              ; preds = %982
  %997 = getelementptr inbounds { ptr, i64 }, ptr %88, i32 0, i32 0
  %998 = extractvalue { ptr, i64 } %995, 0
  store ptr %998, ptr %997, align 8
  %999 = getelementptr inbounds { ptr, i64 }, ptr %88, i32 0, i32 1
  %1000 = extractvalue { ptr, i64 } %995, 1
  store i64 %1000, ptr %999, align 8
  %1001 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %88, i1 noundef zeroext %989) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %88) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %87) #11
  store i32 0, ptr %25, align 4
  br label %1002

1002:                                             ; preds = %996, %978
  call void @llvm.lifetime.end.p0(i64 12, ptr %74) #11
  call void @llvm.lifetime.end.p0(i64 36, ptr %73) #11
  %1003 = load i32, ptr %25, align 4
  switch i32 %1003, label %2070 [
    i32 0, label %1004
    i32 27, label %1005
  ]

1004:                                             ; preds = %1002
  br label %1005

1005:                                             ; preds = %1004, %1002, %810
  %1006 = load i32, ptr %72, align 4, !tbaa !35
  %1007 = add nsw i32 %1006, 1
  store i32 %1007, ptr %72, align 4, !tbaa !35
  br label %796, !llvm.loop !67

1008:                                             ; preds = %976, %851
  call void @llvm.lifetime.end.p0(i64 4, ptr %76) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %75) #11
  br label %1018

1009:                                             ; preds = %980
  %1010 = landingpad { ptr, i32 }
          cleanup
  %1011 = extractvalue { ptr, i32 } %1010, 0
  store ptr %1011, ptr %5, align 8
  %1012 = extractvalue { ptr, i32 } %1010, 1
  store i32 %1012, ptr %6, align 4
  br label %1017

1013:                                             ; preds = %982
  %1014 = landingpad { ptr, i32 }
          cleanup
  %1015 = extractvalue { ptr, i32 } %1014, 0
  store ptr %1015, ptr %5, align 8
  %1016 = extractvalue { ptr, i32 } %1014, 1
  store i32 %1016, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %88) #11
  br label %1017

1017:                                             ; preds = %1013, %1009
  call void @llvm.lifetime.end.p0(i64 4, ptr %87) #11
  br label %1018

1018:                                             ; preds = %1017, %1008, %847
  call void @llvm.lifetime.end.p0(i64 12, ptr %74) #11
  br label %1019

1019:                                             ; preds = %1018, %843
  call void @llvm.lifetime.end.p0(i64 36, ptr %73) #11
  br label %1020

1020:                                             ; preds = %1019, %811
  call void @llvm.lifetime.end.p0(i64 4, ptr %72) #11
  call void @_ZN7Riemann13FQueryOptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %69) #11
  br label %1025

1021:                                             ; preds = %800
  call void @_ZN7Riemann13FQueryOptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %69) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr %69) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %68) #11
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %64) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %64) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %63) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %62) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #11
  call void @_ZN7Riemann16TFastWindingTreeD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %58) #11
  call void @llvm.lifetime.end.p0(i64 72, ptr %58) #11
  br label %1022

1022:                                             ; preds = %1021
  %1023 = load i32, ptr %57, align 4, !tbaa !35
  %1024 = add nsw i32 %1023, 1
  store i32 %1024, ptr %57, align 4, !tbaa !35
  br label %700, !llvm.loop !68

1025:                                             ; preds = %1020, %801
  call void @llvm.lifetime.end.p0(i64 40, ptr %69) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %68) #11
  br label %1026

1026:                                             ; preds = %1025, %786
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %64) #11
  br label %1027

1027:                                             ; preds = %1026, %768, %764
  call void @llvm.lifetime.end.p0(i64 24, ptr %64) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %63) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %62) #11
  br label %1028

1028:                                             ; preds = %1027, %747
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #11
  call void @_ZN7Riemann16TFastWindingTreeD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %58) #11
  br label %1029

1029:                                             ; preds = %1028, %743
  call void @llvm.lifetime.end.p0(i64 72, ptr %58) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #11
  br label %1320

1030:                                             ; preds = %704
  %1031 = load i32, ptr %21, align 4, !tbaa !35
  %1032 = icmp sgt i32 %1031, 1
  br i1 %1032, label %1033, label %1099

1033:                                             ; preds = %1030
  call void @llvm.lifetime.start.p0(i64 4, ptr %89) #11
  store i32 0, ptr %89, align 4, !tbaa !35
  br label %1034

1034:                                             ; preds = %1093, %1033
  %1035 = load i32, ptr %89, align 4, !tbaa !35
  %1036 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 0
  %1037 = load ptr, ptr %1036, align 16, !tbaa !5
  %1038 = invoke noundef i32 @_ZNK7Riemann11DynamicMesh16GetTriangleCountEv(ptr noundef nonnull align 8 dereferenceable(452) %1037)
          to label %1039 unwind label %1042

1039:                                             ; preds = %1034
  %1040 = icmp slt i32 %1035, %1038
  br i1 %1040, label %1046, label %1041

1041:                                             ; preds = %1039
  store i32 31, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %89) #11
  br label %1098

1042:                                             ; preds = %1046, %1034
  %1043 = landingpad { ptr, i32 }
          cleanup
  %1044 = extractvalue { ptr, i32 } %1043, 0
  store ptr %1044, ptr %5, align 8
  %1045 = extractvalue { ptr, i32 } %1043, 1
  store i32 %1045, ptr %6, align 4
  br label %1097

1046:                                             ; preds = %1039
  %1047 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 0
  %1048 = load ptr, ptr %1047, align 16, !tbaa !5
  %1049 = load i32, ptr %89, align 4, !tbaa !35
  %1050 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsTriangleFastEi(ptr noundef nonnull align 8 dereferenceable(452) %1048, i32 noundef %1049)
          to label %1051 unwind label %1042

1051:                                             ; preds = %1046
  br i1 %1050, label %1053, label %1052

1052:                                             ; preds = %1051
  br label %1093

1053:                                             ; preds = %1051
  call void @llvm.lifetime.start.p0(i64 4, ptr %90) #11
  %1054 = load i32, ptr %89, align 4, !tbaa !35
  %1055 = sext i32 %1054 to i64
  %1056 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %1055) #11
  %1057 = load i32, ptr %1056, align 4, !tbaa !35
  store i32 %1057, ptr %90, align 4, !tbaa !35
  %1058 = load i32, ptr %90, align 4, !tbaa !35
  %1059 = icmp sgt i32 %1058, -1
  call void @llvm.lifetime.start.p0(i64 16, ptr %91) #11
  br i1 %1059, label %1060, label %1071

1060:                                             ; preds = %1053
  %1061 = getelementptr inbounds [2 x %"class.std::vector.106"], ptr %54, i64 0, i64 1
  %1062 = load i32, ptr %90, align 4, !tbaa !35
  %1063 = sext i32 %1062 to i64
  %1064 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1061, i64 noundef %1063)
          to label %1065 unwind label %1084

1065:                                             ; preds = %1060
  %1066 = getelementptr inbounds { ptr, i64 }, ptr %91, i32 0, i32 0
  %1067 = extractvalue { ptr, i64 } %1064, 0
  store ptr %1067, ptr %1066, align 8
  %1068 = getelementptr inbounds { ptr, i64 }, ptr %91, i32 0, i32 1
  %1069 = extractvalue { ptr, i64 } %1064, 1
  store i64 %1069, ptr %1068, align 8
  %1070 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %91) #11
  br label %1071

1071:                                             ; preds = %1065, %1053
  %1072 = phi i1 [ false, %1053 ], [ %1070, %1065 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %91) #11
  br i1 %1072, label %1073, label %1092

1073:                                             ; preds = %1071
  call void @llvm.lifetime.start.p0(i64 16, ptr %92) #11
  %1074 = getelementptr inbounds [2 x %"class.std::vector.106"], ptr %54, i64 0, i64 0
  %1075 = load i32, ptr %89, align 4, !tbaa !35
  %1076 = sext i32 %1075 to i64
  %1077 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1074, i64 noundef %1076)
          to label %1078 unwind label %1088

1078:                                             ; preds = %1073
  %1079 = getelementptr inbounds { ptr, i64 }, ptr %92, i32 0, i32 0
  %1080 = extractvalue { ptr, i64 } %1077, 0
  store ptr %1080, ptr %1079, align 8
  %1081 = getelementptr inbounds { ptr, i64 }, ptr %92, i32 0, i32 1
  %1082 = extractvalue { ptr, i64 } %1077, 1
  store i64 %1082, ptr %1081, align 8
  %1083 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %92, i1 noundef zeroext false) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %92) #11
  br label %1092

1084:                                             ; preds = %1060
  %1085 = landingpad { ptr, i32 }
          cleanup
  %1086 = extractvalue { ptr, i32 } %1085, 0
  store ptr %1086, ptr %5, align 8
  %1087 = extractvalue { ptr, i32 } %1085, 1
  store i32 %1087, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %91) #11
  br label %1096

1088:                                             ; preds = %1073
  %1089 = landingpad { ptr, i32 }
          cleanup
  %1090 = extractvalue { ptr, i32 } %1089, 0
  store ptr %1090, ptr %5, align 8
  %1091 = extractvalue { ptr, i32 } %1089, 1
  store i32 %1091, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %92) #11
  br label %1096

1092:                                             ; preds = %1078, %1071
  call void @llvm.lifetime.end.p0(i64 4, ptr %90) #11
  br label %1093

1093:                                             ; preds = %1092, %1052
  %1094 = load i32, ptr %89, align 4, !tbaa !35
  %1095 = add nsw i32 %1094, 1
  store i32 %1095, ptr %89, align 4, !tbaa !35
  br label %1034, !llvm.loop !69

1096:                                             ; preds = %1088, %1084
  call void @llvm.lifetime.end.p0(i64 4, ptr %90) #11
  br label %1097

1097:                                             ; preds = %1096, %1042
  call void @llvm.lifetime.end.p0(i64 4, ptr %89) #11
  br label %1320

1098:                                             ; preds = %1041
  br label %1099

1099:                                             ; preds = %1098, %1030
  call void @llvm.lifetime.start.p0(i64 4, ptr %93) #11
  store i32 0, ptr %93, align 4, !tbaa !35
  br label %1100

1100:                                             ; preds = %1227, %1099
  %1101 = load i32, ptr %93, align 4, !tbaa !35
  %1102 = load i32, ptr %21, align 4, !tbaa !35
  %1103 = icmp slt i32 %1101, %1102
  br i1 %1103, label %1105, label %1104

1104:                                             ; preds = %1100
  store i32 34, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %93) #11
  br label %1230

1105:                                             ; preds = %1100
  call void @llvm.lifetime.start.p0(i64 8, ptr %94) #11
  %1106 = load i32, ptr %93, align 4, !tbaa !35
  %1107 = sext i32 %1106 to i64
  %1108 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %1107
  %1109 = load ptr, ptr %1108, align 8, !tbaa !5
  store ptr %1109, ptr %94, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %95) #11
  store i32 0, ptr %95, align 4, !tbaa !35
  br label %1110

1110:                                             ; preds = %1221, %1105
  %1111 = load i32, ptr %95, align 4, !tbaa !35
  %1112 = load ptr, ptr %94, align 8, !tbaa !5
  %1113 = invoke noundef i32 @_ZNK7Riemann11DynamicMesh12GetEdgeCountEv(ptr noundef nonnull align 8 dereferenceable(452) %1112)
          to label %1114 unwind label %1117

1114:                                             ; preds = %1110
  %1115 = icmp slt i32 %1111, %1113
  br i1 %1115, label %1121, label %1116

1116:                                             ; preds = %1114
  store i32 37, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %95) #11
  br label %1226

1117:                                             ; preds = %1121, %1110
  %1118 = landingpad { ptr, i32 }
          cleanup
  %1119 = extractvalue { ptr, i32 } %1118, 0
  store ptr %1119, ptr %5, align 8
  %1120 = extractvalue { ptr, i32 } %1118, 1
  store i32 %1120, ptr %6, align 4
  br label %1225

1121:                                             ; preds = %1114
  %1122 = load ptr, ptr %94, align 8, !tbaa !5
  %1123 = load i32, ptr %95, align 4, !tbaa !35
  %1124 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh10IsEdgeFastEi(ptr noundef nonnull align 8 dereferenceable(452) %1122, i32 noundef %1123)
          to label %1125 unwind label %1117

1125:                                             ; preds = %1121
  br i1 %1124, label %1127, label %1126

1126:                                             ; preds = %1125
  br label %1221

1127:                                             ; preds = %1125
  call void @llvm.lifetime.start.p0(i64 8, ptr %96) #11
  %1128 = load ptr, ptr %94, align 8, !tbaa !5
  %1129 = load i32, ptr %95, align 4, !tbaa !35
  %1130 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZN7Riemann11DynamicMesh7GetEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %1128, i32 noundef %1129)
          to label %1131 unwind label %1174

1131:                                             ; preds = %1127
  store ptr %1130, ptr %96, align 8, !tbaa !5
  %1132 = load ptr, ptr %96, align 8, !tbaa !5
  %1133 = getelementptr inbounds %"struct.Riemann::DynamicMesh::Edge", ptr %1132, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 16, ptr %97) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr %98) #11
  %1134 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %1133, i32 noundef 1)
          to label %1135 unwind label %1174

1135:                                             ; preds = %1131
  %1136 = load i32, ptr %1134, align 4, !tbaa !35
  %1137 = icmp eq i32 %1136, -1
  br i1 %1137, label %1171, label %1138

1138:                                             ; preds = %1135
  %1139 = load i32, ptr %93, align 4, !tbaa !35
  %1140 = sext i32 %1139 to i64
  %1141 = getelementptr inbounds [2 x %"class.std::vector.106"], ptr %54, i64 0, i64 %1140
  %1142 = load ptr, ptr %96, align 8, !tbaa !5
  %1143 = getelementptr inbounds %"struct.Riemann::DynamicMesh::Edge", ptr %1142, i32 0, i32 1
  %1144 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %1143, i32 noundef 0)
          to label %1145 unwind label %1178

1145:                                             ; preds = %1138
  %1146 = load i32, ptr %1144, align 4, !tbaa !35
  %1147 = sext i32 %1146 to i64
  %1148 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1141, i64 noundef %1147)
          to label %1149 unwind label %1178

1149:                                             ; preds = %1145
  %1150 = getelementptr inbounds { ptr, i64 }, ptr %97, i32 0, i32 0
  %1151 = extractvalue { ptr, i64 } %1148, 0
  store ptr %1151, ptr %1150, align 8
  %1152 = getelementptr inbounds { ptr, i64 }, ptr %97, i32 0, i32 1
  %1153 = extractvalue { ptr, i64 } %1148, 1
  store i64 %1153, ptr %1152, align 8
  %1154 = load i32, ptr %93, align 4, !tbaa !35
  %1155 = sext i32 %1154 to i64
  %1156 = getelementptr inbounds [2 x %"class.std::vector.106"], ptr %54, i64 0, i64 %1155
  %1157 = load ptr, ptr %96, align 8, !tbaa !5
  %1158 = getelementptr inbounds %"struct.Riemann::DynamicMesh::Edge", ptr %1157, i32 0, i32 1
  %1159 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %1158, i32 noundef 1)
          to label %1160 unwind label %1182

1160:                                             ; preds = %1149
  %1161 = load i32, ptr %1159, align 4, !tbaa !35
  %1162 = sext i32 %1161 to i64
  %1163 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1156, i64 noundef %1162)
          to label %1164 unwind label %1182

1164:                                             ; preds = %1160
  %1165 = getelementptr inbounds { ptr, i64 }, ptr %98, i32 0, i32 0
  %1166 = extractvalue { ptr, i64 } %1163, 0
  store ptr %1166, ptr %1165, align 8
  %1167 = getelementptr inbounds { ptr, i64 }, ptr %98, i32 0, i32 1
  %1168 = extractvalue { ptr, i64 } %1163, 1
  store i64 %1168, ptr %1167, align 8
  %1169 = invoke noundef zeroext i1 @_ZNKSt14_Bit_referenceeqERKS_(ptr noundef nonnull align 8 dereferenceable(16) %97, ptr noundef nonnull align 8 dereferenceable(16) %98)
          to label %1170 unwind label %1182

1170:                                             ; preds = %1164
  br label %1171

1171:                                             ; preds = %1170, %1135
  %1172 = phi i1 [ true, %1135 ], [ %1169, %1170 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %98) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %97) #11
  br i1 %1172, label %1173, label %1187

1173:                                             ; preds = %1171
  store i32 39, ptr %25, align 4
  br label %1218

1174:                                             ; preds = %1211, %1200, %1198, %1191, %1187, %1131, %1127
  %1175 = landingpad { ptr, i32 }
          cleanup
  %1176 = extractvalue { ptr, i32 } %1175, 0
  store ptr %1176, ptr %5, align 8
  %1177 = extractvalue { ptr, i32 } %1175, 1
  store i32 %1177, ptr %6, align 4
  br label %1224

1178:                                             ; preds = %1145, %1138
  %1179 = landingpad { ptr, i32 }
          cleanup
  %1180 = extractvalue { ptr, i32 } %1179, 0
  store ptr %1180, ptr %5, align 8
  %1181 = extractvalue { ptr, i32 } %1179, 1
  store i32 %1181, ptr %6, align 4
  br label %1186

1182:                                             ; preds = %1164, %1160, %1149
  %1183 = landingpad { ptr, i32 }
          cleanup
  %1184 = extractvalue { ptr, i32 } %1183, 0
  store ptr %1184, ptr %5, align 8
  %1185 = extractvalue { ptr, i32 } %1183, 1
  store i32 %1185, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %98) #11
  br label %1186

1186:                                             ; preds = %1182, %1178
  call void @llvm.lifetime.end.p0(i64 16, ptr %97) #11
  br label %1224

1187:                                             ; preds = %1171
  %1188 = load i32, ptr %93, align 4, !tbaa !35
  %1189 = sext i32 %1188 to i64
  %1190 = getelementptr inbounds [2 x %"class.std::vector"], ptr %51, i64 0, i64 %1189
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %1190, ptr noundef nonnull align 4 dereferenceable(4) %95)
          to label %1191 unwind label %1174

1191:                                             ; preds = %1187
  %1192 = load i32, ptr %93, align 4, !tbaa !35
  %1193 = sext i32 %1192 to i64
  %1194 = getelementptr inbounds [2 x %"class.std::set"], ptr %52, i64 0, i64 %1193
  %1195 = load ptr, ptr %96, align 8, !tbaa !5
  %1196 = getelementptr inbounds %"struct.Riemann::DynamicMesh::Edge", ptr %1195, i32 0, i32 0
  %1197 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %1196, i32 noundef 0)
          to label %1198 unwind label %1174

1198:                                             ; preds = %1191
  %1199 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %1194, ptr noundef nonnull align 4 dereferenceable(4) %1197)
          to label %1200 unwind label %1174

1200:                                             ; preds = %1198
  %1201 = getelementptr inbounds { ptr, i8 }, ptr %99, i32 0, i32 0
  %1202 = extractvalue { ptr, i8 } %1199, 0
  store ptr %1202, ptr %1201, align 8
  %1203 = getelementptr inbounds { ptr, i8 }, ptr %99, i32 0, i32 1
  %1204 = extractvalue { ptr, i8 } %1199, 1
  store i8 %1204, ptr %1203, align 8
  %1205 = load i32, ptr %93, align 4, !tbaa !35
  %1206 = sext i32 %1205 to i64
  %1207 = getelementptr inbounds [2 x %"class.std::set"], ptr %52, i64 0, i64 %1206
  %1208 = load ptr, ptr %96, align 8, !tbaa !5
  %1209 = getelementptr inbounds %"struct.Riemann::DynamicMesh::Edge", ptr %1208, i32 0, i32 0
  %1210 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %1209, i32 noundef 1)
          to label %1211 unwind label %1174

1211:                                             ; preds = %1200
  %1212 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %1207, ptr noundef nonnull align 4 dereferenceable(4) %1210)
          to label %1213 unwind label %1174

1213:                                             ; preds = %1211
  %1214 = getelementptr inbounds { ptr, i8 }, ptr %100, i32 0, i32 0
  %1215 = extractvalue { ptr, i8 } %1212, 0
  store ptr %1215, ptr %1214, align 8
  %1216 = getelementptr inbounds { ptr, i8 }, ptr %100, i32 0, i32 1
  %1217 = extractvalue { ptr, i8 } %1212, 1
  store i8 %1217, ptr %1216, align 8
  store i32 0, ptr %25, align 4
  br label %1218

1218:                                             ; preds = %1213, %1173
  call void @llvm.lifetime.end.p0(i64 8, ptr %96) #11
  %1219 = load i32, ptr %25, align 4
  switch i32 %1219, label %2070 [
    i32 0, label %1220
    i32 39, label %1221
  ]

1220:                                             ; preds = %1218
  br label %1221

1221:                                             ; preds = %1220, %1218, %1126
  %1222 = load i32, ptr %95, align 4, !tbaa !35
  %1223 = add nsw i32 %1222, 1
  store i32 %1223, ptr %95, align 4, !tbaa !35
  br label %1110, !llvm.loop !70

1224:                                             ; preds = %1186, %1174
  call void @llvm.lifetime.end.p0(i64 8, ptr %96) #11
  br label %1225

1225:                                             ; preds = %1224, %1117
  call void @llvm.lifetime.end.p0(i64 4, ptr %95) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %94) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %93) #11
  br label %1320

1226:                                             ; preds = %1116
  call void @llvm.lifetime.end.p0(i64 8, ptr %94) #11
  br label %1227

1227:                                             ; preds = %1226
  %1228 = load i32, ptr %93, align 4, !tbaa !35
  %1229 = add nsw i32 %1228, 1
  store i32 %1229, ptr %93, align 4, !tbaa !35
  br label %1100, !llvm.loop !71

1230:                                             ; preds = %1104
  call void @llvm.lifetime.start.p0(i64 4, ptr %101) #11
  store i32 0, ptr %101, align 4, !tbaa !35
  br label %1231

1231:                                             ; preds = %1290, %1230
  %1232 = load i32, ptr %101, align 4, !tbaa !35
  %1233 = load i32, ptr %21, align 4, !tbaa !35
  %1234 = icmp slt i32 %1232, %1233
  br i1 %1234, label %1236, label %1235

1235:                                             ; preds = %1231
  store i32 40, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %101) #11
  br label %1293

1236:                                             ; preds = %1231
  call void @llvm.lifetime.start.p0(i64 8, ptr %102) #11
  %1237 = load i32, ptr %101, align 4, !tbaa !35
  %1238 = sext i32 %1237 to i64
  %1239 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %1238
  %1240 = load ptr, ptr %1239, align 8, !tbaa !5
  store ptr %1240, ptr %102, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %103) #11
  store i32 0, ptr %103, align 4, !tbaa !35
  br label %1241

1241:                                             ; preds = %1285, %1236
  %1242 = load i32, ptr %103, align 4, !tbaa !35
  %1243 = sext i32 %1242 to i64
  %1244 = load i32, ptr %101, align 4, !tbaa !35
  %1245 = sext i32 %1244 to i64
  %1246 = getelementptr inbounds [2 x %"class.std::vector.106"], ptr %54, i64 0, i64 %1245
  %1247 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %1246) #11
  %1248 = icmp ult i64 %1243, %1247
  br i1 %1248, label %1250, label %1249

1249:                                             ; preds = %1241
  store i32 43, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %103) #11
  br label %1289

1250:                                             ; preds = %1241
  %1251 = load ptr, ptr %102, align 8, !tbaa !5
  %1252 = load i32, ptr %103, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 16, ptr %104) #11
  %1253 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh10IsTriangleEi(ptr noundef nonnull align 8 dereferenceable(452) %1251, i32 noundef %1252)
          to label %1254 unwind label %1276

1254:                                             ; preds = %1250
  br i1 %1253, label %1255, label %1269

1255:                                             ; preds = %1254
  %1256 = load i32, ptr %101, align 4, !tbaa !35
  %1257 = sext i32 %1256 to i64
  %1258 = getelementptr inbounds [2 x %"class.std::vector.106"], ptr %54, i64 0, i64 %1257
  %1259 = load i32, ptr %103, align 4, !tbaa !35
  %1260 = sext i32 %1259 to i64
  %1261 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %1258, i64 noundef %1260)
          to label %1262 unwind label %1280

1262:                                             ; preds = %1255
  %1263 = getelementptr inbounds { ptr, i64 }, ptr %104, i32 0, i32 0
  %1264 = extractvalue { ptr, i64 } %1261, 0
  store ptr %1264, ptr %1263, align 8
  %1265 = getelementptr inbounds { ptr, i64 }, ptr %104, i32 0, i32 1
  %1266 = extractvalue { ptr, i64 } %1261, 1
  store i64 %1266, ptr %1265, align 8
  %1267 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %104) #11
  %1268 = xor i1 %1267, true
  br label %1269

1269:                                             ; preds = %1262, %1254
  %1270 = phi i1 [ false, %1254 ], [ %1268, %1262 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %104) #11
  br i1 %1270, label %1271, label %1284

1271:                                             ; preds = %1269
  %1272 = load ptr, ptr %102, align 8, !tbaa !5
  %1273 = load i32, ptr %103, align 4, !tbaa !35
  %1274 = invoke noundef i32 @_ZN7Riemann11DynamicMesh14RemoveTriangleEibb(ptr noundef nonnull align 8 dereferenceable(452) %1272, i32 noundef %1273, i1 noundef zeroext true, i1 noundef zeroext false)
          to label %1275 unwind label %1276

1275:                                             ; preds = %1271
  br label %1284

1276:                                             ; preds = %1271, %1250
  %1277 = landingpad { ptr, i32 }
          cleanup
  %1278 = extractvalue { ptr, i32 } %1277, 0
  store ptr %1278, ptr %5, align 8
  %1279 = extractvalue { ptr, i32 } %1277, 1
  store i32 %1279, ptr %6, align 4
  br label %1288

1280:                                             ; preds = %1255
  %1281 = landingpad { ptr, i32 }
          cleanup
  %1282 = extractvalue { ptr, i32 } %1281, 0
  store ptr %1282, ptr %5, align 8
  %1283 = extractvalue { ptr, i32 } %1281, 1
  store i32 %1283, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %104) #11
  br label %1288

1284:                                             ; preds = %1275, %1269
  br label %1285

1285:                                             ; preds = %1284
  %1286 = load i32, ptr %103, align 4, !tbaa !35
  %1287 = add nsw i32 %1286, 1
  store i32 %1287, ptr %103, align 4, !tbaa !35
  br label %1241, !llvm.loop !72

1288:                                             ; preds = %1280, %1276
  call void @llvm.lifetime.end.p0(i64 4, ptr %103) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %102) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %101) #11
  br label %1320

1289:                                             ; preds = %1249
  call void @llvm.lifetime.end.p0(i64 8, ptr %102) #11
  br label %1290

1290:                                             ; preds = %1289
  %1291 = load i32, ptr %101, align 4, !tbaa !35
  %1292 = add nsw i32 %1291, 1
  store i32 %1292, ptr %101, align 4, !tbaa !35
  br label %1231, !llvm.loop !73

1293:                                             ; preds = %1235
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %55) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %55) #11
  %1294 = getelementptr inbounds [2 x %"class.std::vector.106"], ptr %54, i32 0, i32 0
  %1295 = getelementptr inbounds %"class.std::vector.106", ptr %1294, i64 2
  br label %1296

1296:                                             ; preds = %1296, %1293
  %1297 = phi ptr [ %1295, %1293 ], [ %1298, %1296 ]
  %1298 = getelementptr inbounds %"class.std::vector.106", ptr %1297, i64 -1
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1298) #11
  %1299 = icmp eq ptr %1298, %1294
  br i1 %1299, label %1300, label %1296

1300:                                             ; preds = %1296
  call void @llvm.lifetime.end.p0(i64 80, ptr %54) #11
  call void @llvm.lifetime.start.p0(i64 48, ptr %105) #11
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %105) #11
  %1301 = load i32, ptr %21, align 4, !tbaa !35
  %1302 = icmp eq i32 %1301, 2
  br i1 %1302, label %1303, label %1771

1303:                                             ; preds = %1300
  call void @llvm.lifetime.start.p0(i64 96, ptr %106) #11
  %1304 = getelementptr inbounds [2 x %"class.std::map"], ptr %106, i32 0, i32 0
  %1305 = getelementptr inbounds %"class.std::map", ptr %1304, i64 2
  br label %1306

1306:                                             ; preds = %1306, %1303
  %1307 = phi ptr [ %1304, %1303 ], [ %1308, %1306 ]
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1307) #11
  %1308 = getelementptr inbounds %"class.std::map", ptr %1307, i64 1
  %1309 = icmp eq ptr %1308, %1305
  br i1 %1309, label %1310, label %1306

1310:                                             ; preds = %1306
  call void @llvm.lifetime.start.p0(i64 4, ptr %107) #11
  %1311 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 1
  %1312 = load float, ptr %1311, align 4, !tbaa !39
  %1313 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 1
  %1314 = load float, ptr %1313, align 4, !tbaa !39
  %1315 = fmul float %1312, %1314
  store float %1315, ptr %107, align 4, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 4, ptr %108) #11
  store i32 0, ptr %108, align 4, !tbaa !35
  br label %1316

1316:                                             ; preds = %1748, %1310
  %1317 = load i32, ptr %108, align 4, !tbaa !35
  %1318 = icmp slt i32 %1317, 2
  br i1 %1318, label %1328, label %1319

1319:                                             ; preds = %1316
  store i32 46, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %108) #11
  br label %1758

1320:                                             ; preds = %1288, %1225, %1097, %1029, %695, %691
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %55) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %55) #11
  %1321 = getelementptr inbounds [2 x %"class.std::vector.106"], ptr %54, i32 0, i32 0
  %1322 = getelementptr inbounds %"class.std::vector.106", ptr %1321, i64 2
  br label %1323

1323:                                             ; preds = %1323, %1320
  %1324 = phi ptr [ %1322, %1320 ], [ %1325, %1323 ]
  %1325 = getelementptr inbounds %"class.std::vector.106", ptr %1324, i64 -1
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1325) #11
  %1326 = icmp eq ptr %1325, %1321
  br i1 %1326, label %1327, label %1323

1327:                                             ; preds = %1323
  call void @llvm.lifetime.end.p0(i64 80, ptr %54) #11
  br label %2015

1328:                                             ; preds = %1316
  call void @llvm.lifetime.start.p0(i64 4, ptr %109) #11
  %1329 = load i32, ptr %108, align 4, !tbaa !35
  %1330 = sub nsw i32 1, %1329
  store i32 %1330, ptr %109, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 8, ptr %110) #11
  %1331 = load i32, ptr %109, align 4, !tbaa !35
  %1332 = sext i32 %1331 to i64
  %1333 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %1332
  %1334 = load ptr, ptr %1333, align 8, !tbaa !5
  store ptr %1334, ptr %110, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr %111) #11
  %1335 = load ptr, ptr %110, align 8, !tbaa !5
  %1336 = invoke noundef nonnull align 4 dereferenceable(24) ptr @_ZNK7Riemann11DynamicMesh9GetBoundsEv(ptr noundef nonnull align 8 dereferenceable(452) %1335)
          to label %1337 unwind label %1354

1337:                                             ; preds = %1328
  %1338 = invoke noundef float @_ZNK5Maths6TAABB3IfE6MaxDimEv(ptr noundef nonnull align 4 dereferenceable(24) %1336)
          to label %1339 unwind label %1354

1339:                                             ; preds = %1337
  %1340 = fdiv float %1338, 6.400000e+01
  invoke void @_ZN7Riemann18SparseSpatialHash3IiEC2Efi(ptr noundef nonnull align 8 dereferenceable(64) %111, float noundef %1340, i32 noundef 1024)
          to label %1341 unwind label %1354

1341:                                             ; preds = %1339
  call void @llvm.lifetime.start.p0(i64 8, ptr %112) #11
  %1342 = load i32, ptr %109, align 4, !tbaa !35
  %1343 = sext i32 %1342 to i64
  %1344 = getelementptr inbounds [2 x %"class.std::set"], ptr %52, i64 0, i64 %1343
  store ptr %1344, ptr %112, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %113) #11
  %1345 = load ptr, ptr %112, align 8, !tbaa !5
  %1346 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %1345) #11
  %1347 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %113, i32 0, i32 0
  store ptr %1346, ptr %1347, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %114) #11
  %1348 = load ptr, ptr %112, align 8, !tbaa !5
  %1349 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %1348) #11
  %1350 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %114, i32 0, i32 0
  store ptr %1349, ptr %1350, align 8
  br label %1351

1351:                                             ; preds = %1365, %1341
  %1352 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %113, ptr noundef nonnull align 8 dereferenceable(8) %114) #11
  br i1 %1352, label %1358, label %1353

1353:                                             ; preds = %1351
  store i32 49, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %114) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %113) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %112) #11
  br label %1371

1354:                                             ; preds = %1339, %1337, %1328
  %1355 = landingpad { ptr, i32 }
          cleanup
  %1356 = extractvalue { ptr, i32 } %1355, 0
  store ptr %1356, ptr %5, align 8
  %1357 = extractvalue { ptr, i32 } %1355, 1
  store i32 %1357, ptr %6, align 4
  br label %1755

1358:                                             ; preds = %1351
  call void @llvm.lifetime.start.p0(i64 4, ptr %115) #11
  %1359 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %113) #11
  %1360 = load i32, ptr %1359, align 4, !tbaa !35
  store i32 %1360, ptr %115, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 12, ptr %116) #11
  %1361 = load ptr, ptr %110, align 8, !tbaa !5
  %1362 = load i32, ptr %115, align 4, !tbaa !35
  invoke void @_ZNK7Riemann11DynamicMesh9GetVertexEi(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %116, ptr noundef nonnull align 8 dereferenceable(452) %1361, i32 noundef %1362)
          to label %1363 unwind label %1367

1363:                                             ; preds = %1358
  invoke void @_ZN7Riemann18SparseSpatialHash3IiE6InsertERKN5Maths8TVector3IfEERKi(ptr noundef nonnull align 8 dereferenceable(64) %111, ptr noundef nonnull align 4 dereferenceable(12) %116, ptr noundef nonnull align 4 dereferenceable(4) %115)
          to label %1364 unwind label %1367

1364:                                             ; preds = %1363
  call void @llvm.lifetime.end.p0(i64 12, ptr %116) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %115) #11
  br label %1365

1365:                                             ; preds = %1364
  %1366 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %113) #11
  br label %1351

1367:                                             ; preds = %1363, %1358
  %1368 = landingpad { ptr, i32 }
          cleanup
  %1369 = extractvalue { ptr, i32 } %1368, 0
  store ptr %1369, ptr %5, align 8
  %1370 = extractvalue { ptr, i32 } %1368, 1
  store i32 %1370, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %116) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %115) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %114) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %113) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %112) #11
  br label %1754

1371:                                             ; preds = %1353
  call void @llvm.lifetime.start.p0(i64 272, ptr %117) #11
  %1372 = load ptr, ptr %110, align 8, !tbaa !5
  %1373 = invoke noundef nonnull align 4 dereferenceable(24) ptr @_ZNK7Riemann11DynamicMesh9GetBoundsEv(ptr noundef nonnull align 8 dereferenceable(452) %1372)
          to label %1374 unwind label %1403

1374:                                             ; preds = %1371
  %1375 = getelementptr inbounds %"class.Maths::TAABB3", ptr %1373, i32 0, i32 0
  %1376 = load ptr, ptr %110, align 8, !tbaa !5
  %1377 = invoke noundef nonnull align 4 dereferenceable(24) ptr @_ZNK7Riemann11DynamicMesh9GetBoundsEv(ptr noundef nonnull align 8 dereferenceable(452) %1376)
          to label %1378 unwind label %1403

1378:                                             ; preds = %1374
  %1379 = getelementptr inbounds %"class.Maths::TAABB3", ptr %1377, i32 0, i32 1
  invoke void @_ZN7Riemann12SparseOctreeC1ERKN5Maths8TVector3IfEES5_i(ptr noundef nonnull align 8 dereferenceable(268) %117, ptr noundef nonnull align 4 dereferenceable(12) %1375, ptr noundef nonnull align 4 dereferenceable(12) %1379, i32 noundef 7)
          to label %1380 unwind label %1403

1380:                                             ; preds = %1378
  call void @llvm.lifetime.start.p0(i64 8, ptr %118) #11
  %1381 = getelementptr inbounds %class.anon.137, ptr %118, i32 0, i32 0
  %1382 = load ptr, ptr %110, align 8, !tbaa !5
  store ptr %1382, ptr %1381, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %119) #11
  %1383 = getelementptr inbounds %class.anon.138, ptr %119, i32 0, i32 0
  store ptr %117, ptr %1383, align 8, !tbaa !5
  %1384 = getelementptr inbounds %class.anon.138, ptr %119, i32 0, i32 1
  %1385 = load ptr, ptr %110, align 8, !tbaa !5
  store ptr %1385, ptr %1384, align 8, !tbaa !5
  %1386 = getelementptr inbounds %class.anon.138, ptr %119, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %1386, ptr align 8 %118, i64 8, i1 false), !tbaa.struct !74
  call void @llvm.lifetime.start.p0(i64 24, ptr %120) #11
  %1387 = getelementptr inbounds %class.anon.139, ptr %120, i32 0, i32 0
  store ptr %117, ptr %1387, align 8, !tbaa !5
  %1388 = getelementptr inbounds %class.anon.139, ptr %120, i32 0, i32 1
  %1389 = load ptr, ptr %110, align 8, !tbaa !5
  store ptr %1389, ptr %1388, align 8, !tbaa !5
  %1390 = getelementptr inbounds %class.anon.139, ptr %120, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %1390, ptr align 8 %118, i64 8, i1 false), !tbaa.struct !74
  call void @llvm.lifetime.start.p0(i64 8, ptr %121) #11
  %1391 = load i32, ptr %109, align 4, !tbaa !35
  %1392 = sext i32 %1391 to i64
  %1393 = getelementptr inbounds [2 x %"class.std::vector"], ptr %51, i64 0, i64 %1392
  store ptr %1393, ptr %121, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %122) #11
  %1394 = load ptr, ptr %121, align 8, !tbaa !5
  %1395 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1394) #11
  %1396 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.57", ptr %122, i32 0, i32 0
  store ptr %1395, ptr %1396, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %123) #11
  %1397 = load ptr, ptr %121, align 8, !tbaa !5
  %1398 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1397) #11
  %1399 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.57", ptr %123, i32 0, i32 0
  store ptr %1398, ptr %1399, align 8
  br label %1400

1400:                                             ; preds = %1412, %1380
  %1401 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %122, ptr noundef nonnull align 8 dereferenceable(8) %123) #11
  br i1 %1401, label %1407, label %1402

1402:                                             ; preds = %1400
  store i32 51, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %123) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %122) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %121) #11
  br label %1418

1403:                                             ; preds = %1378, %1374, %1371
  %1404 = landingpad { ptr, i32 }
          cleanup
  %1405 = extractvalue { ptr, i32 } %1404, 0
  store ptr %1405, ptr %5, align 8
  %1406 = extractvalue { ptr, i32 } %1404, 1
  store i32 %1406, ptr %6, align 4
  br label %1753

1407:                                             ; preds = %1400
  call void @llvm.lifetime.start.p0(i64 4, ptr %124) #11
  %1408 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %122) #11
  %1409 = load i32, ptr %1408, align 4, !tbaa !35
  store i32 %1409, ptr %124, align 4, !tbaa !35
  %1410 = load i32, ptr %124, align 4, !tbaa !35
  invoke void @"_ZZN7Riemann15GeometryBoolean7ComputeEvENK3$_2clEi"(ptr noundef nonnull align 8 dereferenceable(24) %119, i32 noundef %1410)
          to label %1411 unwind label %1414

1411:                                             ; preds = %1407
  call void @llvm.lifetime.end.p0(i64 4, ptr %124) #11
  br label %1412

1412:                                             ; preds = %1411
  %1413 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %122) #11
  br label %1400

1414:                                             ; preds = %1407
  %1415 = landingpad { ptr, i32 }
          cleanup
  %1416 = extractvalue { ptr, i32 } %1415, 0
  store ptr %1416, ptr %5, align 8
  %1417 = extractvalue { ptr, i32 } %1415, 1
  store i32 %1417, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %124) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %123) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %122) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %121) #11
  br label %1752

1418:                                             ; preds = %1402
  call void @llvm.lifetime.start.p0(i64 24, ptr %125) #11
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %125) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %126) #11
  %1419 = load i32, ptr %108, align 4, !tbaa !35
  %1420 = sext i32 %1419 to i64
  %1421 = getelementptr inbounds [2 x %"class.std::map"], ptr %106, i64 0, i64 %1420
  store ptr %1421, ptr %126, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %127) #11
  %1422 = load i32, ptr %108, align 4, !tbaa !35
  %1423 = sext i32 %1422 to i64
  %1424 = getelementptr inbounds [2 x %"class.std::set"], ptr %52, i64 0, i64 %1423
  store ptr %1424, ptr %127, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %128) #11
  %1425 = load ptr, ptr %127, align 8, !tbaa !5
  %1426 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %1425) #11
  %1427 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %128, i32 0, i32 0
  store ptr %1426, ptr %1427, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %129) #11
  %1428 = load ptr, ptr %127, align 8, !tbaa !5
  %1429 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %1428) #11
  %1430 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %129, i32 0, i32 0
  store ptr %1429, ptr %1430, align 8
  br label %1431

1431:                                             ; preds = %1685, %1418
  %1432 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %128, ptr noundef nonnull align 8 dereferenceable(8) %129) #11
  br i1 %1432, label %1434, label %1433

1433:                                             ; preds = %1431
  store i32 53, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %129) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %128) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %127) #11
  br label %1690

1434:                                             ; preds = %1431
  call void @llvm.lifetime.start.p0(i64 4, ptr %130) #11
  %1435 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %128) #11
  %1436 = load i32, ptr %1435, align 4, !tbaa !35
  store i32 %1436, ptr %130, align 4, !tbaa !35
  %1437 = load i32, ptr %108, align 4, !tbaa !35
  %1438 = icmp eq i32 %1437, 1
  br i1 %1438, label %1439, label %1449

1439:                                             ; preds = %1434
  %1440 = getelementptr inbounds [2 x %"class.std::map"], ptr %106, i64 0, i64 0
  %1441 = invoke noundef i64 @_ZNKSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5countERS3_(ptr noundef nonnull align 8 dereferenceable(48) %1440, ptr noundef nonnull align 4 dereferenceable(4) %130)
          to label %1442 unwind label %1445

1442:                                             ; preds = %1439
  %1443 = icmp ugt i64 %1441, 0
  br i1 %1443, label %1444, label %1449

1444:                                             ; preds = %1442
  store i32 54, ptr %25, align 4
  br label %1682

1445:                                             ; preds = %1439
  %1446 = landingpad { ptr, i32 }
          cleanup
  %1447 = extractvalue { ptr, i32 } %1446, 0
  store ptr %1447, ptr %5, align 8
  %1448 = extractvalue { ptr, i32 } %1446, 1
  store i32 %1448, ptr %6, align 4
  br label %1689

1449:                                             ; preds = %1442, %1434
  call void @llvm.lifetime.start.p0(i64 12, ptr %131) #11
  %1450 = load i32, ptr %108, align 4, !tbaa !35
  %1451 = sext i32 %1450 to i64
  %1452 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %1451
  %1453 = load ptr, ptr %1452, align 8, !tbaa !5
  %1454 = load i32, ptr %130, align 4, !tbaa !35
  invoke void @_ZNK7Riemann11DynamicMesh9GetVertexEi(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %131, ptr noundef nonnull align 8 dereferenceable(452) %1453, i32 noundef %1454)
          to label %1455 unwind label %1513

1455:                                             ; preds = %1449
  call void @llvm.lifetime.start.p0(i64 4, ptr %132) #11
  store i32 -1, ptr %132, align 4, !tbaa !35
  %1456 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 1
  %1457 = load float, ptr %1456, align 4, !tbaa !39
  %1458 = invoke noundef zeroext i1 @_ZN7Riemann18SparseSpatialHash3IiE11FindNearestERKN5Maths8TVector3IfEEfRi(ptr noundef nonnull align 8 dereferenceable(64) %111, ptr noundef nonnull align 4 dereferenceable(12) %131, float noundef %1457, ptr noundef nonnull align 4 dereferenceable(4) %132)
          to label %1459 unwind label %1517

1459:                                             ; preds = %1455
  br i1 %1458, label %1460, label %1560

1460:                                             ; preds = %1459
  call void @llvm.lifetime.start.p0(i64 4, ptr %133) #11
  call void @llvm.lifetime.start.p0(i64 12, ptr %134) #11
  call void @llvm.lifetime.start.p0(i64 12, ptr %135) #11
  %1461 = load ptr, ptr %110, align 8, !tbaa !5
  %1462 = load i32, ptr %132, align 4, !tbaa !35
  invoke void @_ZNK7Riemann11DynamicMesh9GetVertexEi(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %135, ptr noundef nonnull align 8 dereferenceable(452) %1461, i32 noundef %1462)
          to label %1463 unwind label %1521

1463:                                             ; preds = %1460
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %134, ptr noundef nonnull align 4 dereferenceable(12) %135, ptr noundef nonnull align 4 dereferenceable(12) %131)
          to label %1464 unwind label %1521

1464:                                             ; preds = %1463
  %1465 = invoke noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %134)
          to label %1466 unwind label %1521

1466:                                             ; preds = %1464
  call void @llvm.lifetime.end.p0(i64 12, ptr %135) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr %134) #11
  store float %1465, ptr %133, align 4, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 8, ptr %136) #11
  %1467 = load ptr, ptr %126, align 8, !tbaa !5
  %1468 = invoke ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE4findERS3_(ptr noundef nonnull align 8 dereferenceable(48) %1467, ptr noundef nonnull align 4 dereferenceable(4) %132)
          to label %1469 unwind label %1525

1469:                                             ; preds = %1466
  %1470 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %136, i32 0, i32 0
  store ptr %1468, ptr %1470, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %137) #11
  %1471 = load ptr, ptr %126, align 8, !tbaa !5
  %1472 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %1471) #11
  %1473 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %137, i32 0, i32 0
  store ptr %1472, ptr %1473, align 8
  %1474 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiiEES5_(ptr noundef nonnull align 8 dereferenceable(8) %136, ptr noundef nonnull align 8 dereferenceable(8) %137) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %137) #11
  br i1 %1474, label %1475, label %1549

1475:                                             ; preds = %1469
  call void @llvm.lifetime.start.p0(i64 4, ptr %138) #11
  %1476 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %136) #11
  %1477 = getelementptr inbounds %"struct.std::pair.140", ptr %1476, i32 0, i32 1
  %1478 = load i32, ptr %1477, align 4, !tbaa !75
  store i32 %1478, ptr %138, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 4, ptr %139) #11
  call void @llvm.lifetime.start.p0(i64 12, ptr %140) #11
  call void @llvm.lifetime.start.p0(i64 12, ptr %141) #11
  %1479 = load i32, ptr %108, align 4, !tbaa !35
  %1480 = sext i32 %1479 to i64
  %1481 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %1480
  %1482 = load ptr, ptr %1481, align 8, !tbaa !5
  %1483 = load i32, ptr %138, align 4, !tbaa !35
  invoke void @_ZNK7Riemann11DynamicMesh9GetVertexEi(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %141, ptr noundef nonnull align 8 dereferenceable(452) %1482, i32 noundef %1483)
          to label %1484 unwind label %1529

1484:                                             ; preds = %1475
  call void @llvm.lifetime.start.p0(i64 12, ptr %142) #11
  %1485 = load ptr, ptr %110, align 8, !tbaa !5
  %1486 = load i32, ptr %132, align 4, !tbaa !35
  invoke void @_ZNK7Riemann11DynamicMesh9GetVertexEi(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %142, ptr noundef nonnull align 8 dereferenceable(452) %1485, i32 noundef %1486)
          to label %1487 unwind label %1533

1487:                                             ; preds = %1484
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %140, ptr noundef nonnull align 4 dereferenceable(12) %141, ptr noundef nonnull align 4 dereferenceable(12) %142)
          to label %1488 unwind label %1533

1488:                                             ; preds = %1487
  %1489 = invoke noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %140)
          to label %1490 unwind label %1533

1490:                                             ; preds = %1488
  call void @llvm.lifetime.end.p0(i64 12, ptr %142) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr %141) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr %140) #11
  store float %1489, ptr %139, align 4, !tbaa !43
  %1491 = load float, ptr %133, align 4, !tbaa !43
  %1492 = load float, ptr %139, align 4, !tbaa !43
  %1493 = fcmp olt float %1491, %1492
  br i1 %1493, label %1494, label %1547

1494:                                             ; preds = %1490
  call void @llvm.lifetime.start.p0(i64 4, ptr %143) #11
  %1495 = load i32, ptr %138, align 4, !tbaa !35
  store i32 %1495, ptr %143, align 4, !tbaa !35
  %1496 = load ptr, ptr %126, align 8, !tbaa !5
  %1497 = invoke { ptr, i8 } @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE7emplaceIJRiS8_EEES2_ISt17_Rb_tree_iteratorIS4_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(48) %1496, ptr noundef nonnull align 4 dereferenceable(4) %132, ptr noundef nonnull align 4 dereferenceable(4) %130)
          to label %1498 unwind label %1538

1498:                                             ; preds = %1494
  %1499 = getelementptr inbounds { ptr, i8 }, ptr %144, i32 0, i32 0
  %1500 = extractvalue { ptr, i8 } %1497, 0
  store ptr %1500, ptr %1499, align 8
  %1501 = getelementptr inbounds { ptr, i8 }, ptr %144, i32 0, i32 1
  %1502 = extractvalue { ptr, i8 } %1497, 1
  store i8 %1502, ptr %1501, align 8
  %1503 = load i32, ptr %143, align 4, !tbaa !35
  store i32 %1503, ptr %130, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 12, ptr %145) #11
  %1504 = load i32, ptr %108, align 4, !tbaa !35
  %1505 = sext i32 %1504 to i64
  %1506 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %1505
  %1507 = load ptr, ptr %1506, align 8, !tbaa !5
  %1508 = load i32, ptr %130, align 4, !tbaa !35
  invoke void @_ZNK7Riemann11DynamicMesh9GetVertexEi(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %145, ptr noundef nonnull align 8 dereferenceable(452) %1507, i32 noundef %1508)
          to label %1509 unwind label %1542

1509:                                             ; preds = %1498
  %1510 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %131, ptr noundef nonnull align 4 dereferenceable(12) %145)
          to label %1511 unwind label %1542

1511:                                             ; preds = %1509
  call void @llvm.lifetime.end.p0(i64 12, ptr %145) #11
  %1512 = load float, ptr %139, align 4, !tbaa !43
  store float %1512, ptr %133, align 4, !tbaa !43
  call void @llvm.lifetime.end.p0(i64 4, ptr %143) #11
  br label %1547

1513:                                             ; preds = %1449
  %1514 = landingpad { ptr, i32 }
          cleanup
  %1515 = extractvalue { ptr, i32 } %1514, 0
  store ptr %1515, ptr %5, align 8
  %1516 = extractvalue { ptr, i32 } %1514, 1
  store i32 %1516, ptr %6, align 4
  br label %1688

1517:                                             ; preds = %1455
  %1518 = landingpad { ptr, i32 }
          cleanup
  %1519 = extractvalue { ptr, i32 } %1518, 0
  store ptr %1519, ptr %5, align 8
  %1520 = extractvalue { ptr, i32 } %1518, 1
  store i32 %1520, ptr %6, align 4
  br label %1687

1521:                                             ; preds = %1464, %1463, %1460
  %1522 = landingpad { ptr, i32 }
          cleanup
  %1523 = extractvalue { ptr, i32 } %1522, 0
  store ptr %1523, ptr %5, align 8
  %1524 = extractvalue { ptr, i32 } %1522, 1
  store i32 %1524, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %135) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr %134) #11
  br label %1559

1525:                                             ; preds = %1549, %1466
  %1526 = landingpad { ptr, i32 }
          cleanup
  %1527 = extractvalue { ptr, i32 } %1526, 0
  store ptr %1527, ptr %5, align 8
  %1528 = extractvalue { ptr, i32 } %1526, 1
  store i32 %1528, ptr %6, align 4
  br label %1558

1529:                                             ; preds = %1475
  %1530 = landingpad { ptr, i32 }
          cleanup
  %1531 = extractvalue { ptr, i32 } %1530, 0
  store ptr %1531, ptr %5, align 8
  %1532 = extractvalue { ptr, i32 } %1530, 1
  store i32 %1532, ptr %6, align 4
  br label %1537

1533:                                             ; preds = %1488, %1487, %1484
  %1534 = landingpad { ptr, i32 }
          cleanup
  %1535 = extractvalue { ptr, i32 } %1534, 0
  store ptr %1535, ptr %5, align 8
  %1536 = extractvalue { ptr, i32 } %1534, 1
  store i32 %1536, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %142) #11
  br label %1537

1537:                                             ; preds = %1533, %1529
  call void @llvm.lifetime.end.p0(i64 12, ptr %141) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr %140) #11
  br label %1548

1538:                                             ; preds = %1494
  %1539 = landingpad { ptr, i32 }
          cleanup
  %1540 = extractvalue { ptr, i32 } %1539, 0
  store ptr %1540, ptr %5, align 8
  %1541 = extractvalue { ptr, i32 } %1539, 1
  store i32 %1541, ptr %6, align 4
  br label %1546

1542:                                             ; preds = %1509, %1498
  %1543 = landingpad { ptr, i32 }
          cleanup
  %1544 = extractvalue { ptr, i32 } %1543, 0
  store ptr %1544, ptr %5, align 8
  %1545 = extractvalue { ptr, i32 } %1543, 1
  store i32 %1545, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %145) #11
  br label %1546

1546:                                             ; preds = %1542, %1538
  call void @llvm.lifetime.end.p0(i64 4, ptr %143) #11
  br label %1548

1547:                                             ; preds = %1511, %1490
  store i32 -1, ptr %132, align 4, !tbaa !35
  call void @llvm.lifetime.end.p0(i64 4, ptr %139) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %138) #11
  br label %1557

1548:                                             ; preds = %1546, %1537
  call void @llvm.lifetime.end.p0(i64 4, ptr %139) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %138) #11
  br label %1558

1549:                                             ; preds = %1469
  %1550 = load ptr, ptr %126, align 8, !tbaa !5
  %1551 = invoke { ptr, i8 } @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE7emplaceIJRiS8_EEES2_ISt17_Rb_tree_iteratorIS4_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(48) %1550, ptr noundef nonnull align 4 dereferenceable(4) %132, ptr noundef nonnull align 4 dereferenceable(4) %130)
          to label %1552 unwind label %1525

1552:                                             ; preds = %1549
  %1553 = getelementptr inbounds { ptr, i8 }, ptr %146, i32 0, i32 0
  %1554 = extractvalue { ptr, i8 } %1551, 0
  store ptr %1554, ptr %1553, align 8
  %1555 = getelementptr inbounds { ptr, i8 }, ptr %146, i32 0, i32 1
  %1556 = extractvalue { ptr, i8 } %1551, 1
  store i8 %1556, ptr %1555, align 8
  br label %1557

1557:                                             ; preds = %1552, %1547
  call void @llvm.lifetime.end.p0(i64 8, ptr %136) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %133) #11
  br label %1560

1558:                                             ; preds = %1548, %1525
  call void @llvm.lifetime.end.p0(i64 8, ptr %136) #11
  br label %1559

1559:                                             ; preds = %1558, %1521
  call void @llvm.lifetime.end.p0(i64 4, ptr %133) #11
  br label %1687

1560:                                             ; preds = %1557, %1459
  %1561 = load i32, ptr %132, align 4, !tbaa !35
  %1562 = icmp eq i32 %1561, -1
  br i1 %1562, label %1563, label %1681

1563:                                             ; preds = %1560
  call void @llvm.lifetime.start.p0(i64 24, ptr %147) #11
  %1564 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 1
  %1565 = load float, ptr %1564, align 4, !tbaa !39
  invoke void @_ZN5Maths6TAABB3IfEC2ERKNS_8TVector3IfEEf(ptr noundef nonnull align 4 dereferenceable(24) %147, ptr noundef nonnull align 4 dereferenceable(12) %131, float noundef %1565)
          to label %1566 unwind label %1640

1566:                                             ; preds = %1563
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %125) #11
  invoke void @_ZNK7Riemann12SparseOctree10RangeQueryERKN5Maths6TAABB3IfEERSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(268) %117, ptr noundef nonnull align 4 dereferenceable(24) %147, ptr noundef nonnull align 8 dereferenceable(24) %125)
          to label %1567 unwind label %1640

1567:                                             ; preds = %1566
  call void @llvm.lifetime.start.p0(i64 4, ptr %148) #11
  %1568 = load ptr, ptr %110, align 8, !tbaa !5
  %1569 = invoke noundef i32 @_ZN7RiemannL15FindNearestEdgeERKNS_11DynamicMeshERKSt6vectorIiSaIiEERKN5Maths8TVector3IfEE(ptr noundef nonnull align 8 dereferenceable(452) %1568, ptr noundef nonnull align 8 dereferenceable(24) %125, ptr noundef nonnull align 4 dereferenceable(12) %131)
          to label %1570 unwind label %1644

1570:                                             ; preds = %1567
  store i32 %1569, ptr %148, align 4, !tbaa !35
  %1571 = load i32, ptr %148, align 4, !tbaa !35
  %1572 = icmp ne i32 %1571, -1
  br i1 %1572, label %1573, label %1678

1573:                                             ; preds = %1570
  call void @llvm.lifetime.start.p0(i64 24, ptr %149) #11
  %1574 = getelementptr inbounds [2 x %"class.Maths::TVector3"], ptr %149, i32 0, i32 0
  %1575 = getelementptr inbounds %"class.Maths::TVector3", ptr %1574, i64 2
  br label %1576

1576:                                             ; preds = %1578, %1573
  %1577 = phi ptr [ %1574, %1573 ], [ %1579, %1578 ]
  invoke void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %1577)
          to label %1578 unwind label %1648

1578:                                             ; preds = %1576
  %1579 = getelementptr inbounds %"class.Maths::TVector3", ptr %1577, i64 1
  %1580 = icmp eq ptr %1579, %1575
  br i1 %1580, label %1581, label %1576

1581:                                             ; preds = %1578
  %1582 = load ptr, ptr %110, align 8, !tbaa !5
  %1583 = load i32, ptr %148, align 4, !tbaa !35
  %1584 = getelementptr inbounds [2 x %"class.Maths::TVector3"], ptr %149, i64 0, i64 0
  %1585 = getelementptr inbounds [2 x %"class.Maths::TVector3"], ptr %149, i64 0, i64 1
  invoke void @_ZNK7Riemann11DynamicMesh8GetEdgeVEiRN5Maths8TVector3IfEES4_(ptr noundef nonnull align 8 dereferenceable(452) %1582, i32 noundef %1583, ptr noundef nonnull align 4 dereferenceable(12) %1584, ptr noundef nonnull align 4 dereferenceable(12) %1585)
          to label %1586 unwind label %1648

1586:                                             ; preds = %1581
  call void @llvm.lifetime.start.p0(i64 12, ptr %150) #11
  %1587 = getelementptr inbounds [2 x %"class.Maths::TVector3"], ptr %149, i64 0, i64 0
  call void @llvm.lifetime.start.p0(i64 12, ptr %151) #11
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %150, ptr noundef nonnull align 4 dereferenceable(12) %1587, ptr noundef nonnull align 4 dereferenceable(12) %131)
          to label %1588 unwind label %1652

1588:                                             ; preds = %1586
  %1589 = invoke noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %150)
          to label %1590 unwind label %1652

1590:                                             ; preds = %1588
  %1591 = load float, ptr %107, align 4, !tbaa !43
  %1592 = fcmp ogt float %1589, %1591
  br i1 %1592, label %1593, label %1600

1593:                                             ; preds = %1590
  %1594 = getelementptr inbounds [2 x %"class.Maths::TVector3"], ptr %149, i64 0, i64 1
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %151, ptr noundef nonnull align 4 dereferenceable(12) %1594, ptr noundef nonnull align 4 dereferenceable(12) %131)
          to label %1595 unwind label %1656

1595:                                             ; preds = %1593
  %1596 = invoke noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %151)
          to label %1597 unwind label %1656

1597:                                             ; preds = %1595
  %1598 = load float, ptr %107, align 4, !tbaa !43
  %1599 = fcmp ogt float %1596, %1598
  br label %1600

1600:                                             ; preds = %1597, %1590
  %1601 = phi i1 [ false, %1590 ], [ %1599, %1597 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr %151) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr %150) #11
  br i1 %1601, label %1602, label %1676

1602:                                             ; preds = %1600
  call void @llvm.lifetime.start.p0(i64 24, ptr %152) #11
  %1603 = getelementptr inbounds [2 x %"class.Maths::TVector3"], ptr %149, i64 0, i64 0
  %1604 = getelementptr inbounds [2 x %"class.Maths::TVector3"], ptr %149, i64 0, i64 1
  invoke void @_ZN7Riemann8Segment3C2ERKN5Maths8TVector3IfEES5_(ptr noundef nonnull align 4 dereferenceable(24) %152, ptr noundef nonnull align 4 dereferenceable(12) %1603, ptr noundef nonnull align 4 dereferenceable(12) %1604)
          to label %1605 unwind label %1661

1605:                                             ; preds = %1602
  call void @llvm.lifetime.start.p0(i64 4, ptr %153) #11
  %1606 = invoke noundef float @_ZNK7Riemann8Segment316ProjectUnitRangeERKN5Maths8TVector3IfEE(ptr noundef nonnull align 4 dereferenceable(24) %152, ptr noundef nonnull align 4 dereferenceable(12) %131)
          to label %1607 unwind label %1665

1607:                                             ; preds = %1605
  store float %1606, ptr %153, align 4, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 60, ptr %154) #11
  invoke void @_ZN7Riemann14FEdgeSplitInfoC2Ev(ptr noundef nonnull align 4 dereferenceable(60) %154)
          to label %1608 unwind label %1669

1608:                                             ; preds = %1607
  %1609 = load ptr, ptr %110, align 8, !tbaa !5
  %1610 = load i32, ptr %148, align 4, !tbaa !35
  %1611 = load float, ptr %153, align 4, !tbaa !43
  %1612 = invoke noundef i32 @_ZN7Riemann11DynamicMesh9SplitEdgeEiRNS_14FEdgeSplitInfoEf(ptr noundef nonnull align 8 dereferenceable(452) %1609, i32 noundef %1610, ptr noundef nonnull align 4 dereferenceable(60) %154, float noundef %1611)
          to label %1613 unwind label %1669

1613:                                             ; preds = %1608
  %1614 = icmp eq i32 0, %1612
  br i1 %1614, label %1615, label %1673

1615:                                             ; preds = %1613
  %1616 = load ptr, ptr %126, align 8, !tbaa !5
  %1617 = getelementptr inbounds %"struct.Riemann::FEdgeSplitInfo", ptr %154, i32 0, i32 5
  %1618 = invoke { ptr, i8 } @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE7emplaceIJRiS8_EEES2_ISt17_Rb_tree_iteratorIS4_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(48) %1616, ptr noundef nonnull align 4 dereferenceable(4) %1617, ptr noundef nonnull align 4 dereferenceable(4) %130)
          to label %1619 unwind label %1669

1619:                                             ; preds = %1615
  %1620 = getelementptr inbounds { ptr, i8 }, ptr %155, i32 0, i32 0
  %1621 = extractvalue { ptr, i8 } %1618, 0
  store ptr %1621, ptr %1620, align 8
  %1622 = getelementptr inbounds { ptr, i8 }, ptr %155, i32 0, i32 1
  %1623 = extractvalue { ptr, i8 } %1618, 1
  store i8 %1623, ptr %1622, align 8
  %1624 = load ptr, ptr %110, align 8, !tbaa !5
  %1625 = getelementptr inbounds %"struct.Riemann::FEdgeSplitInfo", ptr %154, i32 0, i32 5
  %1626 = load i32, ptr %1625, align 4, !tbaa !77
  invoke void @_ZN7Riemann11DynamicMesh9SetVertexEiRKN5Maths8TVector3IfEE(ptr noundef nonnull align 8 dereferenceable(452) %1624, i32 noundef %1626, ptr noundef nonnull align 4 dereferenceable(12) %131)
          to label %1627 unwind label %1669

1627:                                             ; preds = %1619
  %1628 = load i32, ptr %109, align 4, !tbaa !35
  %1629 = sext i32 %1628 to i64
  %1630 = getelementptr inbounds [2 x %"class.std::vector"], ptr %51, i64 0, i64 %1629
  %1631 = getelementptr inbounds %"struct.Riemann::FEdgeSplitInfo", ptr %154, i32 0, i32 7
  %1632 = getelementptr inbounds %"class.Maths::TIndex3", ptr %1631, i32 0, i32 0
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %1630, ptr noundef nonnull align 4 dereferenceable(4) %1632)
          to label %1633 unwind label %1669

1633:                                             ; preds = %1627
  %1634 = load i32, ptr %148, align 4, !tbaa !35
  invoke void @"_ZZN7Riemann15GeometryBoolean7ComputeEvENK3$_3clEi"(ptr noundef nonnull align 8 dereferenceable(24) %120, i32 noundef %1634)
          to label %1635 unwind label %1669

1635:                                             ; preds = %1633
  %1636 = getelementptr inbounds %"struct.Riemann::FEdgeSplitInfo", ptr %154, i32 0, i32 7
  %1637 = getelementptr inbounds %"class.Maths::TIndex3", ptr %1636, i32 0, i32 0
  %1638 = load i32, ptr %1637, align 4, !tbaa !80
  invoke void @"_ZZN7Riemann15GeometryBoolean7ComputeEvENK3$_2clEi"(ptr noundef nonnull align 8 dereferenceable(24) %119, i32 noundef %1638)
          to label %1639 unwind label %1669

1639:                                             ; preds = %1635
  br label %1673

1640:                                             ; preds = %1566, %1563
  %1641 = landingpad { ptr, i32 }
          cleanup
  %1642 = extractvalue { ptr, i32 } %1641, 0
  store ptr %1642, ptr %5, align 8
  %1643 = extractvalue { ptr, i32 } %1641, 1
  store i32 %1643, ptr %6, align 4
  br label %1680

1644:                                             ; preds = %1567
  %1645 = landingpad { ptr, i32 }
          cleanup
  %1646 = extractvalue { ptr, i32 } %1645, 0
  store ptr %1646, ptr %5, align 8
  %1647 = extractvalue { ptr, i32 } %1645, 1
  store i32 %1647, ptr %6, align 4
  br label %1679

1648:                                             ; preds = %1581, %1576
  %1649 = landingpad { ptr, i32 }
          cleanup
  %1650 = extractvalue { ptr, i32 } %1649, 0
  store ptr %1650, ptr %5, align 8
  %1651 = extractvalue { ptr, i32 } %1649, 1
  store i32 %1651, ptr %6, align 4
  br label %1677

1652:                                             ; preds = %1588, %1586
  %1653 = landingpad { ptr, i32 }
          cleanup
  %1654 = extractvalue { ptr, i32 } %1653, 0
  store ptr %1654, ptr %5, align 8
  %1655 = extractvalue { ptr, i32 } %1653, 1
  store i32 %1655, ptr %6, align 4
  br label %1660

1656:                                             ; preds = %1595, %1593
  %1657 = landingpad { ptr, i32 }
          cleanup
  %1658 = extractvalue { ptr, i32 } %1657, 0
  store ptr %1658, ptr %5, align 8
  %1659 = extractvalue { ptr, i32 } %1657, 1
  store i32 %1659, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %151) #11
  br label %1660

1660:                                             ; preds = %1656, %1652
  call void @llvm.lifetime.end.p0(i64 12, ptr %150) #11
  br label %1677

1661:                                             ; preds = %1602
  %1662 = landingpad { ptr, i32 }
          cleanup
  %1663 = extractvalue { ptr, i32 } %1662, 0
  store ptr %1663, ptr %5, align 8
  %1664 = extractvalue { ptr, i32 } %1662, 1
  store i32 %1664, ptr %6, align 4
  br label %1675

1665:                                             ; preds = %1605
  %1666 = landingpad { ptr, i32 }
          cleanup
  %1667 = extractvalue { ptr, i32 } %1666, 0
  store ptr %1667, ptr %5, align 8
  %1668 = extractvalue { ptr, i32 } %1666, 1
  store i32 %1668, ptr %6, align 4
  br label %1674

1669:                                             ; preds = %1635, %1633, %1627, %1619, %1615, %1608, %1607
  %1670 = landingpad { ptr, i32 }
          cleanup
  %1671 = extractvalue { ptr, i32 } %1670, 0
  store ptr %1671, ptr %5, align 8
  %1672 = extractvalue { ptr, i32 } %1670, 1
  store i32 %1672, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 60, ptr %154) #11
  br label %1674

1673:                                             ; preds = %1639, %1613
  call void @llvm.lifetime.end.p0(i64 60, ptr %154) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %153) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %152) #11
  br label %1676

1674:                                             ; preds = %1669, %1665
  call void @llvm.lifetime.end.p0(i64 4, ptr %153) #11
  br label %1675

1675:                                             ; preds = %1674, %1661
  call void @llvm.lifetime.end.p0(i64 24, ptr %152) #11
  br label %1677

1676:                                             ; preds = %1673, %1600
  call void @llvm.lifetime.end.p0(i64 24, ptr %149) #11
  br label %1678

1677:                                             ; preds = %1675, %1660, %1648
  call void @llvm.lifetime.end.p0(i64 24, ptr %149) #11
  br label %1679

1678:                                             ; preds = %1676, %1570
  call void @llvm.lifetime.end.p0(i64 4, ptr %148) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %147) #11
  br label %1681

1679:                                             ; preds = %1677, %1644
  call void @llvm.lifetime.end.p0(i64 4, ptr %148) #11
  br label %1680

1680:                                             ; preds = %1679, %1640
  call void @llvm.lifetime.end.p0(i64 24, ptr %147) #11
  br label %1687

1681:                                             ; preds = %1678, %1560
  call void @llvm.lifetime.end.p0(i64 4, ptr %132) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr %131) #11
  store i32 0, ptr %25, align 4
  br label %1682

1682:                                             ; preds = %1681, %1444
  call void @llvm.lifetime.end.p0(i64 4, ptr %130) #11
  %1683 = load i32, ptr %25, align 4
  switch i32 %1683, label %2070 [
    i32 0, label %1684
    i32 54, label %1685
  ]

1684:                                             ; preds = %1682
  br label %1685

1685:                                             ; preds = %1684, %1682
  %1686 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %128) #11
  br label %1431

1687:                                             ; preds = %1680, %1559, %1517
  call void @llvm.lifetime.end.p0(i64 4, ptr %132) #11
  br label %1688

1688:                                             ; preds = %1687, %1513
  call void @llvm.lifetime.end.p0(i64 12, ptr %131) #11
  br label %1689

1689:                                             ; preds = %1688, %1445
  call void @llvm.lifetime.end.p0(i64 4, ptr %130) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %129) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %128) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %127) #11
  br label %1751

1690:                                             ; preds = %1433
  call void @llvm.lifetime.start.p0(i64 8, ptr %156) #11
  %1691 = load ptr, ptr %126, align 8, !tbaa !5
  store ptr %1691, ptr %156, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %157) #11
  %1692 = load ptr, ptr %156, align 8, !tbaa !5
  %1693 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %1692) #11
  %1694 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %157, i32 0, i32 0
  store ptr %1693, ptr %1694, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %158) #11
  %1695 = load ptr, ptr %156, align 8, !tbaa !5
  %1696 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %1695) #11
  %1697 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %158, i32 0, i32 0
  store ptr %1696, ptr %1697, align 8
  br label %1698

1698:                                             ; preds = %1736, %1690
  %1699 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiiEES5_(ptr noundef nonnull align 8 dereferenceable(8) %157, ptr noundef nonnull align 8 dereferenceable(8) %158) #11
  br i1 %1699, label %1701, label %1700

1700:                                             ; preds = %1698
  store i32 55, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %158) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %157) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %156) #11
  br label %1747

1701:                                             ; preds = %1698
  call void @llvm.lifetime.start.p0(i64 8, ptr %159) #11
  %1702 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %157) #11
  store ptr %1702, ptr %159, align 8, !tbaa !5
  %1703 = load i32, ptr %108, align 4, !tbaa !35
  %1704 = sext i32 %1703 to i64
  %1705 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 %1704
  %1706 = load ptr, ptr %1705, align 8, !tbaa !5
  %1707 = load ptr, ptr %159, align 8, !tbaa !5
  %1708 = getelementptr inbounds %"struct.std::pair.140", ptr %1707, i32 0, i32 1
  %1709 = load i32, ptr %1708, align 4, !tbaa !75
  call void @llvm.lifetime.start.p0(i64 12, ptr %160) #11
  %1710 = load ptr, ptr %110, align 8, !tbaa !5
  %1711 = load ptr, ptr %159, align 8, !tbaa !5
  %1712 = getelementptr inbounds %"struct.std::pair.140", ptr %1711, i32 0, i32 0
  %1713 = load i32, ptr %1712, align 4, !tbaa !81
  invoke void @_ZNK7Riemann11DynamicMesh9GetVertexEi(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %160, ptr noundef nonnull align 8 dereferenceable(452) %1710, i32 noundef %1713)
          to label %1714 unwind label %1738

1714:                                             ; preds = %1701
  invoke void @_ZN7Riemann11DynamicMesh9SetVertexEiRKN5Maths8TVector3IfEE(ptr noundef nonnull align 8 dereferenceable(452) %1706, i32 noundef %1709, ptr noundef nonnull align 4 dereferenceable(12) %160)
          to label %1715 unwind label %1738

1715:                                             ; preds = %1714
  call void @llvm.lifetime.end.p0(i64 12, ptr %160) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %161) #11
  %1716 = load ptr, ptr %159, align 8, !tbaa !5
  %1717 = getelementptr inbounds %"struct.std::pair.140", ptr %1716, i32 0, i32 0
  %1718 = load i32, ptr %1717, align 4, !tbaa !81
  store i32 %1718, ptr %161, align 4, !tbaa !35
  %1719 = getelementptr inbounds i32, ptr %161, i64 1
  %1720 = load ptr, ptr %159, align 8, !tbaa !5
  %1721 = getelementptr inbounds %"struct.std::pair.140", ptr %1720, i32 0, i32 1
  %1722 = load i32, ptr %1721, align 4, !tbaa !75
  store i32 %1722, ptr %1719, align 4, !tbaa !35
  %1723 = load i32, ptr %108, align 4, !tbaa !35
  %1724 = sub nsw i32 1, %1723
  %1725 = sext i32 %1724 to i64
  %1726 = getelementptr inbounds [2 x i32], ptr %161, i64 0, i64 %1725
  %1727 = load i32, ptr %108, align 4, !tbaa !35
  %1728 = sext i32 %1727 to i64
  %1729 = getelementptr inbounds [2 x i32], ptr %161, i64 0, i64 %1728
  %1730 = invoke { ptr, i8 } @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE7emplaceIJRiS8_EEES2_ISt17_Rb_tree_iteratorIS4_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(48) %105, ptr noundef nonnull align 4 dereferenceable(4) %1726, ptr noundef nonnull align 4 dereferenceable(4) %1729)
          to label %1731 unwind label %1742

1731:                                             ; preds = %1715
  %1732 = getelementptr inbounds { ptr, i8 }, ptr %162, i32 0, i32 0
  %1733 = extractvalue { ptr, i8 } %1730, 0
  store ptr %1733, ptr %1732, align 8
  %1734 = getelementptr inbounds { ptr, i8 }, ptr %162, i32 0, i32 1
  %1735 = extractvalue { ptr, i8 } %1730, 1
  store i8 %1735, ptr %1734, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %161) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %159) #11
  br label %1736

1736:                                             ; preds = %1731
  %1737 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %157) #11
  br label %1698

1738:                                             ; preds = %1714, %1701
  %1739 = landingpad { ptr, i32 }
          cleanup
  %1740 = extractvalue { ptr, i32 } %1739, 0
  store ptr %1740, ptr %5, align 8
  %1741 = extractvalue { ptr, i32 } %1739, 1
  store i32 %1741, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %160) #11
  br label %1746

1742:                                             ; preds = %1715
  %1743 = landingpad { ptr, i32 }
          cleanup
  %1744 = extractvalue { ptr, i32 } %1743, 0
  store ptr %1744, ptr %5, align 8
  %1745 = extractvalue { ptr, i32 } %1743, 1
  store i32 %1745, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %161) #11
  br label %1746

1746:                                             ; preds = %1742, %1738
  call void @llvm.lifetime.end.p0(i64 8, ptr %159) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %158) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %157) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %156) #11
  br label %1751

1747:                                             ; preds = %1700
  call void @llvm.lifetime.end.p0(i64 8, ptr %126) #11
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %125) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %125) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %120) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %119) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %118) #11
  call void @_ZN7Riemann12SparseOctreeD2Ev(ptr noundef nonnull align 8 dereferenceable(268) %117) #11
  call void @llvm.lifetime.end.p0(i64 272, ptr %117) #11
  call void @_ZN7Riemann18SparseSpatialHash3IiED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %111) #11
  call void @llvm.lifetime.end.p0(i64 64, ptr %111) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %110) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %109) #11
  br label %1748

1748:                                             ; preds = %1747
  %1749 = load i32, ptr %108, align 4, !tbaa !35
  %1750 = add nsw i32 %1749, 1
  store i32 %1750, ptr %108, align 4, !tbaa !35
  br label %1316, !llvm.loop !82

1751:                                             ; preds = %1746, %1689
  call void @llvm.lifetime.end.p0(i64 8, ptr %126) #11
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %125) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %125) #11
  br label %1752

1752:                                             ; preds = %1751, %1414
  call void @llvm.lifetime.end.p0(i64 24, ptr %120) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %119) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %118) #11
  call void @_ZN7Riemann12SparseOctreeD2Ev(ptr noundef nonnull align 8 dereferenceable(268) %117) #11
  br label %1753

1753:                                             ; preds = %1752, %1403
  call void @llvm.lifetime.end.p0(i64 272, ptr %117) #11
  br label %1754

1754:                                             ; preds = %1753, %1367
  call void @_ZN7Riemann18SparseSpatialHash3IiED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %111) #11
  br label %1755

1755:                                             ; preds = %1754, %1354
  call void @llvm.lifetime.end.p0(i64 64, ptr %111) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %110) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %109) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %108) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %107) #11
  %1756 = getelementptr inbounds [2 x %"class.std::map"], ptr %106, i32 0, i32 0
  %1757 = getelementptr inbounds %"class.std::map", ptr %1756, i64 2
  br label %1766

1758:                                             ; preds = %1319
  call void @llvm.lifetime.end.p0(i64 4, ptr %107) #11
  %1759 = getelementptr inbounds [2 x %"class.std::map"], ptr %106, i32 0, i32 0
  %1760 = getelementptr inbounds %"class.std::map", ptr %1759, i64 2
  br label %1761

1761:                                             ; preds = %1761, %1758
  %1762 = phi ptr [ %1760, %1758 ], [ %1763, %1761 ]
  %1763 = getelementptr inbounds %"class.std::map", ptr %1762, i64 -1
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1763) #11
  %1764 = icmp eq ptr %1763, %1759
  br i1 %1764, label %1765, label %1761

1765:                                             ; preds = %1761
  call void @llvm.lifetime.end.p0(i64 96, ptr %106) #11
  br label %1771

1766:                                             ; preds = %1766, %1755
  %1767 = phi ptr [ %1757, %1755 ], [ %1768, %1766 ]
  %1768 = getelementptr inbounds %"class.std::map", ptr %1767, i64 -1
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1768) #11
  %1769 = icmp eq ptr %1768, %1756
  br i1 %1769, label %1770, label %1766

1770:                                             ; preds = %1766
  call void @llvm.lifetime.end.p0(i64 96, ptr %106) #11
  br label %2014

1771:                                             ; preds = %1765, %1300
  call void @llvm.lifetime.start.p0(i64 1, ptr %163) #11
  store i8 1, ptr %163, align 1, !tbaa !38
  %1772 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 3
  %1773 = load i8, ptr %1772, align 1, !tbaa !83, !range !45, !noundef !46
  %1774 = trunc i8 %1773 to i1
  br i1 %1774, label %1775, label %1784

1775:                                             ; preds = %1771
  %1776 = load i32, ptr %21, align 4, !tbaa !35
  %1777 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 0
  %1778 = getelementptr inbounds [2 x %"class.std::vector"], ptr %51, i64 0, i64 0
  invoke void @_ZN7Riemann21SimplifyAlongNewEdgesEiPPNS_11DynamicMeshEPSt6vectorIiSaIiEERSt3mapIiiSt4lessIiESaISt4pairIKiiEEEPNS_15GeometryBooleanE(i32 noundef %1776, ptr noundef %1777, ptr noundef %1778, ptr noundef nonnull align 8 dereferenceable(48) %105, ptr noundef %184)
          to label %1779 unwind label %1780

1779:                                             ; preds = %1775
  br label %1784

1780:                                             ; preds = %1995, %1954, %1775
  %1781 = landingpad { ptr, i32 }
          cleanup
  %1782 = extractvalue { ptr, i32 } %1781, 0
  store ptr %1782, ptr %5, align 8
  %1783 = extractvalue { ptr, i32 } %1781, 1
  store i32 %1783, ptr %6, align 4
  br label %2013

1784:                                             ; preds = %1779, %1771
  %1785 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 0
  %1786 = load i32, ptr %1785, align 8, !tbaa !57
  %1787 = icmp eq i32 %1786, 1
  br i1 %1787, label %1788, label %1823

1788:                                             ; preds = %1784
  call void @llvm.lifetime.start.p0(i64 24, ptr %164) #11
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %164) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %165) #11
  store i32 0, ptr %165, align 4, !tbaa !35
  br label %1789

1789:                                             ; preds = %1810, %1788
  %1790 = load i32, ptr %165, align 4, !tbaa !35
  %1791 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 1
  %1792 = load ptr, ptr %1791, align 8, !tbaa !5
  %1793 = invoke noundef i32 @_ZNK7Riemann11DynamicMesh16GetTriangleCountEv(ptr noundef nonnull align 8 dereferenceable(452) %1792)
          to label %1794 unwind label %1797

1794:                                             ; preds = %1789
  %1795 = icmp slt i32 %1790, %1793
  br i1 %1795, label %1801, label %1796

1796:                                             ; preds = %1794
  store i32 57, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %165) #11
  br label %1813

1797:                                             ; preds = %1808, %1801, %1789
  %1798 = landingpad { ptr, i32 }
          cleanup
  %1799 = extractvalue { ptr, i32 } %1798, 0
  store ptr %1799, ptr %5, align 8
  %1800 = extractvalue { ptr, i32 } %1798, 1
  store i32 %1800, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %165) #11
  br label %1822

1801:                                             ; preds = %1794
  %1802 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 1
  %1803 = load ptr, ptr %1802, align 8, !tbaa !5
  %1804 = load i32, ptr %165, align 4, !tbaa !35
  %1805 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsTriangleFastEi(ptr noundef nonnull align 8 dereferenceable(452) %1803, i32 noundef %1804)
          to label %1806 unwind label %1797

1806:                                             ; preds = %1801
  br i1 %1805, label %1808, label %1807

1807:                                             ; preds = %1806
  br label %1810

1808:                                             ; preds = %1806
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %164, ptr noundef nonnull align 4 dereferenceable(4) %165)
          to label %1809 unwind label %1797

1809:                                             ; preds = %1808
  br label %1810

1810:                                             ; preds = %1809, %1807
  %1811 = load i32, ptr %165, align 4, !tbaa !35
  %1812 = add nsw i32 %1811, 1
  store i32 %1812, ptr %165, align 4, !tbaa !35
  br label %1789, !llvm.loop !84

1813:                                             ; preds = %1796
  call void @llvm.lifetime.start.p0(i64 8, ptr %166) #11
  %1814 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 1
  %1815 = load ptr, ptr %1814, align 8, !tbaa !5
  invoke void @_ZN7Riemann18FDynamicMeshEditorC2EPNS_11DynamicMeshE(ptr noundef nonnull align 8 dereferenceable(8) %166, ptr noundef %1815)
          to label %1816 unwind label %1818

1816:                                             ; preds = %1813
  invoke void @_ZN7Riemann18FDynamicMeshEditor27ReverseTriangleOrientationsERKSt6vectorIiSaIiEEb(ptr noundef nonnull align 8 dereferenceable(8) %166, ptr noundef nonnull align 8 dereferenceable(24) %164, i1 noundef zeroext true)
          to label %1817 unwind label %1818

1817:                                             ; preds = %1816
  call void @llvm.lifetime.end.p0(i64 8, ptr %166) #11
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %164) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %164) #11
  br label %1823

1818:                                             ; preds = %1816, %1813
  %1819 = landingpad { ptr, i32 }
          cleanup
  %1820 = extractvalue { ptr, i32 } %1819, 0
  store ptr %1820, ptr %5, align 8
  %1821 = extractvalue { ptr, i32 } %1819, 1
  store i32 %1821, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %166) #11
  br label %1822

1822:                                             ; preds = %1818, %1797
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %164) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %164) #11
  br label %2013

1823:                                             ; preds = %1817, %1784
  %1824 = load i32, ptr %21, align 4, !tbaa !35
  %1825 = icmp sgt i32 %1824, 1
  br i1 %1825, label %1826, label %1954

1826:                                             ; preds = %1823
  call void @llvm.lifetime.start.p0(i64 8, ptr %167) #11
  %1827 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 18
  %1828 = load ptr, ptr %1827, align 8, !tbaa !9
  invoke void @_ZN7Riemann18FDynamicMeshEditorC2EPNS_11DynamicMeshE(ptr noundef nonnull align 8 dereferenceable(8) %167, ptr noundef %1828)
          to label %1829 unwind label %1843

1829:                                             ; preds = %1826
  call void @llvm.lifetime.start.p0(i64 464, ptr %168) #11
  invoke void @_ZN7Riemann18FMeshIndexMappingsC2Ev(ptr noundef nonnull align 8 dereferenceable(464) %168)
          to label %1830 unwind label %1847

1830:                                             ; preds = %1829
  %1831 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 1
  %1832 = load ptr, ptr %1831, align 8, !tbaa !5
  call void @_ZNSt8functionIFN5Maths8TVector3IfEEiRKS2_EEC2EDn(ptr noundef nonnull align 8 dereferenceable(32) %169, ptr null) #11
  call void @_ZNSt8functionIFN5Maths8TVector3IfEEiRKS2_EEC2EDn(ptr noundef nonnull align 8 dereferenceable(32) %170, ptr null) #11
  invoke void @_ZN7Riemann18FDynamicMeshEditor10AppendMeshEPKNS_11DynamicMeshERNS_18FMeshIndexMappingsESt8functionIFN5Maths8TVector3IfEEiRKS9_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %167, ptr noundef %1832, ptr noundef nonnull align 8 dereferenceable(464) %168, ptr noundef %169, ptr noundef %170)
          to label %1833 unwind label %1851

1833:                                             ; preds = %1830
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %170) #11
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %169) #11
  %1834 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 22
  %1835 = load i8, ptr %1834, align 8, !tbaa !85, !range !45, !noundef !46
  %1836 = trunc i8 %1835 to i1
  br i1 %1836, label %1837, label %1859

1837:                                             ; preds = %1833
  %1838 = invoke noundef nonnull align 8 dereferenceable(98) ptr @_ZN7Riemann18FMeshIndexMappings11GetGroupMapEv(ptr noundef nonnull align 8 dereferenceable(464) %168)
          to label %1839 unwind label %1855

1839:                                             ; preds = %1837
  %1840 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 24
  %1841 = invoke noundef nonnull align 8 dereferenceable(98) ptr @_ZN7Riemann10FIndexMapiaSERKS0_(ptr noundef nonnull align 8 dereferenceable(98) %1840, ptr noundef nonnull align 8 dereferenceable(98) %1838)
          to label %1842 unwind label %1855

1842:                                             ; preds = %1839
  br label %1859

1843:                                             ; preds = %1826
  %1844 = landingpad { ptr, i32 }
          cleanup
  %1845 = extractvalue { ptr, i32 } %1844, 0
  store ptr %1845, ptr %5, align 8
  %1846 = extractvalue { ptr, i32 } %1844, 1
  store i32 %1846, ptr %6, align 4
  br label %1953

1847:                                             ; preds = %1829
  %1848 = landingpad { ptr, i32 }
          cleanup
  %1849 = extractvalue { ptr, i32 } %1848, 0
  store ptr %1849, ptr %5, align 8
  %1850 = extractvalue { ptr, i32 } %1848, 1
  store i32 %1850, ptr %6, align 4
  br label %1952

1851:                                             ; preds = %1830
  %1852 = landingpad { ptr, i32 }
          cleanup
  %1853 = extractvalue { ptr, i32 } %1852, 0
  store ptr %1853, ptr %5, align 8
  %1854 = extractvalue { ptr, i32 } %1852, 1
  store i32 %1854, ptr %6, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %170) #11
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %169) #11
  br label %1951

1855:                                             ; preds = %1881, %1839, %1837
  %1856 = landingpad { ptr, i32 }
          cleanup
  %1857 = extractvalue { ptr, i32 } %1856, 0
  store ptr %1857, ptr %5, align 8
  %1858 = extractvalue { ptr, i32 } %1856, 1
  store i32 %1858, ptr %6, align 4
  br label %1951

1859:                                             ; preds = %1842, %1833
  %1860 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 4
  %1861 = load i8, ptr %1860, align 2, !tbaa !86, !range !45, !noundef !46
  %1862 = trunc i8 %1861 to i1
  br i1 %1862, label %1863, label %1881

1863:                                             ; preds = %1859
  call void @llvm.lifetime.start.p0(i64 1, ptr %171) #11
  %1864 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 0
  %1865 = getelementptr inbounds [2 x %"class.std::vector"], ptr %51, i64 0, i64 0
  %1866 = invoke noundef zeroext i1 @_ZN7Riemann10MergeEdgesERKNS_18FMeshIndexMappingsEPPNS_11DynamicMeshEPKSt6vectorIiSaIiEERKSt3mapIiiSt4lessIiESaISt4pairIKiiEEEPNS_15GeometryBooleanE(ptr noundef nonnull align 8 dereferenceable(464) %168, ptr noundef %1864, ptr noundef %1865, ptr noundef nonnull align 8 dereferenceable(48) %105, ptr noundef %184)
          to label %1867 unwind label %1877

1867:                                             ; preds = %1863
  %1868 = zext i1 %1866 to i8
  store i8 %1868, ptr %171, align 1, !tbaa !38
  %1869 = load i8, ptr %163, align 1, !tbaa !38, !range !45, !noundef !46
  %1870 = trunc i8 %1869 to i1
  br i1 %1870, label %1871, label %1874

1871:                                             ; preds = %1867
  %1872 = load i8, ptr %171, align 1, !tbaa !38, !range !45, !noundef !46
  %1873 = trunc i8 %1872 to i1
  br label %1874

1874:                                             ; preds = %1871, %1867
  %1875 = phi i1 [ false, %1867 ], [ %1873, %1871 ]
  %1876 = zext i1 %1875 to i8
  store i8 %1876, ptr %163, align 1, !tbaa !38
  call void @llvm.lifetime.end.p0(i64 1, ptr %171) #11
  br label %1950

1877:                                             ; preds = %1863
  %1878 = landingpad { ptr, i32 }
          cleanup
  %1879 = extractvalue { ptr, i32 } %1878, 0
  store ptr %1879, ptr %5, align 8
  %1880 = extractvalue { ptr, i32 } %1878, 1
  store i32 %1880, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %171) #11
  br label %1951

1881:                                             ; preds = %1859
  %1882 = getelementptr inbounds [2 x %"class.std::vector"], ptr %51, i64 0, i64 0
  %1883 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 20
  %1884 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %1883, ptr noundef nonnull align 8 dereferenceable(24) %1882)
          to label %1885 unwind label %1855

1885:                                             ; preds = %1881
  call void @llvm.lifetime.start.p0(i64 8, ptr %172) #11
  %1886 = getelementptr inbounds [2 x %"class.std::vector"], ptr %51, i64 0, i64 1
  store ptr %1886, ptr %172, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %173) #11
  %1887 = load ptr, ptr %172, align 8, !tbaa !5
  %1888 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1887) #11
  %1889 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.57", ptr %173, i32 0, i32 0
  store ptr %1888, ptr %1889, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %174) #11
  %1890 = load ptr, ptr %172, align 8, !tbaa !5
  %1891 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1890) #11
  %1892 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.57", ptr %174, i32 0, i32 0
  store ptr %1891, ptr %1892, align 8
  br label %1893

1893:                                             ; preds = %1945, %1885
  %1894 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %173, ptr noundef nonnull align 8 dereferenceable(8) %174) #11
  br i1 %1894, label %1896, label %1895

1895:                                             ; preds = %1893
  store i32 60, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %174) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %173) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %172) #11
  br label %1949

1896:                                             ; preds = %1893
  call void @llvm.lifetime.start.p0(i64 4, ptr %175) #11
  %1897 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %173) #11
  %1898 = load i32, ptr %1897, align 4, !tbaa !35
  store i32 %1898, ptr %175, align 4, !tbaa !35
  %1899 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 1
  %1900 = load ptr, ptr %1899, align 8, !tbaa !5
  %1901 = load i32, ptr %175, align 4, !tbaa !35
  %1902 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %1900, i32 noundef %1901)
          to label %1903 unwind label %1905

1903:                                             ; preds = %1896
  br i1 %1902, label %1909, label %1904

1904:                                             ; preds = %1903
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 2628, ptr noundef @__PRETTY_FUNCTION__._ZN7Riemann15GeometryBoolean7ComputeEv) #14
  unreachable

1905:                                             ; preds = %1896
  %1906 = landingpad { ptr, i32 }
          cleanup
  %1907 = extractvalue { ptr, i32 } %1906, 0
  store ptr %1907, ptr %5, align 8
  %1908 = extractvalue { ptr, i32 } %1906, 1
  store i32 %1908, ptr %6, align 4
  br label %1948

1909:                                             ; preds = %1903
  call void @llvm.lifetime.start.p0(i64 8, ptr %176) #11
  %1910 = getelementptr inbounds [2 x ptr], ptr %7, i64 0, i64 1
  %1911 = load ptr, ptr %1910, align 8, !tbaa !5
  %1912 = load i32, ptr %175, align 4, !tbaa !35
  invoke void @_ZNK7Riemann11DynamicMesh8GetEdgeVEi(ptr dead_on_unwind writable sret(%"class.Maths::TIndex2") align 4 %176, ptr noundef nonnull align 8 dereferenceable(452) %1911, i32 noundef %1912)
          to label %1913 unwind label %1933

1913:                                             ; preds = %1909
  call void @llvm.lifetime.start.p0(i64 4, ptr %177) #11
  %1914 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 18
  %1915 = load ptr, ptr %1914, align 8, !tbaa !9
  %1916 = getelementptr inbounds %"class.Maths::TIndex2", ptr %176, i32 0, i32 0
  %1917 = load i32, ptr %1916, align 4, !tbaa !51
  %1918 = invoke noundef i32 @_ZNK7Riemann18FMeshIndexMappings12GetNewVertexEi(ptr noundef nonnull align 8 dereferenceable(464) %168, i32 noundef %1917)
          to label %1919 unwind label %1937

1919:                                             ; preds = %1913
  %1920 = getelementptr inbounds %"class.Maths::TIndex2", ptr %176, i32 0, i32 1
  %1921 = load i32, ptr %1920, align 4, !tbaa !49
  %1922 = invoke noundef i32 @_ZNK7Riemann18FMeshIndexMappings12GetNewVertexEi(ptr noundef nonnull align 8 dereferenceable(464) %168, i32 noundef %1921)
          to label %1923 unwind label %1937

1923:                                             ; preds = %1919
  %1924 = invoke noundef i32 @_ZNK7Riemann11DynamicMesh8FindEdgeEii(ptr noundef nonnull align 8 dereferenceable(452) %1915, i32 noundef %1918, i32 noundef %1922)
          to label %1925 unwind label %1937

1925:                                             ; preds = %1923
  store i32 %1924, ptr %177, align 4, !tbaa !35
  %1926 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 18
  %1927 = load ptr, ptr %1926, align 8, !tbaa !9
  %1928 = load i32, ptr %177, align 4, !tbaa !35
  %1929 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsBoundaryEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %1927, i32 noundef %1928)
          to label %1930 unwind label %1937

1930:                                             ; preds = %1925
  br i1 %1929, label %1931, label %1932

1931:                                             ; preds = %1930
  br label %1942

1932:                                             ; preds = %1930
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 2633, ptr noundef @__PRETTY_FUNCTION__._ZN7Riemann15GeometryBoolean7ComputeEv) #14
  unreachable

1933:                                             ; preds = %1909
  %1934 = landingpad { ptr, i32 }
          cleanup
  %1935 = extractvalue { ptr, i32 } %1934, 0
  store ptr %1935, ptr %5, align 8
  %1936 = extractvalue { ptr, i32 } %1934, 1
  store i32 %1936, ptr %6, align 4
  br label %1947

1937:                                             ; preds = %1942, %1925, %1923, %1919, %1913
  %1938 = landingpad { ptr, i32 }
          cleanup
  %1939 = extractvalue { ptr, i32 } %1938, 0
  store ptr %1939, ptr %5, align 8
  %1940 = extractvalue { ptr, i32 } %1938, 1
  store i32 %1940, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %177) #11
  br label %1947

1941:                                             ; No predecessors!
  br label %1942

1942:                                             ; preds = %1941, %1931
  %1943 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 20
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %1943, ptr noundef nonnull align 4 dereferenceable(4) %177)
          to label %1944 unwind label %1937

1944:                                             ; preds = %1942
  call void @llvm.lifetime.end.p0(i64 4, ptr %177) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %176) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %175) #11
  br label %1945

1945:                                             ; preds = %1944
  %1946 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %173) #11
  br label %1893

1947:                                             ; preds = %1937, %1933
  call void @llvm.lifetime.end.p0(i64 8, ptr %176) #11
  br label %1948

1948:                                             ; preds = %1947, %1905
  call void @llvm.lifetime.end.p0(i64 4, ptr %175) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %174) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %173) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %172) #11
  br label %1951

1949:                                             ; preds = %1895
  br label %1950

1950:                                             ; preds = %1949, %1874
  call void @_ZN7Riemann18FMeshIndexMappingsD2Ev(ptr noundef nonnull align 8 dereferenceable(464) %168) #11
  call void @llvm.lifetime.end.p0(i64 464, ptr %168) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %167) #11
  br label %1959

1951:                                             ; preds = %1948, %1877, %1855, %1851
  call void @_ZN7Riemann18FMeshIndexMappingsD2Ev(ptr noundef nonnull align 8 dereferenceable(464) %168) #11
  br label %1952

1952:                                             ; preds = %1951, %1847
  call void @llvm.lifetime.end.p0(i64 464, ptr %168) #11
  br label %1953

1953:                                             ; preds = %1952, %1843
  call void @llvm.lifetime.end.p0(i64 8, ptr %167) #11
  br label %2013

1954:                                             ; preds = %1823
  %1955 = getelementptr inbounds [2 x %"class.std::vector"], ptr %51, i64 0, i64 0
  %1956 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 20
  %1957 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %1956, ptr noundef nonnull align 8 dereferenceable(24) %1955)
          to label %1958 unwind label %1780

1958:                                             ; preds = %1954
  br label %1959

1959:                                             ; preds = %1958, %1950
  %1960 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 5
  %1961 = load i8, ptr %1960, align 1, !tbaa !87, !range !45, !noundef !46
  %1962 = trunc i8 %1961 to i1
  br i1 %1962, label %1963, label %1991

1963:                                             ; preds = %1959
  call void @llvm.lifetime.start.p0(i64 8, ptr %178) #11
  %1964 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 20
  store ptr %1964, ptr %178, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %179) #11
  %1965 = load ptr, ptr %178, align 8, !tbaa !5
  %1966 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1965) #11
  %1967 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.57", ptr %179, i32 0, i32 0
  store ptr %1966, ptr %1967, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %180) #11
  %1968 = load ptr, ptr %178, align 8, !tbaa !5
  %1969 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1968) #11
  %1970 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.57", ptr %180, i32 0, i32 0
  store ptr %1969, ptr %1970, align 8
  br label %1971

1971:                                             ; preds = %1984, %1963
  %1972 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %179, ptr noundef nonnull align 8 dereferenceable(8) %180) #11
  br i1 %1972, label %1974, label %1973

1973:                                             ; preds = %1971
  store i32 62, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %180) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %179) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %178) #11
  br label %1990

1974:                                             ; preds = %1971
  call void @llvm.lifetime.start.p0(i64 4, ptr %181) #11
  %1975 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %179) #11
  %1976 = load i32, ptr %1975, align 4, !tbaa !35
  store i32 %1976, ptr %181, align 4, !tbaa !35
  %1977 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 21
  %1978 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %1977, ptr noundef nonnull align 4 dereferenceable(4) %181)
          to label %1979 unwind label %1986

1979:                                             ; preds = %1974
  %1980 = getelementptr inbounds { ptr, i8 }, ptr %182, i32 0, i32 0
  %1981 = extractvalue { ptr, i8 } %1978, 0
  store ptr %1981, ptr %1980, align 8
  %1982 = getelementptr inbounds { ptr, i8 }, ptr %182, i32 0, i32 1
  %1983 = extractvalue { ptr, i8 } %1978, 1
  store i8 %1983, ptr %1982, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %181) #11
  br label %1984

1984:                                             ; preds = %1979
  %1985 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %179) #11
  br label %1971

1986:                                             ; preds = %1974
  %1987 = landingpad { ptr, i32 }
          cleanup
  %1988 = extractvalue { ptr, i32 } %1987, 0
  store ptr %1988, ptr %5, align 8
  %1989 = extractvalue { ptr, i32 } %1987, 1
  store i32 %1989, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %181) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %180) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %179) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %178) #11
  br label %2013

1990:                                             ; preds = %1973
  br label %1991

1991:                                             ; preds = %1990, %1959
  %1992 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 6
  %1993 = load i8, ptr %1992, align 4, !tbaa !88, !range !45, !noundef !46
  %1994 = trunc i8 %1993 to i1
  br i1 %1994, label %1995, label %2008

1995:                                             ; preds = %1991
  %1996 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 18
  %1997 = load ptr, ptr %1996, align 8, !tbaa !9
  %1998 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 19
  invoke void @_ZN7Riemann11DynamicMesh14ApplyTransformERKN5Maths9TransformEb(ptr noundef nonnull align 8 dereferenceable(452) %1997, ptr noundef nonnull align 4 dereferenceable(28) %1998, i1 noundef zeroext false)
          to label %1999 unwind label %1780

1999:                                             ; preds = %1995
  call void @llvm.lifetime.start.p0(i64 28, ptr %183) #11
  invoke void @_ZN5Maths9Transform8IdentityEv(ptr dead_on_unwind writable sret(%"struct.Maths::Transform") align 4 %183)
          to label %2000 unwind label %2004

2000:                                             ; preds = %1999
  %2001 = getelementptr inbounds %"class.Riemann::GeometryBoolean", ptr %184, i32 0, i32 19
  %2002 = invoke noundef nonnull align 4 dereferenceable(28) ptr @_ZN5Maths9TransformaSERKS0_(ptr noundef nonnull align 4 dereferenceable(28) %2001, ptr noundef nonnull align 4 dereferenceable(28) %183)
          to label %2003 unwind label %2004

2003:                                             ; preds = %2000
  call void @llvm.lifetime.end.p0(i64 28, ptr %183) #11
  br label %2008

2004:                                             ; preds = %2000, %1999
  %2005 = landingpad { ptr, i32 }
          cleanup
  %2006 = extractvalue { ptr, i32 } %2005, 0
  store ptr %2006, ptr %5, align 8
  %2007 = extractvalue { ptr, i32 } %2005, 1
  store i32 %2007, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 28, ptr %183) #11
  br label %2013

2008:                                             ; preds = %2003, %1991
  %2009 = load i8, ptr %163, align 1, !tbaa !38, !range !45, !noundef !46
  %2010 = trunc i8 %2009 to i1
  store i1 %2010, ptr %2, align 1
  store i32 1, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %163) #11
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %105) #11
  call void @llvm.lifetime.end.p0(i64 48, ptr %105) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #11
  %2011 = getelementptr inbounds [2 x %"class.std::set"], ptr %52, i32 0, i32 0
  %2012 = getelementptr inbounds %"class.std::set", ptr %2011, i64 2
  br label %2018

2013:                                             ; preds = %2004, %1986, %1953, %1822, %1780
  call void @llvm.lifetime.end.p0(i64 1, ptr %163) #11
  br label %2014

2014:                                             ; preds = %2013, %1770
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %105) #11
  call void @llvm.lifetime.end.p0(i64 48, ptr %105) #11
  br label %2015

2015:                                             ; preds = %2014, %1327
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #11
  %2016 = getelementptr inbounds [2 x %"class.std::set"], ptr %52, i32 0, i32 0
  %2017 = getelementptr inbounds %"class.std::set", ptr %2016, i64 2
  br label %2025

2018:                                             ; preds = %2018, %2008
  %2019 = phi ptr [ %2012, %2008 ], [ %2020, %2018 ]
  %2020 = getelementptr inbounds %"class.std::set", ptr %2019, i64 -1
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2020) #11
  %2021 = icmp eq ptr %2020, %2011
  br i1 %2021, label %2022, label %2018

2022:                                             ; preds = %2018
  call void @llvm.lifetime.end.p0(i64 96, ptr %52) #11
  %2023 = getelementptr inbounds [2 x %"class.std::vector"], ptr %51, i32 0, i32 0
  %2024 = getelementptr inbounds %"class.std::vector", ptr %2023, i64 2
  br label %2032

2025:                                             ; preds = %2025, %2015
  %2026 = phi ptr [ %2017, %2015 ], [ %2027, %2025 ]
  %2027 = getelementptr inbounds %"class.std::set", ptr %2026, i64 -1
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2027) #11
  %2028 = icmp eq ptr %2027, %2016
  br i1 %2028, label %2029, label %2025

2029:                                             ; preds = %2025
  call void @llvm.lifetime.end.p0(i64 96, ptr %52) #11
  %2030 = getelementptr inbounds [2 x %"class.std::vector"], ptr %51, i32 0, i32 0
  %2031 = getelementptr inbounds %"class.std::vector", ptr %2030, i64 2
  br label %2039

2032:                                             ; preds = %2032, %2022
  %2033 = phi ptr [ %2024, %2022 ], [ %2034, %2032 ]
  %2034 = getelementptr inbounds %"class.std::vector", ptr %2033, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2034) #11
  %2035 = icmp eq ptr %2034, %2023
  br i1 %2035, label %2036, label %2032

2036:                                             ; preds = %2032
  call void @llvm.lifetime.end.p0(i64 48, ptr %51) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #11
  call void @_ZN7Riemann11GeometryCutD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %20) #11
  call void @llvm.lifetime.end.p0(i64 120, ptr %20) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #11
  call void @_ZN7Riemann24IntersectionsQueryResultD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %18) #11
  call void @llvm.lifetime.end.p0(i64 72, ptr %18) #11
  %2037 = getelementptr inbounds [2 x %"class.Riemann::DynamicMeshAABBTree"], ptr %16, i32 0, i32 0
  %2038 = getelementptr inbounds %"class.Riemann::DynamicMeshAABBTree", ptr %2037, i64 2
  br label %2050

2039:                                             ; preds = %2039, %2029
  %2040 = phi ptr [ %2031, %2029 ], [ %2041, %2039 ]
  %2041 = getelementptr inbounds %"class.std::vector", ptr %2040, i64 -1
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2041) #11
  %2042 = icmp eq ptr %2041, %2030
  br i1 %2042, label %2043, label %2039

2043:                                             ; preds = %2039
  call void @llvm.lifetime.end.p0(i64 48, ptr %51) #11
  br label %2044

2044:                                             ; preds = %2043, %658
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #11
  br label %2045

2045:                                             ; preds = %2044, %343
  call void @_ZN7Riemann11GeometryCutD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %20) #11
  br label %2046

2046:                                             ; preds = %2045, %339
  call void @llvm.lifetime.end.p0(i64 120, ptr %20) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #11
  call void @_ZN7Riemann24IntersectionsQueryResultD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %18) #11
  br label %2047

2047:                                             ; preds = %2046, %335
  call void @llvm.lifetime.end.p0(i64 72, ptr %18) #11
  %2048 = getelementptr inbounds [2 x %"class.Riemann::DynamicMeshAABBTree"], ptr %16, i32 0, i32 0
  %2049 = getelementptr inbounds %"class.Riemann::DynamicMeshAABBTree", ptr %2048, i64 2
  br label %2056

2050:                                             ; preds = %2050, %2036
  %2051 = phi ptr [ %2038, %2036 ], [ %2052, %2050 ]
  %2052 = getelementptr inbounds %"class.Riemann::DynamicMeshAABBTree", ptr %2051, i64 -1
  call void @_ZN7Riemann19DynamicMeshAABBTreeD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %2052) #11
  %2053 = icmp eq ptr %2052, %2037
  br i1 %2053, label %2054, label %2050

2054:                                             ; preds = %2050
  call void @llvm.lifetime.end.p0(i64 176, ptr %16) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #11
  call void @_ZN7Riemann11DynamicMeshD1Ev(ptr noundef nonnull align 8 dereferenceable(452) %4) #11
  call void @llvm.lifetime.end.p0(i64 456, ptr %4) #11
  %2055 = load i1, ptr %2, align 1
  ret i1 %2055

2056:                                             ; preds = %2056, %2047
  %2057 = phi ptr [ %2049, %2047 ], [ %2058, %2056 ]
  %2058 = getelementptr inbounds %"class.Riemann::DynamicMeshAABBTree", ptr %2057, i64 -1
  call void @_ZN7Riemann19DynamicMeshAABBTreeD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %2058) #11
  %2059 = icmp eq ptr %2058, %2048
  br i1 %2059, label %2060, label %2056

2060:                                             ; preds = %2056
  br label %2061

2061:                                             ; preds = %2060, %334
  call void @llvm.lifetime.end.p0(i64 176, ptr %16) #11
  br label %2062

2062:                                             ; preds = %2061, %320, %274, %242
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #11
  br label %2063

2063:                                             ; preds = %2062, %238
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #11
  br label %2064

2064:                                             ; preds = %2063, %234, %230
  call void @_ZN7Riemann11DynamicMeshD1Ev(ptr noundef nonnull align 8 dereferenceable(452) %4) #11
  call void @llvm.lifetime.end.p0(i64 456, ptr %4) #11
  br label %2065

2065:                                             ; preds = %2064
  %2066 = load ptr, ptr %5, align 8
  %2067 = load i32, ptr %6, align 4
  %2068 = insertvalue { ptr, i32 } poison, ptr %2066, 0
  %2069 = insertvalue { ptr, i32 } %2068, i32 %2067, 1
  resume { ptr, i32 } %2069

2070:                                             ; preds = %1682, %1218, %1002, %641
  unreachable
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7Riemann11DynamicMeshC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(452), ptr noundef nonnull align 8 dereferenceable(452)) unnamed_addr #3 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #8

declare void @_ZN7Riemann11DynamicMeshC1Ev(ptr noundef nonnull align 8 dereferenceable(452)) unnamed_addr #7

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #9

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(452) ptr @_ZN7Riemann11DynamicMeshaSERKS0_(ptr noundef nonnull align 8 dereferenceable(452), ptr noundef nonnull align 8 dereferenceable(452)) #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths9TransformC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(28), ptr noundef nonnull align 4 dereferenceable(28)) unnamed_addr #0 align 2

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

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

declare void @_ZN7Riemann11DynamicMesh14ApplyTransformERKN5Maths9TransformEb(ptr noundef nonnull align 8 dereferenceable(452), ptr noundef nonnull align 4 dereferenceable(28), i1 noundef zeroext) #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths9TransformC2ERKNS_8TVector3IfEE(ptr noundef nonnull align 4 dereferenceable(28), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #0 align 2

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

declare void @_ZN7Riemann19DynamicMeshAABBTreeC1EPNS_11DynamicMeshE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef) unnamed_addr #7

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

declare void @_ZNK7Riemann19DynamicMeshAABBTree20FindAllIntersectionsERKS0_PKN5Maths9TransformE(ptr dead_on_unwind writable sret(%"struct.Riemann::IntersectionsQueryResult") align 8, ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(88), ptr noundef) #7

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Riemann11GeometryCut7ComputeERKNS_24IntersectionsQueryResultE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(72)) #0 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann11DynamicMesh13HasAttributesEv(ptr noundef nonnull align 8 dereferenceable(452)) #2 align 2

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

declare noundef zeroext i1 @_ZNK7Riemann23DynamicMeshAttributeSet12IsSeamVertexEib(ptr noundef nonnull align 8 dereferenceable(168), i32 noundef, i1 noundef zeroext) #7

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE6resizeEmRKi(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann16TFastWindingTreeC2EPNS_19DynamicMeshAABBTreeE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i1 noundef zeroext) #0 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Riemann11DynamicMesh12GetTriNormalEi(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 8 dereferenceable(452), i32 noundef) #0 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 hidden void @"_ZNSt8functionIFbiEEC2IZN7Riemann15GeometryBoolean7ComputeEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann13FQueryOptionsC2EfSt8functionIFbiEE(ptr noundef nonnull align 8 dereferenceable(40), float noundef, ptr noundef) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann11DynamicMesh10IsTriangleEi(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann9Triangle3C2Ev(ptr noundef nonnull align 4 dereferenceable(36)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Riemann11DynamicMesh14GetTriVerticesEiRN5Maths8TVector3IfEES4_S4_(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #0 align 2

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

declare noundef i32 @_ZNK7Riemann19DynamicMeshAABBTree19FindNearestTriangleERKN5Maths8TVector3IfEERfRKNS_13FQueryOptionsE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(40)) #7

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5Maths8TVector3IfE6IsZeroEv(ptr noundef nonnull align 4 dereferenceable(12)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN7Riemann16TFastWindingTree17FastWindingNumberERKN5Maths8TVector3IfEE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 4 dereferenceable(12)) #0 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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsTriangleFastEi(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann11DynamicMesh10IsEdgeFastEi(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referenceeqERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

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

declare noundef i32 @_ZN7Riemann11DynamicMesh14RemoveTriangleEibb(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef, i1 noundef zeroext, i1 noundef zeroext) #7

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNK5Maths6TAABB3IfE6MaxDimEv(ptr noundef nonnull align 4 dereferenceable(24)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann18SparseSpatialHash3IiEC2Efi(ptr noundef nonnull align 8 dereferenceable(64), float noundef, i32 noundef) unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann18SparseSpatialHash3IiE6InsertERKN5Maths8TVector3IfEERKi(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

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

declare void @_ZN7Riemann12SparseOctreeC1ERKN5Maths8TVector3IfEES5_i(ptr noundef nonnull align 8 dereferenceable(268), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), i32 noundef) unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZZN7Riemann15GeometryBoolean7ComputeEvENK3$_2clEi"(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Riemann18SparseSpatialHash3IiE11FindNearestERKN5Maths8TVector3IfEEfRi(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(12), float noundef, ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE4findERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiiEES5_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE7emplaceIJRiS8_EEES2_ISt17_Rb_tree_iteratorIS4_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths6TAABB3IfEC2ERKNS_8TVector3IfEEf(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12), float noundef) unnamed_addr #0 align 2

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

declare void @_ZNK7Riemann12SparseOctree10RangeQueryERKN5Maths6TAABB3IfEERSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(268), ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #7

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN7RiemannL15FindNearestEdgeERKNS_11DynamicMeshERKSt6vectorIiSaIiEERKN5Maths8TVector3IfEE(ptr noundef nonnull align 8 dereferenceable(452), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann8Segment3C2ERKN5Maths8TVector3IfEES5_(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNK7Riemann8Segment316ProjectUnitRangeERKN5Maths8TVector3IfEE(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7Riemann14FEdgeSplitInfoC2Ev(ptr noundef nonnull align 4 dereferenceable(60)) unnamed_addr #3 align 2

declare noundef i32 @_ZN7Riemann11DynamicMesh9SplitEdgeEiRNS_14FEdgeSplitInfoEf(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef, ptr noundef nonnull align 4 dereferenceable(60), float noundef) #7

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZZN7Riemann15GeometryBoolean7ComputeEvENK3$_3clEi"(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #3 align 2

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

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

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

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

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

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

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

declare void @_ZN7Riemann18FDynamicMeshEditor27ReverseTriangleOrientationsERKSt6vectorIiSaIiEEb(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7Riemann18FMeshIndexMappingsC2Ev(ptr noundef nonnull align 8 dereferenceable(464)) unnamed_addr #3 align 2

declare void @_ZN7Riemann18FDynamicMeshEditor10AppendMeshEPKNS_11DynamicMeshERNS_18FMeshIndexMappingsESt8functionIFN5Maths8TVector3IfEEiRKS9_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef nonnull align 8 dereferenceable(464), ptr noundef, ptr noundef) #7

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(98) ptr @_ZN7Riemann10FIndexMapiaSERKS0_(ptr noundef nonnull align 8 dereferenceable(98), ptr noundef nonnull align 8 dereferenceable(98)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths9Transform8IdentityEv(ptr dead_on_unwind noalias writable sret(%"struct.Maths::Transform") align 4) #0 align 2

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

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

; Function Attrs: nounwind
declare void @_ZN7Riemann11DynamicMeshD1Ev(ptr noundef nonnull align 8 dereferenceable(452)) unnamed_addr #10

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 120}
!10 = !{!"_ZTSN7Riemann15GeometryBooleanE", !11, i64 0, !12, i64 4, !13, i64 8, !13, i64 9, !13, i64 10, !13, i64 11, !13, i64 12, !12, i64 16, !12, i64 20, !13, i64 24, !13, i64 25, !13, i64 26, !12, i64 28, !13, i64 32, !12, i64 36, !14, i64 40, !7, i64 48, !7, i64 64, !6, i64 120, !15, i64 128, !18, i64 160, !22, i64 184, !13, i64 232, !31, i64 240}
!11 = !{!"_ZTSN7Riemann15GeometryBoolean9BooleanOpE", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN5Maths9TransformE", !16, i64 0, !17, i64 12}
!16 = !{!"_ZTSN5Maths8TVector3IfEE", !12, i64 0, !12, i64 4, !12, i64 8}
!17 = !{!"_ZTSN5Maths10QuaternionE", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!18 = !{!"_ZTSSt6vectorIiSaIiEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTSSt3setIiSt4lessIiESaIiEE", !23, i64 0}
!23 = !{!"_ZTSSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE", !24, i64 0}
!24 = !{!"_ZTSNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE13_Rb_tree_implIS3_Lb1EEE", !25, i64 0, !27, i64 8}
!25 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !26, i64 0}
!26 = !{!"_ZTSSt4lessIiE"}
!27 = !{!"_ZTSSt15_Rb_tree_header", !28, i64 0, !30, i64 32}
!28 = !{!"_ZTSSt18_Rb_tree_node_base", !29, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!29 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!30 = !{!"long", !7, i64 0}
!31 = !{!"_ZTSN7Riemann10FIndexMapiE", !32, i64 0, !32, i64 48, !13, i64 96, !13, i64 97}
!32 = !{!"_ZTSSt3mapIiiSt4lessIiESaISt4pairIKiiEEE", !33, i64 0}
!33 = !{!"_ZTSSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE", !34, i64 0}
!34 = !{!"_ZTSNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE13_Rb_tree_implIS6_Lb1EEE", !25, i64 0, !27, i64 8}
!35 = !{!14, !14, i64 0}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{!13, !13, i64 0}
!39 = !{!10, !12, i64 4}
!40 = !{!41, !12, i64 16}
!41 = !{!"_ZTSN7Riemann11GeometryCutE", !7, i64 0, !12, i64 16, !13, i64 20, !13, i64 21, !7, i64 24, !7, i64 72}
!42 = !{!41, !13, i64 20}
!43 = !{!12, !12, i64 0}
!44 = !{!10, !13, i64 8}
!45 = !{i8 0, i8 2}
!46 = !{}
!47 = distinct !{!47, !37}
!48 = distinct !{!48, !37}
!49 = !{!50, !14, i64 4}
!50 = !{!"_ZTSN5Maths7TIndex2IiEE", !14, i64 0, !14, i64 4}
!51 = !{!50, !14, i64 0}
!52 = !{!53, !53, i64 0}
!53 = !{!"_ZTSN7Riemann11EMeshResultE", !7, i64 0}
!54 = distinct !{!54, !37}
!55 = distinct !{!55, !37}
!56 = distinct !{!56, !37}
!57 = !{!10, !11, i64 0}
!58 = !{!59, !6, i64 0}
!59 = !{!"_ZTSN7Riemann19DynamicMeshAABBTreeE", !6, i64 0, !18, i64 8, !60, i64 32, !18, i64 56, !14, i64 80, !14, i64 84}
!60 = !{!"_ZTSSt6vectorIN5Maths6TAABB3IfEESaIS2_EE", !61, i64 0}
!61 = !{!"_ZTSSt12_Vector_baseIN5Maths6TAABB3IfEESaIS2_EE", !62, i64 0}
!62 = !{!"_ZTSNSt12_Vector_baseIN5Maths6TAABB3IfEESaIS2_EE12_Vector_implE", !63, i64 0}
!63 = !{!"_ZTSNSt12_Vector_baseIN5Maths6TAABB3IfEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!64 = !{!30, !30, i64 0}
!65 = distinct !{!65, !37}
!66 = distinct !{!66, !37}
!67 = distinct !{!67, !37}
!68 = distinct !{!68, !37}
!69 = distinct !{!69, !37}
!70 = distinct !{!70, !37}
!71 = distinct !{!71, !37}
!72 = distinct !{!72, !37}
!73 = distinct !{!73, !37}
!74 = !{i64 0, i64 8, !5}
!75 = !{!76, !14, i64 4}
!76 = !{!"_ZTSSt4pairIKiiE", !14, i64 0, !14, i64 4}
!77 = !{!78, !14, i64 32}
!78 = !{!"_ZTSN7Riemann14FEdgeSplitInfoE", !14, i64 0, !50, i64 4, !50, i64 12, !50, i64 20, !13, i64 28, !14, i64 32, !50, i64 36, !79, i64 44, !12, i64 56}
!79 = !{!"_ZTSN5Maths7TIndex3IiEE", !14, i64 0, !14, i64 4, !14, i64 8}
!80 = !{!78, !14, i64 44}
!81 = !{!76, !14, i64 0}
!82 = distinct !{!82, !37}
!83 = !{!10, !13, i64 9}
!84 = distinct !{!84, !37}
!85 = !{!10, !13, i64 232}
!86 = !{!10, !13, i64 10}
!87 = !{!10, !13, i64 11}
!88 = !{!10, !13, i64 12}


; 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::TIndex2" = type { i32, i32 }
%"class.Maths::TVector3" = type { float, float, float }
%"class.Riemann::DynamicMesh" = type <{ %"class.std::vector.7", %"class.std::vector.7", %"class.std::vector.7", %"class.std::vector.12", %"class.std::vector.17", %"class.Riemann::ListSet", %"class.std::vector.32", %"class.std::vector.32", %"class.std::vector.17", %"class.std::vector", i32, [4 x i8], %"class.std::vector.37", %"class.std::vector.17", ptr, %"class.Maths::TAABB3", %"struct.Maths::Transform", [4 x i8], i64, %"class.std::__cxx11::basic_string", i8, i8, i8, i8, [4 x i8] }>
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = 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 }
%"class.std::vector.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = type { %"struct.std::_Vector_base<Maths::TVector2<float>, std::allocator<Maths::TVector2<float>>>::_Vector_impl" }
%"struct.std::_Vector_base<Maths::TVector2<float>, std::allocator<Maths::TVector2<float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Maths::TVector2<float>, std::allocator<Maths::TVector2<float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Maths::TVector2<float>, std::allocator<Maths::TVector2<float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Riemann::ListSet" = type { %"class.std::vector.22", %"class.std::vector.27", %"class.std::vector" }
%"class.std::vector.22" = type { %"struct.std::_Vector_base.23" }
%"struct.std::_Vector_base.23" = type { %"struct.std::_Vector_base<Riemann::ListSet<int>::Header, std::allocator<Riemann::ListSet<int>::Header>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::ListSet<int>::Header, std::allocator<Riemann::ListSet<int>::Header>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::ListSet<int>::Header, std::allocator<Riemann::ListSet<int>::Header>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::ListSet<int>::Header, std::allocator<Riemann::ListSet<int>::Header>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.27" = type { %"struct.std::_Vector_base.28" }
%"struct.std::_Vector_base.28" = type { %"struct.std::_Vector_base<Riemann::ListSet<int>::Block, std::allocator<Riemann::ListSet<int>::Block>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::ListSet<int>::Block, std::allocator<Riemann::ListSet<int>::Block>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::ListSet<int>::Block, std::allocator<Riemann::ListSet<int>::Block>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::ListSet<int>::Block, std::allocator<Riemann::ListSet<int>::Block>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.32" = type { %"struct.std::_Vector_base.33" }
%"struct.std::_Vector_base.33" = type { %"struct.std::_Vector_base<Maths::TIndex3<int>, std::allocator<Maths::TIndex3<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<Maths::TIndex3<int>, std::allocator<Maths::TIndex3<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Maths::TIndex3<int>, std::allocator<Maths::TIndex3<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Maths::TIndex3<int>, std::allocator<Maths::TIndex3<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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::vector.37" = type { %"struct.std::_Vector_base.38" }
%"struct.std::_Vector_base.38" = type { %"struct.std::_Vector_base<Riemann::DynamicMesh::Edge, std::allocator<Riemann::DynamicMesh::Edge>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::DynamicMesh::Edge, std::allocator<Riemann::DynamicMesh::Edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::DynamicMesh::Edge, std::allocator<Riemann::DynamicMesh::Edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::DynamicMesh::Edge, std::allocator<Riemann::DynamicMesh::Edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Maths::TAABB3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3" }
%"struct.Maths::Transform" = type { %"class.Maths::TVector3", %"class.Maths::Quaternion" }
%"class.Maths::Quaternion" = type { float, float, float, float }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.Riemann::DynamicMeshAABBTree" = type { ptr, %"class.std::vector", %"class.std::vector.60", %"class.std::vector", i32, i32 }
%"class.std::vector.60" = type { %"struct.std::_Vector_base.61" }
%"struct.std::_Vector_base.61" = 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 }
%"struct.Riemann::IntersectionsQueryResult" = type { %"class.std::vector.65", %"class.std::vector.70", %"class.std::vector.75" }
%"class.std::vector.65" = type { %"struct.std::_Vector_base.66" }
%"struct.std::_Vector_base.66" = type { %"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::PointIntersection, std::allocator<Riemann::IntersectionsQueryResult::PointIntersection>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::PointIntersection, std::allocator<Riemann::IntersectionsQueryResult::PointIntersection>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::PointIntersection, std::allocator<Riemann::IntersectionsQueryResult::PointIntersection>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::PointIntersection, std::allocator<Riemann::IntersectionsQueryResult::PointIntersection>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.70" = type { %"struct.std::_Vector_base.71" }
%"struct.std::_Vector_base.71" = type { %"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::SegmentIntersection, std::allocator<Riemann::IntersectionsQueryResult::SegmentIntersection>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::SegmentIntersection, std::allocator<Riemann::IntersectionsQueryResult::SegmentIntersection>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::SegmentIntersection, std::allocator<Riemann::IntersectionsQueryResult::SegmentIntersection>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::SegmentIntersection, std::allocator<Riemann::IntersectionsQueryResult::SegmentIntersection>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.75" = type { %"struct.std::_Vector_base.76" }
%"struct.std::_Vector_base.76" = type { %"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::PolygonIntersection, std::allocator<Riemann::IntersectionsQueryResult::PolygonIntersection>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::PolygonIntersection, std::allocator<Riemann::IntersectionsQueryResult::PolygonIntersection>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::PolygonIntersection, std::allocator<Riemann::IntersectionsQueryResult::PolygonIntersection>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::IntersectionsQueryResult::PolygonIntersection, std::allocator<Riemann::IntersectionsQueryResult::PolygonIntersection>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Riemann::GeometryCut" = type { [2 x ptr], float, i8, i8, [2 x %"class.std::vector"], [2 x %"class.std::vector"] }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_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 }
%"struct.Riemann::FEdgeCollapseInfo" = type { i32, i32, %"class.Maths::TIndex2", i8, i32, %"class.Maths::TIndex2", %"class.Maths::TIndex2", %"class.Maths::TIndex2", float }
%"class.std::vector.106" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.Riemann::TFastWindingTree" = type { ptr, %"class.std::map.110", float, i32, i64 }
%"class.std::map.110" = type { %"class.std::_Rb_tree.111" }
%"class.std::_Rb_tree.111" = type { %"struct.std::_Rb_tree<int, std::pair<const int, Riemann::TFastWindingTree::FWNInfo>, std::_Select1st<std::pair<const int, Riemann::TFastWindingTree::FWNInfo>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, Riemann::TFastWindingTree::FWNInfo>, std::_Select1st<std::pair<const int, Riemann::TFastWindingTree::FWNInfo>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::allocator.9" = type { i8 }
%"struct.Riemann::FQueryOptions" = type { float, %"class.std::function" }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.115 = type { ptr }
%"class.Riemann::Triangle3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3" }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.std::map" = type { %"class.std::_Rb_tree.3" }
%"class.std::_Rb_tree.3" = type { %"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.Riemann::SparseSpatialHash3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.std::vector.116" }
%"class.std::vector.116" = type { %"struct.std::_Vector_base.117" }
%"struct.std::_Vector_base.117" = type { %"struct.std::_Vector_base<std::vector<Riemann::SparseSpatialHash3<int>::Element>, std::allocator<std::vector<Riemann::SparseSpatialHash3<int>::Element>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<Riemann::SparseSpatialHash3<int>::Element>, std::allocator<std::vector<Riemann::SparseSpatialHash3<int>::Element>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<Riemann::SparseSpatialHash3<int>::Element>, std::allocator<std::vector<Riemann::SparseSpatialHash3<int>::Element>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<Riemann::SparseSpatialHash3<int>::Element>, std::allocator<std::vector<Riemann::SparseSpatialHash3<int>::Element>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.Riemann::SparseOctree" = type <{ %"class.std::vector.121", %"class.Riemann::SparseGrid3", %"class.Riemann::ListSet", %"class.std::set", %"class.std::unordered_map", %"class.Maths::TVector3", float, i32, [4 x i8] }>
%"class.std::vector.121" = type { %"struct.std::_Vector_base.122" }
%"struct.std::_Vector_base.122" = type { %"struct.std::_Vector_base<Riemann::SparseOctree::Cell, std::allocator<Riemann::SparseOctree::Cell>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::SparseOctree::Cell, std::allocator<Riemann::SparseOctree::Cell>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::SparseOctree::Cell, std::allocator<Riemann::SparseOctree::Cell>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::SparseOctree::Cell, std::allocator<Riemann::SparseOctree::Cell>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Riemann::SparseGrid3" = type { %"class.std::map.126" }
%"class.std::map.126" = type { %"class.std::_Rb_tree.127" }
%"class.std::_Rb_tree.127" = type { %"struct.std::_Rb_tree<Maths::TVector3<int>, std::pair<const Maths::TVector3<int>, int>, std::_Select1st<std::pair<const Maths::TVector3<int>, int>>, std::less<Maths::TVector3<int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<Maths::TVector3<int>, std::pair<const Maths::TVector3<int>, int>, std::_Select1st<std::pair<const Maths::TVector3<int>, int>>, std::less<Maths::TVector3<int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%class.anon.138 = type { ptr, ptr, %class.anon.137 }
%class.anon.137 = type { ptr }
%class.anon.139 = type { ptr, ptr, %class.anon.137 }
%"class.__gnu_cxx::__normal_iterator.57" = type { ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"class.Riemann::Segment3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3" }
%"struct.Riemann::FEdgeSplitInfo" = type { i32, %"class.Maths::TIndex2", %"class.Maths::TIndex2", %"class.Maths::TIndex2", i8, i32, %"class.Maths::TIndex2", %"class.Maths::TIndex3", float }
%"class.Maths::TIndex3" = type { i32, i32, i32 }
%"class.Riemann::FDynamicMeshEditor" = type { ptr }
%"class.Riemann::FMeshIndexMappings" = type { %"struct.Riemann::FIndexMapi", %"struct.Riemann::FIndexMapi", %"struct.Riemann::FIndexMapi", %"struct.Riemann::FIndexMapi", %"class.std::vector.45", %"class.std::vector.45" }
%"struct.Riemann::FIndexMapi" = type <{ %"class.std::map", %"class.std::map", i8, i8, [6 x i8] }>
%"class.std::vector.45" = type { %"struct.std::_Vector_base.46" }
%"struct.std::_Vector_base.46" = type { %"struct.std::_Vector_base<Riemann::FIndexMapi, std::allocator<Riemann::FIndexMapi>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::FIndexMapi, std::allocator<Riemann::FIndexMapi>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::FIndexMapi, std::allocator<Riemann::FIndexMapi>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::FIndexMapi, std::allocator<Riemann::FIndexMapi>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::function.145" = type { %"class.std::_Function_base", ptr }

@.str.1 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@__PRETTY_FUNCTION__._ZN7Riemann15GeometryBoolean7ComputeEv = external hidden unnamed_addr constant [41 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [34 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Riemann10MergeEdgesERKNS_18FMeshIndexMappingsEPPNS_11DynamicMeshEPKSt6vectorIiSaIiEERKSt3mapIiiSt4lessIiESaISt4pairIKiiEEEPNS_15GeometryBooleanE(ptr noundef nonnull align 8 dereferenceable(464), ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(48), ptr noundef) 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 noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef) local_unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK7Riemann11DynamicMesh8GetEdgeVEi(ptr dead_on_unwind noalias writable sret(%"class.Maths::TIndex2") align 4, ptr noundef nonnull align 8 dereferenceable(452), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK7Riemann11DynamicMesh8FindEdgeEii(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK7Riemann18FMeshIndexMappings12GetNewVertexEi(ptr noundef nonnull align 8 dereferenceable(464), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsBoundaryEdgeEi(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK7Riemann11DynamicMesh8GetEdgeVEiRN5Maths8TVector3IfEES4_(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef, 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(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #4 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann21SimplifyAlongNewEdgesEiPPNS_11DynamicMeshEPSt6vectorIiSaIiEERSt3mapIiiSt4lessIiESaISt4pairIKiiEEEPNS_15GeometryBooleanE(i32 noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(48), ptr noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt3setIiSt4lessIiESaIiEEC2IN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiS2_EEEEET_SB_(ptr noundef nonnull align 8 dereferenceable(48), ptr, ptr) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7Riemann11DynamicMesh16GetTriangleCountEv(ptr noundef nonnull align 8 dereferenceable(452)) local_unnamed_addr #4 align 2

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7Riemann17FEdgeCollapseInfoC2Ev(ptr noundef nonnull align 4 dereferenceable(52)) unnamed_addr #3 align 2

declare noundef i32 @_ZN7Riemann11DynamicMesh12CollapseEdgeEiifRNS_17FEdgeCollapseInfoE(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef, i32 noundef, float noundef, ptr noundef nonnull align 4 dereferenceable(52)) local_unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Riemann15GeometryBoolean7ComputeEv(ptr noundef nonnull align 8 dereferenceable(344) %0) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.Riemann::DynamicMesh", align 8
  %3 = alloca [2 x ptr], align 16
  %4 = alloca %"class.Maths::TAABB3", align 4
  %5 = alloca %"class.Maths::TAABB3", align 4
  %6 = alloca %"struct.Maths::Transform", align 4
  %7 = alloca %"class.Maths::TVector3", align 4
  %8 = alloca %"class.Maths::TVector3", align 4
  %9 = alloca %"struct.Maths::Transform", align 4
  %10 = alloca %"class.Maths::TVector3", align 4
  %11 = alloca [2 x %"class.Riemann::DynamicMeshAABBTree"], align 16
  %12 = alloca %"struct.Riemann::IntersectionsQueryResult", align 8
  %13 = alloca %"class.Riemann::GeometryCut", align 8
  %14 = alloca %"class.std::vector", align 8
  %15 = alloca %"class.Maths::TVector3", align 4
  %16 = alloca %"class.Maths::TVector3", align 4
  %17 = alloca %"class.Maths::TVector3", align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::set", align 8
  %20 = alloca %"class.Maths::TVector3", align 4
  %21 = alloca %"class.Maths::TVector3", align 4
  %22 = alloca %"class.Maths::TVector3", align 4
  %23 = alloca %"class.Maths::TIndex2", align 4
  %24 = alloca %"struct.Riemann::FEdgeCollapseInfo", align 4
  %25 = alloca i32, align 4
  %26 = alloca [2 x %"class.std::vector"], align 16
  %27 = alloca [2 x %"class.std::set"], align 16
  %28 = alloca [2 x %"class.std::vector.106"], align 16
  %29 = alloca %"class.std::vector", align 8
  %30 = alloca i32, align 4
  %31 = alloca %"class.Riemann::TFastWindingTree", align 8
  %32 = alloca %"class.std::vector.7", align 8
  %33 = alloca %"class.std::allocator.9", align 1
  %34 = alloca %"class.Maths::TVector3", align 4
  %35 = alloca %"struct.Riemann::FQueryOptions", align 8
  %36 = alloca %"class.std::function", align 8
  %37 = alloca %class.anon.115, align 8
  %38 = alloca %"class.Riemann::Triangle3", align 4
  %39 = alloca %"class.Maths::TVector3", align 4
  %40 = alloca float, align 4
  %41 = alloca %"class.Maths::TVector3", align 4
  %42 = alloca %"class.Maths::TVector3", align 4
  %43 = alloca %"struct.Riemann::FQueryOptions", align 8
  %44 = alloca %"class.std::function", align 8
  %45 = alloca %"struct.std::_Bit_reference", align 8
  %46 = alloca %"struct.std::_Bit_reference", align 8
  %47 = alloca %"struct.std::_Bit_reference", align 8
  %48 = alloca %"struct.std::_Bit_reference", align 8
  %49 = alloca %"struct.std::_Bit_reference", align 8
  %50 = alloca i32, align 4
  %51 = alloca %"struct.std::_Bit_reference", align 8
  %52 = alloca %"struct.std::_Bit_reference", align 8
  %53 = alloca %"struct.std::_Bit_reference", align 8
  %54 = alloca %"class.std::map", align 8
  %55 = alloca [2 x %"class.std::map"], align 16
  %56 = alloca %"class.Riemann::SparseSpatialHash3", align 8
  %57 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %58 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %59 = alloca i32, align 4
  %60 = alloca %"class.Maths::TVector3", align 4
  %61 = alloca %"class.Riemann::SparseOctree", align 8
  %62 = alloca %class.anon.138, align 8
  %63 = alloca %class.anon.139, align 8
  %64 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %65 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %66 = alloca %"class.std::vector", align 8
  %67 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %68 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %69 = alloca i32, align 4
  %70 = alloca %"class.Maths::TVector3", align 4
  %71 = alloca i32, align 4
  %72 = alloca %"class.Maths::TVector3", align 4
  %73 = alloca %"class.Maths::TVector3", align 4
  %74 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %75 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %76 = alloca %"class.Maths::TVector3", align 4
  %77 = alloca %"class.Maths::TVector3", align 4
  %78 = alloca %"class.Maths::TVector3", align 4
  %79 = alloca %"class.Maths::TVector3", align 4
  %80 = alloca %"class.Maths::TAABB3", align 4
  %81 = alloca [2 x %"class.Maths::TVector3"], align 16
  %82 = alloca %"class.Maths::TVector3", align 4
  %83 = alloca %"class.Maths::TVector3", align 4
  %84 = alloca %"class.Riemann::Segment3", align 4
  %85 = alloca %"struct.Riemann::FEdgeSplitInfo", align 4
  %86 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %87 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %88 = alloca %"class.Maths::TVector3", align 4
  %89 = alloca [2 x i32], align 8
  %90 = alloca %"class.std::vector", align 8
  %91 = alloca i32, align 4
  %92 = alloca %"class.Riemann::FDynamicMeshEditor", align 8
  %93 = alloca %"class.Riemann::FDynamicMeshEditor", align 8
  %94 = alloca %"class.Riemann::FMeshIndexMappings", align 8
  %95 = alloca %"class.std::function.145", align 8
  %96 = alloca %"class.std::function.145", align 8
  %97 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %98 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %99 = alloca %"class.Maths::TIndex2", align 4
  %100 = alloca i32, align 4
  %101 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %102 = alloca %"class.__gnu_cxx::__normal_iterator.57", align 8
  %103 = alloca i32, align 4
  %104 = alloca %"struct.Maths::Transform", align 4
  call void @llvm.lifetime.start.p0(i64 456, ptr nonnull %2) #10
  %105 = getelementptr inbounds i8, ptr %0, i64 48
  %106 = getelementptr inbounds i8, ptr %0, i64 56
  %107 = load ptr, ptr %106, align 8, !tbaa !5
  call void @_ZN7Riemann11DynamicMeshC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(452) %2, ptr noundef nonnull align 8 dereferenceable(452) %107)
  %indvars.iv591.sroa.gep604 = getelementptr inbounds i8, ptr %89, i64 4
  %indvars.iv591.sroa.gep607 = getelementptr inbounds i8, ptr %55, i64 48
  %indvars.iv555.sroa.gep608 = getelementptr inbounds i8, ptr %28, i64 40
  %indvars.iv591.sroa.gep611 = getelementptr inbounds i8, ptr %27, i64 48
  %indvars.iv547.sroa.gep612 = getelementptr inbounds i8, ptr %3, i64 8
  %indvars.iv547.sroa.gep615 = getelementptr inbounds i8, ptr %3, i64 8
  %indvars.iv555.sroa.gep618 = getelementptr inbounds i8, ptr %3, i64 8
  %indvars.iv591.sroa.gep621 = getelementptr inbounds i8, ptr %3, i64 8
  %indvars.iv591.sroa.gep624 = getelementptr inbounds i8, ptr %3, i64 8
  %108 = invoke noalias noundef nonnull dereferenceable(456) ptr @_Znwm(i64 noundef 456) #11
          to label %109 unwind label %127

109:                                              ; preds = %1
  invoke void @_ZN7Riemann11DynamicMeshC1Ev(ptr noundef nonnull align 8 dereferenceable(452) %108)
          to label %110 unwind label %129

110:                                              ; preds = %109
  %111 = getelementptr inbounds i8, ptr %0, i64 120
  store ptr %108, ptr %111, align 8, !tbaa !9
  %112 = load ptr, ptr %105, align 8, !tbaa !5
  %113 = invoke noundef nonnull align 8 dereferenceable(452) ptr @_ZN7Riemann11DynamicMeshaSERKS0_(ptr noundef nonnull align 8 dereferenceable(452) %108, ptr noundef nonnull align 8 dereferenceable(452) %112)
          to label %114 unwind label %127

114:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #10
  %115 = load ptr, ptr %111, align 8, !tbaa !9
  store ptr %115, ptr %3, align 16, !tbaa !5
  %116 = getelementptr inbounds i8, ptr %3, i64 8
  store ptr %2, ptr %116, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #10
  %117 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNK7Riemann11DynamicMesh9GetBoundsEv(ptr noundef nonnull align 8 dereferenceable(452) %115)
  %118 = getelementptr inbounds i8, ptr %0, i64 64
  %119 = getelementptr inbounds i8, ptr %0, i64 76
  invoke void @_ZN5Maths6TAABB3IfE9TransformERKS1_RKNS_8TVector3IfEERKNS_10QuaternionE(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TAABB3") align 4 %4, ptr noundef nonnull align 4 dereferenceable(24) %117, ptr noundef nonnull align 4 dereferenceable(12) %118, ptr noundef nonnull align 4 dereferenceable(16) %119)
          to label %120 unwind label %131

120:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #10
  %121 = load ptr, ptr %116, align 8, !tbaa !5
  %122 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNK7Riemann11DynamicMesh9GetBoundsEv(ptr noundef nonnull align 8 dereferenceable(452) %121)
  %123 = getelementptr inbounds i8, ptr %0, i64 92
  %124 = getelementptr inbounds i8, ptr %0, i64 104
  invoke void @_ZN5Maths6TAABB3IfE9TransformERKS1_RKNS_8TVector3IfEERKNS_10QuaternionE(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TAABB3") align 4 %5, ptr noundef nonnull align 4 dereferenceable(24) %122, ptr noundef nonnull align 4 dereferenceable(12) %123, ptr noundef nonnull align 4 dereferenceable(16) %124)
          to label %125 unwind label %133

125:                                              ; preds = %120
  %126 = invoke noundef nonnull align 4 dereferenceable(24) ptr @_ZN5Maths6TAABB3IfE11EncapsulateERKS1_(ptr noundef nonnull align 4 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(24) %5)
          to label %.preheader479.preheader unwind label %133

.preheader479.preheader:                          ; preds = %125
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %6) #10
  invoke void @_ZN5Maths9TransformC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(28) %6, ptr noundef nonnull align 4 dereferenceable(28) %118)
          to label %135 unwind label %147

127:                                              ; preds = %110, %1
  %128 = landingpad { ptr, i32 }
          cleanup
  br label %966

129:                                              ; preds = %109
  %130 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %108, i64 noundef 456) #12
  br label %966

131:                                              ; preds = %114
  %132 = landingpad { ptr, i32 }
          cleanup
  br label %965

133:                                              ; preds = %125, %120
  %134 = landingpad { ptr, i32 }
          cleanup
  br label %964

135:                                              ; preds = %.preheader479.preheader
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #10
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #10
  invoke void @_ZNK5Maths6TAABB3IfE9GetCenterEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %8, ptr noundef nonnull align 4 dereferenceable(24) %4)
          to label %136 unwind label %149

136:                                              ; preds = %135
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %7, ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(12) %8)
          to label %137 unwind label %149

137:                                              ; preds = %136
  %138 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(12) %7)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #10
  %139 = load ptr, ptr %3, align 16, !tbaa !5
  invoke void @_ZN7Riemann11DynamicMesh14ApplyTransformERKN5Maths9TransformEb(ptr noundef nonnull align 8 dereferenceable(452) %139, ptr noundef nonnull align 4 dereferenceable(28) %6, i1 noundef zeroext true)
          to label %.preheader479.1 unwind label %147

.preheader479.1:                                  ; preds = %137
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %6) #10
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %6) #10
  %140 = getelementptr inbounds i8, ptr %0, i64 92
  invoke void @_ZN5Maths9TransformC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(28) %6, ptr noundef nonnull align 4 dereferenceable(28) %140)
          to label %141 unwind label %147

141:                                              ; preds = %.preheader479.1
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #10
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #10
  invoke void @_ZNK5Maths6TAABB3IfE9GetCenterEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %8, ptr noundef nonnull align 4 dereferenceable(24) %4)
          to label %142 unwind label %149

142:                                              ; preds = %141
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %7, ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(12) %8)
          to label %143 unwind label %149

143:                                              ; preds = %142
  %144 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(12) %7)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #10
  %145 = load ptr, ptr %116, align 8, !tbaa !5
  invoke void @_ZN7Riemann11DynamicMesh14ApplyTransformERKN5Maths9TransformEb(ptr noundef nonnull align 8 dereferenceable(452) %145, ptr noundef nonnull align 4 dereferenceable(28) %6, i1 noundef zeroext true)
          to label %146 unwind label %147

146:                                              ; preds = %143
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %6) #10
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %9) #10
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #10
  invoke void @_ZNK5Maths6TAABB3IfE9GetCenterEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %10, ptr noundef nonnull align 4 dereferenceable(24) %4)
          to label %152 unwind label %183

147:                                              ; preds = %143, %.preheader479.1, %137, %.preheader479.preheader
  %148 = landingpad { ptr, i32 }
          cleanup
  br label %151

149:                                              ; preds = %142, %141, %136, %135
  %150 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #10
  br label %151

151:                                              ; preds = %149, %147
  %.pn456 = phi { ptr, i32 } [ %148, %147 ], [ %150, %149 ]
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %6) #10
  br label %964

152:                                              ; preds = %146
  invoke void @_ZN5Maths9TransformC2ERKNS_8TVector3IfEE(ptr noundef nonnull align 4 dereferenceable(28) %9, ptr noundef nonnull align 4 dereferenceable(12) %10)
          to label %153 unwind label %183

153:                                              ; preds = %152
  %154 = getelementptr inbounds i8, ptr %0, i64 128
  %155 = invoke noundef nonnull align 4 dereferenceable(28) ptr @_ZN5Maths9TransformaSERKS0_(ptr noundef nonnull align 4 dereferenceable(28) %154, ptr noundef nonnull align 4 dereferenceable(28) %9)
          to label %156 unwind label %183

156:                                              ; preds = %153
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %9) #10
  call void @llvm.lifetime.start.p0(i64 176, ptr nonnull %11) #10
  %157 = load ptr, ptr %3, align 16, !tbaa !5
  invoke void @_ZN7Riemann19DynamicMeshAABBTreeC1EPNS_11DynamicMeshE(ptr noundef nonnull align 8 dereferenceable(88) %11, ptr noundef %157)
          to label %159 unwind label %.thread

.thread:                                          ; preds = %156
  %158 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

159:                                              ; preds = %156
  %160 = getelementptr inbounds i8, ptr %11, i64 88
  %161 = load ptr, ptr %116, align 8, !tbaa !5
  invoke void @_ZN7Riemann19DynamicMeshAABBTreeC1EPNS_11DynamicMeshE(ptr noundef nonnull align 8 dereferenceable(88) %160, ptr noundef %161)
          to label %162 unwind label %.loopexit.loopexit541

162:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %12) #10
  invoke void @_ZNK7Riemann19DynamicMeshAABBTree20FindAllIntersectionsERKS0_PKN5Maths9TransformE(ptr dead_on_unwind nonnull writable sret(%"struct.Riemann::IntersectionsQueryResult") align 8 %12, ptr noundef nonnull align 8 dereferenceable(88) %11, ptr noundef nonnull align 8 dereferenceable(88) %160, ptr noundef null)
          to label %163 unwind label %186

163:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %13) #10
  %164 = load ptr, ptr %3, align 16, !tbaa !5
  %165 = load ptr, ptr %116, align 8, !tbaa !5
  call void @_ZN7Riemann11GeometryCutC2EPNS_11DynamicMeshES2_(ptr noundef nonnull align 8 dereferenceable(120) %13, ptr noundef %164, ptr noundef %165)
  %166 = getelementptr inbounds i8, ptr %0, i64 4
  %167 = load float, ptr %166, align 4, !tbaa !35
  %168 = getelementptr inbounds i8, ptr %13, i64 16
  store float %167, ptr %168, align 8, !tbaa !36
  %169 = getelementptr inbounds i8, ptr %13, i64 20
  store i8 1, ptr %169, align 4, !tbaa !38
  %170 = invoke noundef zeroext i1 @_ZN7Riemann11GeometryCut7ComputeERKNS_24IntersectionsQueryResultE(ptr noundef nonnull align 8 dereferenceable(120) %13, ptr noundef nonnull align 8 dereferenceable(72) %12)
          to label %171 unwind label %188

171:                                              ; preds = %163
  %172 = getelementptr inbounds i8, ptr %0, i64 8
  %173 = load i8, ptr %172, align 8, !tbaa !39, !range !40, !noundef !41
  %174 = trunc nuw i8 %173 to i1
  br i1 %174, label %175, label %.loopexit477

175:                                              ; preds = %171
  %176 = load float, ptr %166, align 4, !tbaa !35
  %177 = fmul float %176, 2.250000e+00
  %178 = fmul float %176, %177
  %179 = getelementptr inbounds i8, ptr %13, i64 24
  %180 = getelementptr inbounds i8, ptr %23, i64 4
  %181 = getelementptr inbounds i8, ptr %24, i64 32
  %182 = getelementptr inbounds i8, ptr %24, i64 40
  br label %190

183:                                              ; preds = %153, %152, %146
  %184 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %9) #10
  br label %964

.loopexit.loopexit541:                            ; preds = %159
  %185 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7Riemann19DynamicMeshAABBTreeD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %11) #10
  br label %.loopexit

186:                                              ; preds = %162
  %187 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.loopexit

188:                                              ; preds = %163
  %189 = landingpad { ptr, i32 }
          cleanup
  br label %962

190:                                              ; preds = %175, %._crit_edge490
  %191 = phi i1 [ true, %175 ], [ false, %._crit_edge490 ]
  %indvars.iv547.sroa.phi = phi ptr [ %3, %175 ], [ %indvars.iv547.sroa.gep612, %._crit_edge490 ]
  %indvars.iv547.sroa.phi613 = phi ptr [ %3, %175 ], [ %indvars.iv547.sroa.gep615, %._crit_edge490 ]
  %indvars.iv547 = phi i64 [ 0, %175 ], [ 1, %._crit_edge490 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #10
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #10
  %192 = getelementptr inbounds [2 x %"class.std::vector"], ptr %179, i64 0, i64 %indvars.iv547
  %193 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %192) #10
  %.not537 = icmp eq i64 %193, 0
  br i1 %.not537, label %._crit_edge, label %.lr.ph486

.loopexit475:                                     ; preds = %232, %.lr.ph486
  %194 = sext i32 %204 to i64
  %195 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %192) #10
  %196 = icmp ugt i64 %195, %194
  br i1 %196, label %.lr.ph486, label %._crit_edge, !llvm.loop !42

._crit_edge:                                      ; preds = %.loopexit475, %190
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %19) #10
  %197 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #10
  %198 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #10
  invoke void @_ZNSt3setIiSt4lessIiESaIiEEC2IN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiS2_EEEEET_SB_(ptr noundef nonnull align 8 dereferenceable(48) %19, ptr %197, ptr %198)
          to label %.preheader476 unwind label %234

.preheader476:                                    ; preds = %._crit_edge
  %199 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #10
  %.not538 = icmp eq i64 %199, 0
  br i1 %.not538, label %._crit_edge490, label %.lr.ph489

.lr.ph486:                                        ; preds = %190, %.loopexit475
  %200 = phi i64 [ %194, %.loopexit475 ], [ 0, %190 ]
  %.0318485 = phi i32 [ %204, %.loopexit475 ], [ 0, %190 ]
  %201 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %192, i64 noundef %200) #10
  %202 = load i32, ptr %201, align 4, !tbaa !44
  %203 = add nsw i32 %.0318485, 1
  %204 = add nsw i32 %202, %203
  %205 = add nsw i32 %.0318485, 2
  %206 = icmp slt i32 %205, %204
  br i1 %206, label %.lr.ph.preheader, label %.loopexit475

.lr.ph.preheader:                                 ; preds = %.lr.ph486
  %207 = sext i32 %205 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %232
  %indvars.iv = phi i64 [ %207, %.lr.ph.preheader ], [ %indvars.iv.next, %232 ]
  %.0319484 = phi i32 [ %203, %.lr.ph.preheader ], [ %233, %232 ]
  %208 = sext i32 %.0319484 to i64
  %209 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %192, i64 noundef %208) #10
  %210 = load i32, ptr %209, align 4, !tbaa !44
  %211 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %192, i64 noundef %indvars.iv) #10
  %212 = load i32, ptr %211, align 4, !tbaa !44
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #10
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %16) #10
  %213 = load ptr, ptr %indvars.iv547.sroa.phi, align 8, !tbaa !5
  invoke void @_ZNK7Riemann11DynamicMesh9GetVertexEi(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %16, ptr noundef nonnull align 8 dereferenceable(452) %213, i32 noundef %210)
          to label %214 unwind label %225

214:                                              ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %17) #10
  %215 = load ptr, ptr %indvars.iv547.sroa.phi, align 8, !tbaa !5
  invoke void @_ZNK7Riemann11DynamicMesh9GetVertexEi(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %17, ptr noundef nonnull align 8 dereferenceable(452) %215, i32 noundef %212)
          to label %216 unwind label %227

216:                                              ; preds = %214
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %15, ptr noundef nonnull align 4 dereferenceable(12) %16, ptr noundef nonnull align 4 dereferenceable(12) %17)
          to label %217 unwind label %227

217:                                              ; preds = %216
  %218 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %15)
  %219 = fcmp olt float %218, %178
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %16) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #10
  br i1 %219, label %220, label %232

220:                                              ; preds = %217
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #10
  %221 = load ptr, ptr %indvars.iv547.sroa.phi, align 8, !tbaa !5
  %222 = invoke noundef i32 @_ZNK7Riemann11DynamicMesh8FindEdgeEii(ptr noundef nonnull align 8 dereferenceable(452) %221, i32 noundef %210, i32 noundef %212)
          to label %223 unwind label %230

223:                                              ; preds = %220
  store i32 %222, ptr %18, align 4, !tbaa !44
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %224 unwind label %230

224:                                              ; preds = %223
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #10
  br label %232

225:                                              ; preds = %.lr.ph
  %226 = landingpad { ptr, i32 }
          cleanup
  br label %229

227:                                              ; preds = %216, %214
  %228 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #10
  br label %229

229:                                              ; preds = %227, %225
  %.pn447 = phi { ptr, i32 } [ %228, %227 ], [ %226, %225 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %16) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #10
  br label %320

230:                                              ; preds = %223, %220
  %231 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #10
  br label %320

232:                                              ; preds = %224, %217
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %233 = trunc nsw i64 %indvars.iv to i32
  %lftr.wideiv = trunc i64 %indvars.iv.next to i32
  %exitcond.not = icmp eq i32 %204, %lftr.wideiv
  br i1 %exitcond.not, label %.loopexit475, label %.lr.ph, !llvm.loop !45

._crit_edge490:                                   ; preds = %313, %.preheader476
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %19) #10
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #10
  br i1 %191, label %190, label %.loopexit477, !llvm.loop !46

234:                                              ; preds = %._crit_edge
  %235 = landingpad { ptr, i32 }
          cleanup
  br label %319

.lr.ph489:                                        ; preds = %.preheader476, %313
  %indvars.iv544 = phi i64 [ %indvars.iv.next545, %313 ], [ 0, %.preheader476 ]
  %236 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %indvars.iv544) #10
  %237 = load i32, ptr %236, align 4, !tbaa !44
  %238 = load ptr, ptr %indvars.iv547.sroa.phi613, align 8, !tbaa !5
  %239 = call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %238, i32 noundef %237)
  br i1 %239, label %240, label %313

240:                                              ; preds = %.lr.ph489
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %20) #10
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %20)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %21) #10
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %21)
  %241 = load ptr, ptr %indvars.iv547.sroa.phi613, align 8, !tbaa !5
  invoke void @_ZNK7Riemann11DynamicMesh8GetEdgeVEiRN5Maths8TVector3IfEES4_(ptr noundef nonnull align 8 dereferenceable(452) %241, i32 noundef %237, ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %21)
          to label %242 unwind label %246

242:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %22) #10
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %22, ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %21)
          to label %243 unwind label %248

243:                                              ; preds = %242
  %244 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %22)
  %245 = fcmp ogt float %244, %178
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %22) #10
  br i1 %245, label %312, label %250

246:                                              ; preds = %240
  %247 = landingpad { ptr, i32 }
          cleanup
  br label %318

248:                                              ; preds = %242
  %249 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %22) #10
  br label %318

250:                                              ; preds = %243
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #10
  %251 = load ptr, ptr %indvars.iv547.sroa.phi613, align 8, !tbaa !5
  invoke void @_ZNK7Riemann11DynamicMesh8GetEdgeVEi(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TIndex2") align 4 %23, ptr noundef nonnull align 8 dereferenceable(452) %251, i32 noundef %237)
          to label %252 unwind label %270

252:                                              ; preds = %250
  %253 = load ptr, ptr %indvars.iv547.sroa.phi613, align 8, !tbaa !5
  %254 = call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh13HasAttributesEv(ptr noundef nonnull align 8 dereferenceable(452) %253)
  br i1 %254, label %255, label %272

255:                                              ; preds = %252
  %256 = load ptr, ptr %indvars.iv547.sroa.phi613, align 8, !tbaa !5
  %257 = call noundef ptr @_ZN7Riemann11DynamicMesh10AttributesEv(ptr noundef nonnull align 8 dereferenceable(452) %256)
  %258 = load i32, ptr %180, align 4, !tbaa !47
  %259 = invoke noundef zeroext i1 @_ZNK7Riemann23DynamicMeshAttributeSet12IsSeamVertexEib(ptr noundef nonnull align 8 dereferenceable(168) %257, i32 noundef %258, i1 noundef zeroext false)
          to label %260 unwind label %270

260:                                              ; preds = %255
  br i1 %259, label %261, label %272

261:                                              ; preds = %260
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %180) #10
  %262 = load ptr, ptr %indvars.iv547.sroa.phi613, align 8, !tbaa !5
  %263 = call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh13HasAttributesEv(ptr noundef nonnull align 8 dereferenceable(452) %262)
  br i1 %263, label %264, label %272

264:                                              ; preds = %261
  %265 = load ptr, ptr %indvars.iv547.sroa.phi613, align 8, !tbaa !5
  %266 = call noundef ptr @_ZN7Riemann11DynamicMesh10AttributesEv(ptr noundef nonnull align 8 dereferenceable(452) %265)
  %267 = load i32, ptr %180, align 4, !tbaa !47
  %268 = invoke noundef zeroext i1 @_ZNK7Riemann23DynamicMeshAttributeSet12IsSeamVertexEib(ptr noundef nonnull align 8 dereferenceable(168) %266, i32 noundef %267, i1 noundef zeroext false)
          to label %269 unwind label %270

269:                                              ; preds = %264
  br i1 %268, label %311, label %272

270:                                              ; preds = %264, %255, %250
  %271 = landingpad { ptr, i32 }
          cleanup
  br label %317

272:                                              ; preds = %261, %269, %260, %252
  call void @llvm.lifetime.start.p0(i64 52, ptr nonnull %24) #10
  invoke void @_ZN7Riemann17FEdgeCollapseInfoC2Ev(ptr noundef nonnull align 4 dereferenceable(52) %24)
          to label %273 unwind label %281

273:                                              ; preds = %272
  %274 = load ptr, ptr %indvars.iv547.sroa.phi613, align 8, !tbaa !5
  %275 = load i32, ptr %23, align 4, !tbaa !49
  %276 = load i32, ptr %180, align 4, !tbaa !47
  %277 = invoke noundef i32 @_ZN7Riemann11DynamicMesh12CollapseEdgeEiifRNS_17FEdgeCollapseInfoE(ptr noundef nonnull align 8 dereferenceable(452) %274, i32 noundef %275, i32 noundef %276, float noundef 5.000000e-01, ptr noundef nonnull align 4 dereferenceable(52) %24)
          to label %278 unwind label %283

278:                                              ; preds = %273
  %.not437 = icmp eq i32 %277, 0
  br i1 %.not437, label %.loopexit474, label %.preheader473.preheader

.preheader473.preheader:                          ; preds = %278
  %279 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %181, i32 noundef 0)
  %280 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %19, ptr noundef nonnull align 4 dereferenceable(4) %279)
          to label %285 unwind label %294

281:                                              ; preds = %272
  %282 = landingpad { ptr, i32 }
          cleanup
  br label %316

283:                                              ; preds = %273
  %284 = landingpad { ptr, i32 }
          cleanup
  br label %316

285:                                              ; preds = %.preheader473.preheader
  %.not438 = icmp eq i64 %280, 0
  br i1 %.not438, label %.preheader473.1, label %286

286:                                              ; preds = %285
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #10
  %287 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %182, i32 noundef 0)
  %288 = load i32, ptr %287, align 4, !tbaa !44
  store i32 %288, ptr %25, align 4, !tbaa !44
  %289 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %19, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %290 unwind label %296

290:                                              ; preds = %286
  %.not439 = icmp eq i64 %289, 0
  br i1 %.not439, label %291, label %298

291:                                              ; preds = %290
  %292 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %19, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %293 unwind label %296

293:                                              ; preds = %291
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %298 unwind label %296

294:                                              ; preds = %.preheader473.1, %.preheader473.preheader
  %295 = landingpad { ptr, i32 }
          cleanup
  br label %316

296:                                              ; preds = %309, %307, %302, %293, %291, %286
  %297 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #10
  br label %316

298:                                              ; preds = %293, %290
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #10
  br label %.preheader473.1

.preheader473.1:                                  ; preds = %285, %298
  %299 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %181, i32 noundef 1)
  %300 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %19, ptr noundef nonnull align 4 dereferenceable(4) %299)
          to label %301 unwind label %294

301:                                              ; preds = %.preheader473.1
  %.not438.1 = icmp eq i64 %300, 0
  br i1 %.not438.1, label %.loopexit474, label %302

302:                                              ; preds = %301
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #10
  %303 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %182, i32 noundef 1)
  %304 = load i32, ptr %303, align 4, !tbaa !44
  store i32 %304, ptr %25, align 4, !tbaa !44
  %305 = invoke noundef i64 @_ZNKSt3setIiSt4lessIiESaIiEE5countERKi(ptr noundef nonnull align 8 dereferenceable(48) %19, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %306 unwind label %296

306:                                              ; preds = %302
  %.not439.1 = icmp eq i64 %305, 0
  br i1 %.not439.1, label %307, label %310

307:                                              ; preds = %306
  %308 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %19, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %309 unwind label %296

309:                                              ; preds = %307
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %310 unwind label %296

310:                                              ; preds = %309, %306
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #10
  br label %.loopexit474

.loopexit474:                                     ; preds = %301, %310, %278
  call void @llvm.lifetime.end.p0(i64 52, ptr nonnull %24) #10
  br label %311

311:                                              ; preds = %269, %.loopexit474
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #10
  br label %312

312:                                              ; preds = %243, %311
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #10
  br label %313

313:                                              ; preds = %.lr.ph489, %312
  %indvars.iv.next545 = add nuw nsw i64 %indvars.iv544, 1
  %314 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #10
  %315 = icmp ugt i64 %314, %indvars.iv.next545
  br i1 %315, label %.lr.ph489, label %._crit_edge490, !llvm.loop !50

316:                                              ; preds = %283, %296, %294, %281
  %.pn440.pn.pn = phi { ptr, i32 } [ %282, %281 ], [ %284, %283 ], [ %297, %296 ], [ %295, %294 ]
  call void @llvm.lifetime.end.p0(i64 52, ptr nonnull %24) #10
  br label %317

317:                                              ; preds = %316, %270
  %.pn440.pn.pn.pn = phi { ptr, i32 } [ %.pn440.pn.pn, %316 ], [ %271, %270 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #10
  br label %318

318:                                              ; preds = %317, %248, %246
  %.pn440.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn440.pn.pn.pn, %317 ], [ %249, %248 ], [ %247, %246 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #10
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #10
  br label %319

319:                                              ; preds = %318, %234
  %.pn440.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn440.pn.pn.pn.pn, %318 ], [ %235, %234 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %19) #10
  br label %320

320:                                              ; preds = %229, %230, %319
  %.pn449.pn = phi { ptr, i32 } [ %.pn440.pn.pn.pn.pn.pn, %319 ], [ %231, %230 ], [ %.pn447, %229 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #10
  br label %962

.loopexit477:                                     ; preds = %._crit_edge490, %171
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %26) #10
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #10
  %.ptr.1 = getelementptr inbounds i8, ptr %26, i64 24
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1) #10
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %27) #10
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %27) #10
  %.ptr359.1 = getelementptr inbounds i8, ptr %27, i64 48
  call void @_ZNSt3setIiSt4lessIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr359.1) #10
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %28) #10
  call void @_ZNSt6vectorIbSaIbEEC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %28) #10
  %.ptr363.1 = getelementptr inbounds i8, ptr %28, i64 40
  call void @_ZNSt6vectorIbSaIbEEC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %.ptr363.1) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %29) #10
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #10
  %321 = load ptr, ptr %3, align 16, !tbaa !5
  %322 = call noundef i32 @_ZNK7Riemann11DynamicMesh16GetTriangleCountEv(ptr noundef nonnull align 8 dereferenceable(452) %321)
  %323 = sext i32 %322 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %30) #10
  store i32 -1, ptr %30, align 4, !tbaa !44
  invoke void @_ZNSt6vectorIiSaIiEE6resizeEmRKi(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %323, ptr noundef nonnull align 4 dereferenceable(4) %30)
          to label %324 unwind label %330

324:                                              ; preds = %.loopexit477
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %30) #10
  %325 = getelementptr inbounds i8, ptr %38, i64 12
  %326 = getelementptr inbounds i8, ptr %38, i64 24
  %327 = getelementptr inbounds i8, ptr %46, i64 8
  %328 = getelementptr inbounds i8, ptr %45, i64 8
  %329 = getelementptr inbounds i8, ptr %47, i64 8
  br label %337

330:                                              ; preds = %.loopexit477
  %331 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %30) #10
  br label %626

.preheader472:                                    ; preds = %._crit_edge502
  %332 = load ptr, ptr %3, align 16, !tbaa !5
  %333 = call noundef i32 @_ZNK7Riemann11DynamicMesh16GetTriangleCountEv(ptr noundef nonnull align 8 dereferenceable(452) %332)
  %334 = icmp sgt i32 %333, 0
  br i1 %334, label %.lr.ph505, label %.preheader471

.lr.ph505:                                        ; preds = %.preheader472
  %335 = getelementptr inbounds i8, ptr %48, i64 8
  %336 = getelementptr inbounds i8, ptr %49, i64 8
  br label %474

337:                                              ; preds = %324, %._crit_edge502
  %.not420 = phi i1 [ true, %324 ], [ false, %._crit_edge502 ]
  %indvars.iv555.sroa.phi = phi ptr [ %28, %324 ], [ %indvars.iv555.sroa.gep608, %._crit_edge502 ]
  %indvars.iv555.sroa.phi616 = phi ptr [ %3, %324 ], [ %indvars.iv555.sroa.gep618, %._crit_edge502 ]
  %indvars.iv555 = phi i64 [ 1, %324 ], [ 0, %._crit_edge502 ]
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %31) #10
  %338 = getelementptr inbounds [2 x %"class.Riemann::DynamicMeshAABBTree"], ptr %11, i64 0, i64 %indvars.iv555
  invoke void @_ZN7Riemann16TFastWindingTreeC2EPNS_19DynamicMeshAABBTreeE(ptr noundef nonnull align 8 dereferenceable(72) %31, ptr noundef nonnull %338)
          to label %339 unwind label %350

339:                                              ; preds = %337
  %340 = load ptr, ptr %indvars.iv555.sroa.phi616, align 8, !tbaa !5
  %341 = call noundef i32 @_ZNK7Riemann11DynamicMesh16GetTriangleCountEv(ptr noundef nonnull align 8 dereferenceable(452) %340)
  %342 = sext i32 %341 to i64
  invoke void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40) %indvars.iv555.sroa.phi, i64 noundef %342, i1 noundef zeroext false)
          to label %343 unwind label %352

343:                                              ; preds = %339
  %344 = load i32, ptr %0, align 8, !tbaa !51
  %345 = icmp ne i32 %344, 2
  %346 = icmp ne i32 %344, 1
  %or.cond.not603 = or i1 %.not420, %346
  %or.cond599.not = and i1 %345, %or.cond.not603
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %32) #10
  %347 = load ptr, ptr %338, align 8, !tbaa !52
  %348 = call noundef i32 @_ZNK7Riemann11DynamicMesh16GetTriangleCountEv(ptr noundef nonnull align 8 dereferenceable(452) %347)
  %349 = sext i32 %348 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %33) #10
  call void @_ZNSaIN5Maths8TVector3IfEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #10
  invoke void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEC2EmRKS3_(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %349, ptr noundef nonnull align 1 dereferenceable(1) %33)
          to label %354 unwind label %357

350:                                              ; preds = %337
  %351 = landingpad { ptr, i32 }
          cleanup
  br label %468

352:                                              ; preds = %339
  %353 = landingpad { ptr, i32 }
          cleanup
  br label %467

354:                                              ; preds = %343
  call void @_ZNSt15__new_allocatorIN5Maths8TVector3IfEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %33) #10
  %355 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #10
  %.not539 = icmp eq i64 %355, 0
  br i1 %.not539, label %._crit_edge495, label %.lr.ph494

._crit_edge495:                                   ; preds = %361, %354
  %356 = load float, ptr %166, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %35) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %37) #10
  store ptr %32, ptr %37, align 8, !tbaa !5
  call void @"_ZNSt8functionIFbiEEC2IZN7Riemann15GeometryBoolean7ComputeEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef nonnull align 8 dereferenceable(8) %37) #10
  invoke void @_ZN7Riemann13FQueryOptionsC2EfSt8functionIFbiEE(ptr noundef nonnull align 8 dereferenceable(40) %35, float noundef %356, ptr noundef nonnull %36)
          to label %369 unwind label %373

357:                                              ; preds = %343
  %358 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIN5Maths8TVector3IfEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %33) #10
  br label %466

.lr.ph494:                                        ; preds = %354, %361
  %.0324492 = phi i64 [ %364, %361 ], [ 0, %354 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %34) #10
  %359 = load ptr, ptr %338, align 8, !tbaa !52
  %360 = trunc i64 %.0324492 to i32
  invoke void @_ZNK7Riemann11DynamicMesh12GetTriNormalEi(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %34, ptr noundef nonnull align 8 dereferenceable(452) %359, i32 noundef %360)
          to label %361 unwind label %367

361:                                              ; preds = %.lr.ph494
  %362 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %.0324492) #10
  %363 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %362, ptr noundef nonnull align 4 dereferenceable(12) %34)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %34) #10
  %364 = add nuw i64 %.0324492, 1
  %365 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #10
  %366 = icmp ult i64 %364, %365
  br i1 %366, label %.lr.ph494, label %._crit_edge495, !llvm.loop !58

367:                                              ; preds = %.lr.ph494
  %368 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %34) #10
  br label %465

369:                                              ; preds = %._crit_edge495
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %37) #10
  %370 = icmp sgt i32 %341, 0
  br i1 %370, label %.lr.ph501, label %._crit_edge502

.lr.ph501:                                        ; preds = %369
  %371 = fmul float %356, 2.000000e+00
  %372 = icmp eq i32 %344, 1
  %wide.trip.count = zext nneg i32 %341 to i64
  br label %375

._crit_edge502:                                   ; preds = %456, %369
  call void @_ZN7Riemann13FQueryOptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %35) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %35) #10
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %32) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %32) #10
  call void @_ZN7Riemann16TFastWindingTreeD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %31) #10
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %31) #10
  br i1 %.not420, label %337, label %.preheader472, !llvm.loop !59

373:                                              ; preds = %._crit_edge495
  %374 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %37) #10
  br label %464

375:                                              ; preds = %.lr.ph501, %456
  %indvars.iv551 = phi i64 [ 0, %.lr.ph501 ], [ %indvars.iv.next552, %456 ]
  %376 = trunc nuw nsw i64 %indvars.iv551 to i32
  %377 = call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh10IsTriangleEi(ptr noundef nonnull align 8 dereferenceable(452) %340, i32 noundef %376)
  br i1 %377, label %378, label %456

378:                                              ; preds = %375
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %38) #10
  invoke void @_ZN7Riemann9Triangle3C2Ev(ptr noundef nonnull align 4 dereferenceable(36) %38)
          to label %379 unwind label %403

379:                                              ; preds = %378
  invoke void @_ZNK7Riemann11DynamicMesh14GetTriVerticesEiRN5Maths8TVector3IfEES4_S4_(ptr noundef nonnull align 8 dereferenceable(452) %340, i32 noundef %376, ptr noundef nonnull align 4 dereferenceable(12) %38, ptr noundef nonnull align 4 dereferenceable(12) %325, ptr noundef nonnull align 4 dereferenceable(12) %326)
          to label %380 unwind label %403

380:                                              ; preds = %379
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %39) #10
  invoke void @_ZNK7Riemann9Triangle39GetCenterEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %39, ptr noundef nonnull align 4 dereferenceable(36) %38)
          to label %381 unwind label %405

381:                                              ; preds = %380
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %40) #10
  %382 = invoke noundef i32 @_ZNK7Riemann19DynamicMeshAABBTree19FindNearestTriangleERKN5Maths8TVector3IfEERfRKNS_13FQueryOptionsE(ptr noundef nonnull align 8 dereferenceable(88) %338, ptr noundef nonnull align 4 dereferenceable(12) %39, ptr noundef nonnull align 4 dereferenceable(4) %40, ptr noundef nonnull align 8 dereferenceable(40) %35)
          to label %383 unwind label %407

383:                                              ; preds = %381
  %384 = icmp sgt i32 %382, -1
  br i1 %384, label %385, label %445

385:                                              ; preds = %383
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %41) #10
  %386 = zext nneg i32 %382 to i64
  %387 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %386) #10
  call void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %41, ptr noundef nonnull align 4 dereferenceable(12) %387)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %42) #10
  invoke void @_ZNK7Riemann11DynamicMesh12GetTriNormalEi(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %42, ptr noundef nonnull align 8 dereferenceable(452) %340, i32 noundef %376)
          to label %388 unwind label %409

388:                                              ; preds = %385
  %389 = call noundef float @_ZNK5Maths8TVector3IfE3DotERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %41, ptr noundef nonnull align 4 dereferenceable(12) %42)
  %390 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Riemann9Triangle3ixEi(ptr noundef nonnull align 4 dereferenceable(36) %38, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %43) #10
  call void @_ZNSt8functionIFbiEEC2EDn(ptr noundef nonnull align 8 dereferenceable(32) %44, ptr null) #10
  invoke void @_ZN7Riemann13FQueryOptionsC2EfSt8functionIFbiEE(ptr noundef nonnull align 8 dereferenceable(40) %43, float noundef %371, ptr noundef nonnull %44)
          to label %411 unwind label %415

391:                                              ; preds = %413
  %392 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Riemann9Triangle3ixEi(ptr noundef nonnull align 4 dereferenceable(36) %38, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %43) #10
  call void @_ZNSt8functionIFbiEEC2EDn(ptr noundef nonnull align 8 dereferenceable(32) %44, ptr null) #10
  invoke void @_ZN7Riemann13FQueryOptionsC2EfSt8functionIFbiEE(ptr noundef nonnull align 8 dereferenceable(40) %43, float noundef %371, ptr noundef nonnull %44)
          to label %393 unwind label %415

393:                                              ; preds = %391
  %394 = invoke noundef i32 @_ZNK7Riemann19DynamicMeshAABBTree19FindNearestTriangleERKN5Maths8TVector3IfEERfRKNS_13FQueryOptionsE(ptr noundef nonnull align 8 dereferenceable(88) %338, ptr noundef nonnull align 4 dereferenceable(12) %392, ptr noundef nonnull align 4 dereferenceable(4) %40, ptr noundef nonnull align 8 dereferenceable(40) %43)
          to label %395 unwind label %417

395:                                              ; preds = %393
  %396 = icmp eq i32 %394, -1
  call void @_ZN7Riemann13FQueryOptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %43) #10
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %43) #10
  br i1 %396, label %442, label %397

397:                                              ; preds = %395
  %398 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Riemann9Triangle3ixEi(ptr noundef nonnull align 4 dereferenceable(36) %38, i32 noundef 2)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %43) #10
  call void @_ZNSt8functionIFbiEEC2EDn(ptr noundef nonnull align 8 dereferenceable(32) %44, ptr null) #10
  invoke void @_ZN7Riemann13FQueryOptionsC2EfSt8functionIFbiEE(ptr noundef nonnull align 8 dereferenceable(40) %43, float noundef %371, ptr noundef nonnull %44)
          to label %399 unwind label %415

399:                                              ; preds = %397
  %400 = invoke noundef i32 @_ZNK7Riemann19DynamicMeshAABBTree19FindNearestTriangleERKN5Maths8TVector3IfEERfRKNS_13FQueryOptionsE(ptr noundef nonnull align 8 dereferenceable(88) %338, ptr noundef nonnull align 4 dereferenceable(12) %398, ptr noundef nonnull align 4 dereferenceable(4) %40, ptr noundef nonnull align 8 dereferenceable(40) %43)
          to label %401 unwind label %417

401:                                              ; preds = %399
  %402 = icmp eq i32 %400, -1
  call void @_ZN7Riemann13FQueryOptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %43) #10
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %43) #10
  br i1 %402, label %442, label %.critedge462

.critedge462:                                     ; preds = %401
  br i1 %.not420, label %420, label %422

403:                                              ; preds = %379, %378
  %404 = landingpad { ptr, i32 }
          cleanup
  br label %463

405:                                              ; preds = %380
  %406 = landingpad { ptr, i32 }
          cleanup
  br label %462

407:                                              ; preds = %381
  %408 = landingpad { ptr, i32 }
          cleanup
  br label %457

409:                                              ; preds = %385
  %410 = landingpad { ptr, i32 }
          cleanup
  br label %443

411:                                              ; preds = %388
  %412 = invoke noundef i32 @_ZNK7Riemann19DynamicMeshAABBTree19FindNearestTriangleERKN5Maths8TVector3IfEERfRKNS_13FQueryOptionsE(ptr noundef nonnull align 8 dereferenceable(88) %338, ptr noundef nonnull align 4 dereferenceable(12) %390, ptr noundef nonnull align 4 dereferenceable(4) %40, ptr noundef nonnull align 8 dereferenceable(40) %43)
          to label %413 unwind label %417

413:                                              ; preds = %411
  %414 = icmp eq i32 %412, -1
  call void @_ZN7Riemann13FQueryOptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %43) #10
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %43) #10
  br i1 %414, label %442, label %391

415:                                              ; preds = %397, %391, %388
  %416 = landingpad { ptr, i32 }
          cleanup
  br label %419

417:                                              ; preds = %399, %393, %411
  %418 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7Riemann13FQueryOptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %43) #10
  br label %419

419:                                              ; preds = %417, %415
  %.pn418 = phi { ptr, i32 } [ %418, %417 ], [ %416, %415 ]
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %44) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %43) #10
  br label %443

420:                                              ; preds = %.critedge462
  %421 = call noundef zeroext i1 @_ZNK5Maths8TVector3IfE6IsZeroEv(ptr noundef nonnull align 4 dereferenceable(12) %42)
  br i1 %421, label %422, label %430

422:                                              ; preds = %420, %.critedge462
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %45) #10
  %423 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %indvars.iv555.sroa.phi, i64 noundef %indvars.iv551)
          to label %424 unwind label %428

424:                                              ; preds = %422
  %425 = extractvalue { ptr, i64 } %423, 0
  store ptr %425, ptr %45, align 8
  %426 = extractvalue { ptr, i64 } %423, 1
  store i64 %426, ptr %328, align 8
  %427 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %45, i1 noundef zeroext false) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %45) #10
  br label %444

428:                                              ; preds = %422
  %429 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %45) #10
  br label %443

430:                                              ; preds = %420
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %46) #10
  %431 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %indvars.iv555.sroa.phi, i64 noundef %indvars.iv551)
          to label %432 unwind label %440

432:                                              ; preds = %430
  %433 = fcmp ogt float %389, 0.000000e+00
  %434 = xor i1 %372, %433
  %435 = extractvalue { ptr, i64 } %431, 0
  store ptr %435, ptr %46, align 8
  %436 = extractvalue { ptr, i64 } %431, 1
  store i64 %436, ptr %327, align 8
  %437 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %46, i1 noundef zeroext %434) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %46) #10
  br i1 %434, label %438, label %444

438:                                              ; preds = %432
  %439 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %indvars.iv551) #10
  store i32 %382, ptr %439, align 4, !tbaa !44
  br label %444

440:                                              ; preds = %430
  %441 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %46) #10
  br label %443

442:                                              ; preds = %401, %395, %413
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %42) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %41) #10
  br label %445

443:                                              ; preds = %419, %428, %440, %409
  %.pn421.pn = phi { ptr, i32 } [ %410, %409 ], [ %429, %428 ], [ %441, %440 ], [ %.pn418, %419 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %42) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %41) #10
  br label %457

444:                                              ; preds = %432, %438, %424
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %42) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %41) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %40) #10
  br label %455

445:                                              ; preds = %442, %383
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %40) #10
  %446 = invoke noundef float @_ZN7Riemann16TFastWindingTree17FastWindingNumberERKN5Maths8TVector3IfEE(ptr noundef nonnull align 8 dereferenceable(72) %31, ptr noundef nonnull align 4 dereferenceable(12) %39)
          to label %447 unwind label %458

447:                                              ; preds = %445
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %47) #10
  %448 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %indvars.iv555.sroa.phi, i64 noundef %indvars.iv551)
          to label %449 unwind label %460

449:                                              ; preds = %447
  %450 = fcmp ogt float %446, 5.000000e-01
  %451 = xor i1 %or.cond599.not, %450
  %452 = extractvalue { ptr, i64 } %448, 0
  store ptr %452, ptr %47, align 8
  %453 = extractvalue { ptr, i64 } %448, 1
  store i64 %453, ptr %329, align 8
  %454 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %47, i1 noundef zeroext %451) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %47) #10
  br label %455

455:                                              ; preds = %444, %449
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %39) #10
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %38) #10
  br label %456

456:                                              ; preds = %455, %375
  %indvars.iv.next552 = add nuw nsw i64 %indvars.iv551, 1
  %exitcond554.not = icmp eq i64 %indvars.iv.next552, %wide.trip.count
  br i1 %exitcond554.not, label %._crit_edge502, label %375, !llvm.loop !60

457:                                              ; preds = %443, %407
  %.pn421.pn.pn = phi { ptr, i32 } [ %.pn421.pn, %443 ], [ %408, %407 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %40) #10
  br label %462

458:                                              ; preds = %445
  %459 = landingpad { ptr, i32 }
          cleanup
  br label %462

460:                                              ; preds = %447
  %461 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %47) #10
  br label %462

462:                                              ; preds = %458, %460, %457, %405
  %.pn425.pn = phi { ptr, i32 } [ %.pn421.pn.pn, %457 ], [ %406, %405 ], [ %461, %460 ], [ %459, %458 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %39) #10
  br label %463

463:                                              ; preds = %462, %403
  %.pn425.pn.pn = phi { ptr, i32 } [ %.pn425.pn, %462 ], [ %404, %403 ]
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %38) #10
  call void @_ZN7Riemann13FQueryOptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %35) #10
  br label %464

464:                                              ; preds = %463, %373
  %.pn425.pn.pn.pn = phi { ptr, i32 } [ %.pn425.pn.pn, %463 ], [ %374, %373 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %35) #10
  br label %465

465:                                              ; preds = %464, %367
  %.pn430 = phi { ptr, i32 } [ %368, %367 ], [ %.pn425.pn.pn.pn, %464 ]
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %32) #10
  br label %466

466:                                              ; preds = %465, %357
  %.pn430.pn = phi { ptr, i32 } [ %.pn430, %465 ], [ %358, %357 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %32) #10
  br label %467

467:                                              ; preds = %466, %352
  %.pn430.pn.pn = phi { ptr, i32 } [ %.pn430.pn, %466 ], [ %353, %352 ]
  call void @_ZN7Riemann16TFastWindingTreeD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %31) #10
  br label %468

468:                                              ; preds = %467, %350
  %.pn430.pn.pn.pn = phi { ptr, i32 } [ %.pn430.pn.pn, %467 ], [ %351, %350 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %31) #10
  br label %626

.preheader471:                                    ; preds = %499, %.preheader472
  %469 = getelementptr inbounds i8, ptr %51, i64 8
  %470 = getelementptr inbounds i8, ptr %52, i64 8
  %471 = load ptr, ptr %3, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %50) #10
  store i32 0, ptr %50, align 4, !tbaa !44
  %472 = call noundef i32 @_ZNK7Riemann11DynamicMesh12GetEdgeCountEv(ptr noundef nonnull align 8 dereferenceable(452) %471)
  %473 = icmp sgt i32 %472, 0
  br i1 %473, label %.lr.ph507, label %._crit_edge508

474:                                              ; preds = %.lr.ph505, %499
  %indvars.iv558 = phi i64 [ 0, %.lr.ph505 ], [ %indvars.iv.next559, %499 ]
  %475 = load ptr, ptr %3, align 16, !tbaa !5
  %476 = trunc nuw nsw i64 %indvars.iv558 to i32
  %477 = call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsTriangleFastEi(ptr noundef nonnull align 8 dereferenceable(452) %475, i32 noundef %476)
  br i1 %477, label %478, label %499

478:                                              ; preds = %474
  %479 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %indvars.iv558) #10
  %480 = load i32, ptr %479, align 4, !tbaa !44
  %481 = icmp sgt i32 %480, -1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %48) #10
  br i1 %481, label %482, label %.critedge

482:                                              ; preds = %478
  %483 = zext nneg i32 %480 to i64
  %484 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %.ptr363.1, i64 noundef %483)
          to label %485 unwind label %495

485:                                              ; preds = %482
  %486 = extractvalue { ptr, i64 } %484, 0
  store ptr %486, ptr %48, align 8
  %487 = extractvalue { ptr, i64 } %484, 1
  store i64 %487, ptr %335, align 8
  %488 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %48) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %48) #10
  br i1 %488, label %489, label %499

489:                                              ; preds = %485
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %49) #10
  %490 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %28, i64 noundef %indvars.iv558)
          to label %491 unwind label %497

491:                                              ; preds = %489
  %492 = extractvalue { ptr, i64 } %490, 0
  store ptr %492, ptr %49, align 8
  %493 = extractvalue { ptr, i64 } %490, 1
  store i64 %493, ptr %336, align 8
  %494 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %49, i1 noundef zeroext false) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %49) #10
  br label %499

495:                                              ; preds = %482
  %496 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %48) #10
  br label %626

497:                                              ; preds = %489
  %498 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %49) #10
  br label %626

.critedge:                                        ; preds = %478
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %48) #10
  br label %499

499:                                              ; preds = %485, %491, %.critedge, %474
  %indvars.iv.next559 = add nuw nsw i64 %indvars.iv558, 1
  %500 = load ptr, ptr %3, align 16, !tbaa !5
  %501 = call noundef i32 @_ZNK7Riemann11DynamicMesh16GetTriangleCountEv(ptr noundef nonnull align 8 dereferenceable(452) %500)
  %502 = sext i32 %501 to i64
  %503 = icmp slt i64 %indvars.iv.next559, %502
  br i1 %503, label %474, label %.preheader471, !llvm.loop !61

._crit_edge508:                                   ; preds = %581, %.preheader471
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %50) #10
  %504 = load ptr, ptr %116, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %50) #10
  store i32 0, ptr %50, align 4, !tbaa !44
  %505 = call noundef i32 @_ZNK7Riemann11DynamicMesh12GetEdgeCountEv(ptr noundef nonnull align 8 dereferenceable(452) %504)
  %506 = icmp sgt i32 %505, 0
  br i1 %506, label %.lr.ph507.1, label %._crit_edge508.1

.lr.ph507.1:                                      ; preds = %._crit_edge508, %539
  %507 = load i32, ptr %50, align 4, !tbaa !44
  %508 = call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh10IsEdgeFastEi(ptr noundef nonnull align 8 dereferenceable(452) %504, i32 noundef %507)
  br i1 %508, label %509, label %539

509:                                              ; preds = %.lr.ph507.1
  %510 = load i32, ptr %50, align 4, !tbaa !44
  %511 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN7Riemann11DynamicMesh7GetEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %504, i32 noundef %510)
  %512 = getelementptr inbounds i8, ptr %511, i64 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %51) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %52) #10
  %513 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %512, i32 noundef 1)
  %514 = load i32, ptr %513, align 4, !tbaa !44
  %515 = icmp eq i32 %514, -1
  br i1 %515, label %.critedge5.1, label %516

516:                                              ; preds = %509
  %517 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %512, i32 noundef 0)
  %518 = load i32, ptr %517, align 4, !tbaa !44
  %519 = sext i32 %518 to i64
  %520 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %.ptr363.1, i64 noundef %519)
          to label %521 unwind label %.loopexit.split-lp

521:                                              ; preds = %516
  %522 = extractvalue { ptr, i64 } %520, 0
  store ptr %522, ptr %51, align 8
  %523 = extractvalue { ptr, i64 } %520, 1
  store i64 %523, ptr %469, align 8
  %524 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %512, i32 noundef 1)
  %525 = load i32, ptr %524, align 4, !tbaa !44
  %526 = sext i32 %525 to i64
  %527 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %.ptr363.1, i64 noundef %526)
          to label %528 unwind label %.loopexit.split-lp566

528:                                              ; preds = %521
  %529 = extractvalue { ptr, i64 } %527, 0
  store ptr %529, ptr %52, align 8
  %530 = extractvalue { ptr, i64 } %527, 1
  store i64 %530, ptr %470, align 8
  %531 = call noundef zeroext i1 @_ZNKSt14_Bit_referenceeqERKS_(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 8 dereferenceable(16) %52)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %52) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %51) #10
  br i1 %531, label %539, label %532

532:                                              ; preds = %528
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, ptr noundef nonnull align 4 dereferenceable(4) %50)
          to label %533 unwind label %.loopexit.split-lp571

533:                                              ; preds = %532
  %534 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %511, i32 noundef 0)
  %535 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %.ptr359.1, ptr noundef nonnull align 4 dereferenceable(4) %534)
          to label %536 unwind label %.loopexit.split-lp571

536:                                              ; preds = %533
  %537 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %511, i32 noundef 1)
  %538 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %.ptr359.1, ptr noundef nonnull align 4 dereferenceable(4) %537)
          to label %539 unwind label %.loopexit.split-lp571

.critedge5.1:                                     ; preds = %509
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %52) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %51) #10
  br label %539

539:                                              ; preds = %.critedge5.1, %536, %528, %.lr.ph507.1
  %540 = load i32, ptr %50, align 4, !tbaa !44
  %541 = add nsw i32 %540, 1
  store i32 %541, ptr %50, align 4, !tbaa !44
  %542 = call noundef i32 @_ZNK7Riemann11DynamicMesh12GetEdgeCountEv(ptr noundef nonnull align 8 dereferenceable(452) %504)
  %543 = icmp slt i32 %541, %542
  br i1 %543, label %.lr.ph507.1, label %._crit_edge508.1, !llvm.loop !62

._crit_edge508.1:                                 ; preds = %539, %._crit_edge508
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %50) #10
  %544 = getelementptr inbounds i8, ptr %53, i64 8
  %545 = load ptr, ptr %3, align 16, !tbaa !5
  %546 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %28) #10
  %.not540 = icmp eq i64 %546, 0
  br i1 %.not540, label %._crit_edge513, label %.lr.ph512

.lr.ph507:                                        ; preds = %.preheader471, %581
  %547 = load i32, ptr %50, align 4, !tbaa !44
  %548 = call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh10IsEdgeFastEi(ptr noundef nonnull align 8 dereferenceable(452) %471, i32 noundef %547)
  br i1 %548, label %549, label %581

549:                                              ; preds = %.lr.ph507
  %550 = load i32, ptr %50, align 4, !tbaa !44
  %551 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN7Riemann11DynamicMesh7GetEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %471, i32 noundef %550)
  %552 = getelementptr inbounds i8, ptr %551, i64 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %51) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %52) #10
  %553 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %552, i32 noundef 1)
  %554 = load i32, ptr %553, align 4, !tbaa !44
  %555 = icmp eq i32 %554, -1
  br i1 %555, label %.critedge5, label %556

556:                                              ; preds = %549
  %557 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %552, i32 noundef 0)
  %558 = load i32, ptr %557, align 4, !tbaa !44
  %559 = sext i32 %558 to i64
  %560 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %28, i64 noundef %559)
          to label %561 unwind label %.loopexit564

561:                                              ; preds = %556
  %562 = extractvalue { ptr, i64 } %560, 0
  store ptr %562, ptr %51, align 8
  %563 = extractvalue { ptr, i64 } %560, 1
  store i64 %563, ptr %469, align 8
  %564 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %552, i32 noundef 1)
  %565 = load i32, ptr %564, align 4, !tbaa !44
  %566 = sext i32 %565 to i64
  %567 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %28, i64 noundef %566)
          to label %568 unwind label %.loopexit565

568:                                              ; preds = %561
  %569 = extractvalue { ptr, i64 } %567, 0
  store ptr %569, ptr %52, align 8
  %570 = extractvalue { ptr, i64 } %567, 1
  store i64 %570, ptr %470, align 8
  %571 = call noundef zeroext i1 @_ZNKSt14_Bit_referenceeqERKS_(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 8 dereferenceable(16) %52)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %52) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %51) #10
  br i1 %571, label %581, label %574

.critedge5:                                       ; preds = %549
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %52) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %51) #10
  br label %581

.loopexit570:                                     ; preds = %574, %575, %578
  %lpad.loopexit572 = landingpad { ptr, i32 }
          cleanup
  br label %586

.loopexit.split-lp571:                            ; preds = %532, %533, %536
  %lpad.loopexit.split-lp573 = landingpad { ptr, i32 }
          cleanup
  br label %586

.loopexit564:                                     ; preds = %556
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %573

.loopexit.split-lp:                               ; preds = %516
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %573

.loopexit565:                                     ; preds = %561
  %lpad.loopexit567 = landingpad { ptr, i32 }
          cleanup
  br label %572

.loopexit.split-lp566:                            ; preds = %521
  %lpad.loopexit.split-lp568 = landingpad { ptr, i32 }
          cleanup
  br label %572

572:                                              ; preds = %.loopexit.split-lp566, %.loopexit565
  %lpad.phi569 = phi { ptr, i32 } [ %lpad.loopexit567, %.loopexit565 ], [ %lpad.loopexit.split-lp568, %.loopexit.split-lp566 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %52) #10
  br label %573

573:                                              ; preds = %.loopexit564, %.loopexit.split-lp, %572
  %.pn412 = phi { ptr, i32 } [ %lpad.phi569, %572 ], [ %lpad.loopexit, %.loopexit564 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %51) #10
  br label %586

574:                                              ; preds = %568
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 4 dereferenceable(4) %50)
          to label %575 unwind label %.loopexit570

575:                                              ; preds = %574
  %576 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %551, i32 noundef 0)
  %577 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %27, ptr noundef nonnull align 4 dereferenceable(4) %576)
          to label %578 unwind label %.loopexit570

578:                                              ; preds = %575
  %579 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK5Maths7TIndex2IiEixEi(ptr noundef nonnull align 4 dereferenceable(8) %551, i32 noundef 1)
  %580 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %27, ptr noundef nonnull align 4 dereferenceable(4) %579)
          to label %581 unwind label %.loopexit570

581:                                              ; preds = %.critedge5, %568, %578, %.lr.ph507
  %582 = load i32, ptr %50, align 4, !tbaa !44
  %583 = add nsw i32 %582, 1
  store i32 %583, ptr %50, align 4, !tbaa !44
  %584 = call noundef i32 @_ZNK7Riemann11DynamicMesh12GetEdgeCountEv(ptr noundef nonnull align 8 dereferenceable(452) %471)
  %585 = icmp slt i32 %583, %584
  br i1 %585, label %.lr.ph507, label %._crit_edge508, !llvm.loop !62

586:                                              ; preds = %.loopexit570, %.loopexit.split-lp571, %573
  %.pn414 = phi { ptr, i32 } [ %.pn412, %573 ], [ %lpad.loopexit572, %.loopexit570 ], [ %lpad.loopexit.split-lp573, %.loopexit.split-lp571 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %50) #10
  br label %626

._crit_edge513:                                   ; preds = %623, %._crit_edge508.1
  %587 = load ptr, ptr %116, align 8, !tbaa !5
  %588 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %.ptr363.1) #10
  %.not540.1 = icmp eq i64 %588, 0
  br i1 %.not540.1, label %._crit_edge513.1, label %.lr.ph512.1

.lr.ph512.1:                                      ; preds = %._crit_edge513, %599
  %indvars.iv575.1 = phi i64 [ %indvars.iv.next576.1, %599 ], [ 0, %._crit_edge513 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %53) #10
  %589 = trunc nuw nsw i64 %indvars.iv575.1 to i32
  %590 = call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh10IsTriangleEi(ptr noundef nonnull align 8 dereferenceable(452) %587, i32 noundef %589)
  br i1 %590, label %591, label %.critedge7.1

.critedge7.1:                                     ; preds = %.lr.ph512.1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %53) #10
  br label %599

591:                                              ; preds = %.lr.ph512.1
  %592 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %.ptr363.1, i64 noundef %indvars.iv575.1)
          to label %593 unwind label %.loopexit.split-lp582

593:                                              ; preds = %591
  %594 = extractvalue { ptr, i64 } %592, 0
  store ptr %594, ptr %53, align 8
  %595 = extractvalue { ptr, i64 } %592, 1
  store i64 %595, ptr %544, align 8
  %596 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %53) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %53) #10
  br i1 %596, label %599, label %597

597:                                              ; preds = %593
  %598 = invoke noundef i32 @_ZN7Riemann11DynamicMesh14RemoveTriangleEibb(ptr noundef nonnull align 8 dereferenceable(452) %587, i32 noundef %589, i1 noundef zeroext true, i1 noundef zeroext false)
          to label %599 unwind label %.loopexit.split-lp587

599:                                              ; preds = %597, %593, %.critedge7.1
  %indvars.iv.next576.1 = add nuw nsw i64 %indvars.iv575.1, 1
  %600 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %.ptr363.1) #10
  %601 = icmp ugt i64 %600, %indvars.iv.next576.1
  br i1 %601, label %.lr.ph512.1, label %._crit_edge513.1, !llvm.loop !63

._crit_edge513.1:                                 ; preds = %599, %._crit_edge513
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %29) #10
  %602 = getelementptr inbounds i8, ptr %28, i64 40
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %602) #10
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %28) #10
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %28) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %54) #10
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %54) #10
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %55) #10
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %55) #10
  %.ptr367.1 = getelementptr inbounds i8, ptr %55, i64 48
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr367.1) #10
  %603 = load float, ptr %166, align 4, !tbaa !35
  %604 = fmul float %603, %603
  %605 = getelementptr inbounds i8, ptr %62, i64 8
  %606 = getelementptr inbounds i8, ptr %62, i64 16
  %607 = getelementptr inbounds i8, ptr %63, i64 8
  %608 = getelementptr inbounds i8, ptr %63, i64 16
  %609 = getelementptr inbounds i8, ptr %81, i64 12
  %610 = getelementptr inbounds i8, ptr %85, i64 32
  %611 = getelementptr inbounds i8, ptr %85, i64 44
  br label %628

.lr.ph512:                                        ; preds = %._crit_edge508.1, %623
  %indvars.iv575 = phi i64 [ %indvars.iv.next576, %623 ], [ 0, %._crit_edge508.1 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %53) #10
  %612 = trunc nuw nsw i64 %indvars.iv575 to i32
  %613 = call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh10IsTriangleEi(ptr noundef nonnull align 8 dereferenceable(452) %545, i32 noundef %612)
  br i1 %613, label %614, label %.critedge7

614:                                              ; preds = %.lr.ph512
  %615 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %28, i64 noundef %indvars.iv575)
          to label %616 unwind label %.loopexit581

616:                                              ; preds = %614
  %617 = extractvalue { ptr, i64 } %615, 0
  store ptr %617, ptr %53, align 8
  %618 = extractvalue { ptr, i64 } %615, 1
  store i64 %618, ptr %544, align 8
  %619 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %53) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %53) #10
  br i1 %619, label %623, label %620

620:                                              ; preds = %616
  %621 = invoke noundef i32 @_ZN7Riemann11DynamicMesh14RemoveTriangleEibb(ptr noundef nonnull align 8 dereferenceable(452) %545, i32 noundef %612, i1 noundef zeroext true, i1 noundef zeroext false)
          to label %623 unwind label %.loopexit586

.loopexit586:                                     ; preds = %620
  %lpad.loopexit588 = landingpad { ptr, i32 }
          cleanup
  br label %626

.loopexit.split-lp587:                            ; preds = %597
  %lpad.loopexit.split-lp589 = landingpad { ptr, i32 }
          cleanup
  br label %626

.loopexit581:                                     ; preds = %614
  %lpad.loopexit583 = landingpad { ptr, i32 }
          cleanup
  br label %622

.loopexit.split-lp582:                            ; preds = %591
  %lpad.loopexit.split-lp584 = landingpad { ptr, i32 }
          cleanup
  br label %622

622:                                              ; preds = %.loopexit.split-lp582, %.loopexit581
  %lpad.phi585 = phi { ptr, i32 } [ %lpad.loopexit583, %.loopexit581 ], [ %lpad.loopexit.split-lp584, %.loopexit.split-lp582 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %53) #10
  br label %626

.critedge7:                                       ; preds = %.lr.ph512
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %53) #10
  br label %623

623:                                              ; preds = %616, %.critedge7, %620
  %indvars.iv.next576 = add nuw nsw i64 %indvars.iv575, 1
  %624 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %28) #10
  %625 = icmp ugt i64 %624, %indvars.iv.next576
  br i1 %625, label %.lr.ph512, label %._crit_edge513, !llvm.loop !63

626:                                              ; preds = %.loopexit586, %.loopexit.split-lp587, %622, %495, %497, %586, %468, %330
  %.pn430.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn430.pn.pn.pn, %468 ], [ %.pn414, %586 ], [ %331, %330 ], [ %498, %497 ], [ %496, %495 ], [ %lpad.phi585, %622 ], [ %lpad.loopexit588, %.loopexit586 ], [ %lpad.loopexit.split-lp589, %.loopexit.split-lp587 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %29) #10
  %627 = getelementptr inbounds i8, ptr %28, i64 40
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %627) #10
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %28) #10
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %28) #10
  br label %959

628:                                              ; preds = %._crit_edge513.1, %._crit_edge526
  %629 = phi i1 [ false, %._crit_edge513.1 ], [ true, %._crit_edge526 ]
  %630 = phi i1 [ true, %._crit_edge513.1 ], [ false, %._crit_edge526 ]
  %indvars.iv591.sroa.phi = phi ptr [ %89, %._crit_edge513.1 ], [ %indvars.iv591.sroa.gep604, %._crit_edge526 ]
  %indvars.iv591.sroa.phi605 = phi ptr [ %55, %._crit_edge513.1 ], [ %indvars.iv591.sroa.gep607, %._crit_edge526 ]
  %indvars.iv591.sroa.phi609 = phi ptr [ %27, %._crit_edge513.1 ], [ %indvars.iv591.sroa.gep611, %._crit_edge526 ]
  %indvars.iv591.sroa.phi619 = phi ptr [ %3, %._crit_edge513.1 ], [ %indvars.iv591.sroa.gep621, %._crit_edge526 ]
  %indvars.iv591.sroa.phi622 = phi ptr [ %3, %._crit_edge513.1 ], [ %indvars.iv591.sroa.gep624, %._crit_edge526 ]
  %indvars.iv591 = phi i64 [ 1, %._crit_edge513.1 ], [ 0, %._crit_edge526 ]
  %631 = getelementptr inbounds [2 x ptr], ptr %3, i64 0, i64 %indvars.iv591
  %632 = load ptr, ptr %631, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %56) #10
  %633 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNK7Riemann11DynamicMesh9GetBoundsEv(ptr noundef nonnull align 8 dereferenceable(452) %632)
  %634 = invoke noundef float @_ZNK5Maths6TAABB3IfE6MaxDimEv(ptr noundef nonnull align 4 dereferenceable(24) %633)
          to label %635 unwind label %645

635:                                              ; preds = %628
  %636 = fmul float %634, 1.562500e-02
  invoke void @_ZN7Riemann18SparseSpatialHash3IiEC2Efi(ptr noundef nonnull align 8 dereferenceable(64) %56, float noundef %636, i32 noundef 1024)
          to label %637 unwind label %645

637:                                              ; preds = %635
  %638 = getelementptr inbounds [2 x %"class.std::set"], ptr %27, i64 0, i64 %indvars.iv591
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %57) #10
  %639 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %638) #10
  store ptr %639, ptr %57, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %58) #10
  %640 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %638) #10
  store ptr %640, ptr %58, align 8
  %641 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull align 8 dereferenceable(8) %58) #10
  br i1 %641, label %.lr.ph516, label %._crit_edge517

._crit_edge517:                                   ; preds = %650, %637
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %58) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %57) #10
  call void @llvm.lifetime.start.p0(i64 272, ptr nonnull %61) #10
  %642 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNK7Riemann11DynamicMesh9GetBoundsEv(ptr noundef nonnull align 8 dereferenceable(452) %632)
  %643 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNK7Riemann11DynamicMesh9GetBoundsEv(ptr noundef nonnull align 8 dereferenceable(452) %632)
  %644 = getelementptr inbounds i8, ptr %643, i64 12
  invoke void @_ZN7Riemann12SparseOctreeC1ERKN5Maths8TVector3IfEES5_i(ptr noundef nonnull align 8 dereferenceable(268) %61, ptr noundef nonnull align 4 dereferenceable(12) %642, ptr noundef nonnull align 4 dereferenceable(12) %644, i32 noundef 7)
          to label %655 unwind label %663

645:                                              ; preds = %635, %628
  %646 = landingpad { ptr, i32 }
          cleanup
  br label %827

.lr.ph516:                                        ; preds = %637, %650
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %59) #10
  %647 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %57) #10
  %648 = load i32, ptr %647, align 4, !tbaa !44
  store i32 %648, ptr %59, align 4, !tbaa !44
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %60) #10
  invoke void @_ZNK7Riemann11DynamicMesh9GetVertexEi(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %60, ptr noundef nonnull align 8 dereferenceable(452) %632, i32 noundef %648)
          to label %649 unwind label %653

649:                                              ; preds = %.lr.ph516
  invoke void @_ZN7Riemann18SparseSpatialHash3IiE6InsertERKN5Maths8TVector3IfEERKi(ptr noundef nonnull align 8 dereferenceable(64) %56, ptr noundef nonnull align 4 dereferenceable(12) %60, ptr noundef nonnull align 4 dereferenceable(4) %59)
          to label %650 unwind label %653

650:                                              ; preds = %649
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %60) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %59) #10
  %651 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %57) #10
  %652 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull align 8 dereferenceable(8) %58) #10
  br i1 %652, label %.lr.ph516, label %._crit_edge517

653:                                              ; preds = %649, %.lr.ph516
  %654 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %60) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %59) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %58) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %57) #10
  br label %826

655:                                              ; preds = %._crit_edge517
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %62) #10
  store ptr %61, ptr %62, align 8, !tbaa !5
  store ptr %632, ptr %605, align 8, !tbaa !5
  store ptr %632, ptr %606, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %63) #10
  store ptr %61, ptr %63, align 8, !tbaa !5
  store ptr %632, ptr %607, align 8, !tbaa !5
  store ptr %632, ptr %608, align 8, !tbaa !5
  %656 = getelementptr inbounds [2 x %"class.std::vector"], ptr %26, i64 0, i64 %indvars.iv591
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %64) #10
  %657 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %656) #10
  store ptr %657, ptr %64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %65) #10
  %658 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %656) #10
  store ptr %658, ptr %65, align 8
  %659 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull align 8 dereferenceable(8) %65) #10
  br i1 %659, label %.lr.ph519, label %._crit_edge520

._crit_edge520:                                   ; preds = %667, %655
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %65) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %64) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %66) #10
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %66) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %67) #10
  %660 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %indvars.iv591.sroa.phi609) #10
  store ptr %660, ptr %67, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %68) #10
  %661 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %indvars.iv591.sroa.phi609) #10
  store ptr %661, ptr %68, align 8
  %662 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull align 8 dereferenceable(8) %68) #10
  br i1 %662, label %.lr.ph522, label %._crit_edge523

663:                                              ; preds = %._crit_edge517
  %664 = landingpad { ptr, i32 }
          cleanup
  br label %825

.lr.ph519:                                        ; preds = %655, %667
  %665 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %64) #10
  %666 = load i32, ptr %665, align 4, !tbaa !44
  invoke void @"_ZZN7Riemann15GeometryBoolean7ComputeEvENK3$_2clEi"(ptr noundef nonnull align 8 dereferenceable(24) %62, i32 noundef %666)
          to label %667 unwind label %670

667:                                              ; preds = %.lr.ph519
  %668 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %64) #10
  %669 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull align 8 dereferenceable(8) %65) #10
  br i1 %669, label %.lr.ph519, label %._crit_edge520

670:                                              ; preds = %.lr.ph519
  %671 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %65) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %64) #10
  br label %824

._crit_edge523:                                   ; preds = %795, %._crit_edge520
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %68) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %67) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %86) #10
  %672 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %indvars.iv591.sroa.phi605) #10
  store ptr %672, ptr %86, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %87) #10
  %673 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %indvars.iv591.sroa.phi605) #10
  store ptr %673, ptr %87, align 8
  %674 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiiEES5_(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef nonnull align 8 dereferenceable(8) %87) #10
  br i1 %674, label %.lr.ph525, label %._crit_edge526

.lr.ph525:                                        ; preds = %._crit_edge523
  %675 = getelementptr inbounds [2 x i32], ptr %89, i64 0, i64 %indvars.iv591
  br label %805

.lr.ph522:                                        ; preds = %._crit_edge520, %795
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %69) #10
  %676 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %67) #10
  %677 = load i32, ptr %676, align 4, !tbaa !44
  store i32 %677, ptr %69, align 4, !tbaa !44
  br i1 %629, label %678, label %683

678:                                              ; preds = %.lr.ph522
  %679 = invoke noundef i64 @_ZNKSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5countERS3_(ptr noundef nonnull align 8 dereferenceable(48) %55, ptr noundef nonnull align 4 dereferenceable(4) %69)
          to label %680 unwind label %681

680:                                              ; preds = %678
  %.not = icmp eq i64 %679, 0
  br i1 %.not, label %._crit_edge594, label %795

._crit_edge594:                                   ; preds = %680
  %.pre = load i32, ptr %69, align 4, !tbaa !44
  br label %683

681:                                              ; preds = %678
  %682 = landingpad { ptr, i32 }
          cleanup
  br label %800

683:                                              ; preds = %._crit_edge594, %.lr.ph522
  %684 = phi i32 [ %.pre, %._crit_edge594 ], [ %677, %.lr.ph522 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %70) #10
  %685 = load ptr, ptr %indvars.iv591.sroa.phi619, align 8, !tbaa !5
  invoke void @_ZNK7Riemann11DynamicMesh9GetVertexEi(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %70, ptr noundef nonnull align 8 dereferenceable(452) %685, i32 noundef %684)
          to label %686 unwind label %715

686:                                              ; preds = %683
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %71) #10
  store i32 -1, ptr %71, align 4, !tbaa !44
  %687 = load float, ptr %166, align 4, !tbaa !35
  %688 = invoke noundef zeroext i1 @_ZN7Riemann18SparseSpatialHash3IiE11FindNearestERKN5Maths8TVector3IfEEfRi(ptr noundef nonnull align 8 dereferenceable(64) %56, ptr noundef nonnull align 4 dereferenceable(12) %70, float noundef %687, ptr noundef nonnull align 4 dereferenceable(4) %71)
          to label %689 unwind label %717

689:                                              ; preds = %686
  %.pre596 = load i32, ptr %71, align 4, !tbaa !44
  br i1 %688, label %690, label %737

690:                                              ; preds = %689
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %72) #10
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %73) #10
  invoke void @_ZNK7Riemann11DynamicMesh9GetVertexEi(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %73, ptr noundef nonnull align 8 dereferenceable(452) %632, i32 noundef %.pre596)
          to label %691 unwind label %719

691:                                              ; preds = %690
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %72, ptr noundef nonnull align 4 dereferenceable(12) %73, ptr noundef nonnull align 4 dereferenceable(12) %70)
          to label %692 unwind label %719

692:                                              ; preds = %691
  %693 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %72)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %73) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %72) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %74) #10
  %694 = invoke ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE4findERS3_(ptr noundef nonnull align 8 dereferenceable(48) %indvars.iv591.sroa.phi605, ptr noundef nonnull align 4 dereferenceable(4) %71)
          to label %695 unwind label %721

695:                                              ; preds = %692
  store ptr %694, ptr %74, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %75) #10
  %696 = call ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %indvars.iv591.sroa.phi605) #10
  store ptr %696, ptr %75, align 8
  %697 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiiEES5_(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull align 8 dereferenceable(8) %75) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %75) #10
  br i1 %697, label %698, label %733

698:                                              ; preds = %695
  %699 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %74) #10
  %700 = getelementptr inbounds i8, ptr %699, i64 4
  %701 = load i32, ptr %700, align 4, !tbaa !64
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %76) #10
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %77) #10
  %702 = load ptr, ptr %indvars.iv591.sroa.phi619, align 8, !tbaa !5
  invoke void @_ZNK7Riemann11DynamicMesh9GetVertexEi(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %77, ptr noundef nonnull align 8 dereferenceable(452) %702, i32 noundef %701)
          to label %703 unwind label %723

703:                                              ; preds = %698
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %78) #10
  %704 = load i32, ptr %71, align 4, !tbaa !44
  invoke void @_ZNK7Riemann11DynamicMesh9GetVertexEi(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %78, ptr noundef nonnull align 8 dereferenceable(452) %632, i32 noundef %704)
          to label %705 unwind label %725

705:                                              ; preds = %703
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %76, ptr noundef nonnull align 4 dereferenceable(12) %77, ptr noundef nonnull align 4 dereferenceable(12) %78)
          to label %706 unwind label %725

706:                                              ; preds = %705
  %707 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %76)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %78) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %77) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %76) #10
  %708 = fcmp olt float %693, %707
  br i1 %708, label %709, label %732

709:                                              ; preds = %706
  %710 = invoke { ptr, i8 } @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE7emplaceIJRiS8_EEES2_ISt17_Rb_tree_iteratorIS4_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(48) %indvars.iv591.sroa.phi605, ptr noundef nonnull align 4 dereferenceable(4) %71, ptr noundef nonnull align 4 dereferenceable(4) %69)
          to label %711 unwind label %728

711:                                              ; preds = %709
  store i32 %701, ptr %69, align 4, !tbaa !44
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %79) #10
  %712 = load ptr, ptr %indvars.iv591.sroa.phi619, align 8, !tbaa !5
  invoke void @_ZNK7Riemann11DynamicMesh9GetVertexEi(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %79, ptr noundef nonnull align 8 dereferenceable(452) %712, i32 noundef %701)
          to label %713 unwind label %730

713:                                              ; preds = %711
  %714 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %70, ptr noundef nonnull align 4 dereferenceable(12) %79)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %79) #10
  br label %732

715:                                              ; preds = %683
  %716 = landingpad { ptr, i32 }
          cleanup
  br label %799

717:                                              ; preds = %686
  %718 = landingpad { ptr, i32 }
          cleanup
  br label %798

719:                                              ; preds = %691, %690
  %720 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %73) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %72) #10
  br label %798

721:                                              ; preds = %733, %692
  %722 = landingpad { ptr, i32 }
          cleanup
  br label %736

723:                                              ; preds = %698
  %724 = landingpad { ptr, i32 }
          cleanup
  br label %727

725:                                              ; preds = %705, %703
  %726 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %78) #10
  br label %727

727:                                              ; preds = %725, %723
  %.pn378 = phi { ptr, i32 } [ %726, %725 ], [ %724, %723 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %77) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %76) #10
  br label %736

728:                                              ; preds = %709
  %729 = landingpad { ptr, i32 }
          cleanup
  br label %736

730:                                              ; preds = %711
  %731 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %79) #10
  br label %736

732:                                              ; preds = %713, %706
  store i32 -1, ptr %71, align 4, !tbaa !44
  br label %735

733:                                              ; preds = %695
  %734 = invoke { ptr, i8 } @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE7emplaceIJRiS8_EEES2_ISt17_Rb_tree_iteratorIS4_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(48) %indvars.iv591.sroa.phi605, ptr noundef nonnull align 4 dereferenceable(4) %71, ptr noundef nonnull align 4 dereferenceable(4) %69)
          to label %._crit_edge597 unwind label %721

._crit_edge597:                                   ; preds = %733
  %.pre595.pre = load i32, ptr %71, align 4, !tbaa !44
  br label %735

735:                                              ; preds = %._crit_edge597, %732
  %.pre595 = phi i32 [ %.pre595.pre, %._crit_edge597 ], [ -1, %732 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %74) #10
  br label %737

736:                                              ; preds = %727, %730, %728, %721
  %.pn380.pn.pn = phi { ptr, i32 } [ %722, %721 ], [ %.pn378, %727 ], [ %731, %730 ], [ %729, %728 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %74) #10
  br label %798

737:                                              ; preds = %735, %689
  %738 = phi i32 [ %.pre595, %735 ], [ %.pre596, %689 ]
  %739 = icmp eq i32 %738, -1
  br i1 %739, label %740, label %794

740:                                              ; preds = %737
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %80) #10
  %741 = load float, ptr %166, align 4, !tbaa !35
  invoke void @_ZN5Maths6TAABB3IfEC2ERKNS_8TVector3IfEEf(ptr noundef nonnull align 4 dereferenceable(24) %80, ptr noundef nonnull align 4 dereferenceable(12) %70, float noundef %741)
          to label %742 unwind label %771

742:                                              ; preds = %740
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %66) #10
  invoke void @_ZNK7Riemann12SparseOctree10RangeQueryERKN5Maths6TAABB3IfEERSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(268) %61, ptr noundef nonnull align 4 dereferenceable(24) %80, ptr noundef nonnull align 8 dereferenceable(24) %66)
          to label %743 unwind label %771

743:                                              ; preds = %742
  %744 = invoke noundef i32 @_ZN7RiemannL15FindNearestEdgeERKNS_11DynamicMeshERKSt6vectorIiSaIiEERKN5Maths8TVector3IfEE(ptr noundef nonnull align 8 dereferenceable(452) %632, ptr noundef nonnull align 8 dereferenceable(24) %66, ptr noundef nonnull align 4 dereferenceable(12) %70)
          to label %745 unwind label %773

745:                                              ; preds = %743
  %.not385 = icmp eq i32 %744, -1
  br i1 %.not385, label %792, label %746

746:                                              ; preds = %745
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %81) #10
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %81)
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %609)
  invoke void @_ZNK7Riemann11DynamicMesh8GetEdgeVEiRN5Maths8TVector3IfEES4_(ptr noundef nonnull align 8 dereferenceable(452) %632, i32 noundef %744, ptr noundef nonnull align 4 dereferenceable(12) %81, ptr noundef nonnull align 4 dereferenceable(12) %609)
          to label %747 unwind label %775

747:                                              ; preds = %746
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %82) #10
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %83) #10
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %82, ptr noundef nonnull align 4 dereferenceable(12) %81, ptr noundef nonnull align 4 dereferenceable(12) %70)
          to label %748 unwind label %777

748:                                              ; preds = %747
  %749 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %82)
  %750 = fcmp ogt float %749, %604
  br i1 %750, label %751, label %.critedge9

751:                                              ; preds = %748
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %83, ptr noundef nonnull align 4 dereferenceable(12) %609, ptr noundef nonnull align 4 dereferenceable(12) %70)
          to label %752 unwind label %779

752:                                              ; preds = %751
  %753 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %83)
  %754 = fcmp ogt float %753, %604
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %83) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %82) #10
  br i1 %754, label %755, label %790

755:                                              ; preds = %752
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %84) #10
  invoke void @_ZN7Riemann8Segment3C2ERKN5Maths8TVector3IfEES5_(ptr noundef nonnull align 4 dereferenceable(24) %84, ptr noundef nonnull align 4 dereferenceable(12) %81, ptr noundef nonnull align 4 dereferenceable(12) %609)
          to label %756 unwind label %782

756:                                              ; preds = %755
  %757 = invoke noundef float @_ZNK7Riemann8Segment316ProjectUnitRangeERKN5Maths8TVector3IfEE(ptr noundef nonnull align 4 dereferenceable(24) %84, ptr noundef nonnull align 4 dereferenceable(12) %70)
          to label %758 unwind label %784

758:                                              ; preds = %756
  call void @llvm.lifetime.start.p0(i64 60, ptr nonnull %85) #10
  invoke void @_ZN7Riemann14FEdgeSplitInfoC2Ev(ptr noundef nonnull align 4 dereferenceable(60) %85)
          to label %759 unwind label %786

759:                                              ; preds = %758
  %760 = invoke noundef i32 @_ZN7Riemann11DynamicMesh9SplitEdgeEiRNS_14FEdgeSplitInfoEf(ptr noundef nonnull align 8 dereferenceable(452) %632, i32 noundef %744, ptr noundef nonnull align 4 dereferenceable(60) %85, float noundef %757)
          to label %761 unwind label %786

761:                                              ; preds = %759
  %762 = icmp eq i32 %760, 0
  br i1 %762, label %763, label %788

763:                                              ; preds = %761
  %764 = invoke { ptr, i8 } @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE7emplaceIJRiS8_EEES2_ISt17_Rb_tree_iteratorIS4_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(48) %indvars.iv591.sroa.phi605, ptr noundef nonnull align 4 dereferenceable(4) %610, ptr noundef nonnull align 4 dereferenceable(4) %69)
          to label %765 unwind label %786

765:                                              ; preds = %763
  %766 = load i32, ptr %610, align 4, !tbaa !66
  invoke void @_ZN7Riemann11DynamicMesh9SetVertexEiRKN5Maths8TVector3IfEE(ptr noundef nonnull align 8 dereferenceable(452) %632, i32 noundef %766, ptr noundef nonnull align 4 dereferenceable(12) %70)
          to label %767 unwind label %786

767:                                              ; preds = %765
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %656, ptr noundef nonnull align 4 dereferenceable(4) %611)
          to label %768 unwind label %786

768:                                              ; preds = %767
  invoke void @"_ZZN7Riemann15GeometryBoolean7ComputeEvENK3$_3clEi"(ptr noundef nonnull align 8 dereferenceable(24) %63, i32 noundef %744)
          to label %769 unwind label %786

769:                                              ; preds = %768
  %770 = load i32, ptr %611, align 4, !tbaa !69
  invoke void @"_ZZN7Riemann15GeometryBoolean7ComputeEvENK3$_2clEi"(ptr noundef nonnull align 8 dereferenceable(24) %62, i32 noundef %770)
          to label %788 unwind label %786

771:                                              ; preds = %742, %740
  %772 = landingpad { ptr, i32 }
          cleanup
  br label %793

773:                                              ; preds = %743
  %774 = landingpad { ptr, i32 }
          cleanup
  br label %793

775:                                              ; preds = %746
  %776 = landingpad { ptr, i32 }
          cleanup
  br label %791

777:                                              ; preds = %747
  %778 = landingpad { ptr, i32 }
          cleanup
  br label %781

779:                                              ; preds = %751
  %780 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %83) #10
  br label %781

781:                                              ; preds = %779, %777
  %.pn390 = phi { ptr, i32 } [ %780, %779 ], [ %778, %777 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %82) #10
  br label %791

782:                                              ; preds = %755
  %783 = landingpad { ptr, i32 }
          cleanup
  br label %789

784:                                              ; preds = %756
  %785 = landingpad { ptr, i32 }
          cleanup
  br label %789

786:                                              ; preds = %769, %768, %767, %765, %763, %759, %758
  %787 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 60, ptr nonnull %85) #10
  br label %789

788:                                              ; preds = %769, %761
  call void @llvm.lifetime.end.p0(i64 60, ptr nonnull %85) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %84) #10
  br label %790

789:                                              ; preds = %784, %786, %782
  %.pn392.pn = phi { ptr, i32 } [ %783, %782 ], [ %787, %786 ], [ %785, %784 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %84) #10
  br label %791

.critedge9:                                       ; preds = %748
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %83) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %82) #10
  br label %790

790:                                              ; preds = %.critedge9, %788, %752
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %81) #10
  br label %792

791:                                              ; preds = %789, %781, %775
  %.pn392.pn.pn = phi { ptr, i32 } [ %.pn392.pn, %789 ], [ %.pn390, %781 ], [ %776, %775 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %81) #10
  br label %793

792:                                              ; preds = %790, %745
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %80) #10
  br label %794

793:                                              ; preds = %773, %791, %771
  %.pn392.pn.pn.pn.pn = phi { ptr, i32 } [ %772, %771 ], [ %.pn392.pn.pn, %791 ], [ %774, %773 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %80) #10
  br label %798

794:                                              ; preds = %792, %737
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %71) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %70) #10
  br label %795

795:                                              ; preds = %680, %794
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %69) #10
  %796 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %67) #10
  %797 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull align 8 dereferenceable(8) %68) #10
  br i1 %797, label %.lr.ph522, label %._crit_edge523

798:                                              ; preds = %719, %736, %793, %717
  %.pn392.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn392.pn.pn.pn.pn, %793 ], [ %718, %717 ], [ %.pn380.pn.pn, %736 ], [ %720, %719 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %71) #10
  br label %799

799:                                              ; preds = %798, %715
  %.pn392.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn392.pn.pn.pn.pn.pn, %798 ], [ %716, %715 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %70) #10
  br label %800

800:                                              ; preds = %799, %681
  %.pn392.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn392.pn.pn.pn.pn.pn.pn, %799 ], [ %682, %681 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %69) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %68) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %67) #10
  br label %823

._crit_edge526:                                   ; preds = %815, %._crit_edge523
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %87) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %86) #10
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %66) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %66) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %63) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %62) #10
  call void @_ZN7Riemann12SparseOctreeD2Ev(ptr noundef nonnull align 8 dereferenceable(268) %61) #10
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %61) #10
  call void @_ZN7Riemann18SparseSpatialHash3IiED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %56) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %56) #10
  br i1 %630, label %628, label %.preheader.preheader, !llvm.loop !70

.preheader.preheader:                             ; preds = %._crit_edge526
  %801 = getelementptr inbounds i8, ptr %55, i64 48
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %801) #10
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %55) #10
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %55) #10
  %802 = getelementptr inbounds i8, ptr %0, i64 9
  %803 = load i8, ptr %802, align 1, !tbaa !71, !range !40, !noundef !41
  %804 = trunc nuw i8 %803 to i1
  br i1 %804, label %829, label %832

805:                                              ; preds = %.lr.ph525, %815
  %806 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %86) #10
  %807 = load ptr, ptr %indvars.iv591.sroa.phi622, align 8, !tbaa !5
  %808 = getelementptr inbounds i8, ptr %806, i64 4
  %809 = load i32, ptr %808, align 4, !tbaa !64
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %88) #10
  %810 = load i32, ptr %806, align 4, !tbaa !72
  invoke void @_ZNK7Riemann11DynamicMesh9GetVertexEi(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %88, ptr noundef nonnull align 8 dereferenceable(452) %632, i32 noundef %810)
          to label %811 unwind label %818

811:                                              ; preds = %805
  invoke void @_ZN7Riemann11DynamicMesh9SetVertexEiRKN5Maths8TVector3IfEE(ptr noundef nonnull align 8 dereferenceable(452) %807, i32 noundef %809, ptr noundef nonnull align 4 dereferenceable(12) %88)
          to label %812 unwind label %818

812:                                              ; preds = %811
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %88) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %89) #10
  %813 = load <2 x i32>, ptr %806, align 4, !tbaa !44
  store <2 x i32> %813, ptr %89, align 8, !tbaa !44
  %814 = invoke { ptr, i8 } @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE7emplaceIJRiS8_EEES2_ISt17_Rb_tree_iteratorIS4_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(48) %54, ptr noundef nonnull align 4 dereferenceable(4) %675, ptr noundef nonnull align 4 dereferenceable(4) %indvars.iv591.sroa.phi)
          to label %815 unwind label %820

815:                                              ; preds = %812
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %89) #10
  %816 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %86) #10
  %817 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiiEES5_(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef nonnull align 8 dereferenceable(8) %87) #10
  br i1 %817, label %805, label %._crit_edge526

818:                                              ; preds = %811, %805
  %819 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %88) #10
  br label %822

820:                                              ; preds = %812
  %821 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %89) #10
  br label %822

822:                                              ; preds = %820, %818
  %.pn376 = phi { ptr, i32 } [ %821, %820 ], [ %819, %818 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %87) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %86) #10
  br label %823

823:                                              ; preds = %822, %800
  %.pn392.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn392.pn.pn.pn.pn.pn.pn.pn, %800 ], [ %.pn376, %822 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %66) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %66) #10
  br label %824

824:                                              ; preds = %823, %670
  %.pn402 = phi { ptr, i32 } [ %671, %670 ], [ %.pn392.pn.pn.pn.pn.pn.pn.pn.pn, %823 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %63) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %62) #10
  call void @_ZN7Riemann12SparseOctreeD2Ev(ptr noundef nonnull align 8 dereferenceable(268) %61) #10
  br label %825

825:                                              ; preds = %824, %663
  %.pn402.pn = phi { ptr, i32 } [ %.pn402, %824 ], [ %664, %663 ]
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %61) #10
  br label %826

826:                                              ; preds = %825, %653
  %.pn405 = phi { ptr, i32 } [ %654, %653 ], [ %.pn402.pn, %825 ]
  call void @_ZN7Riemann18SparseSpatialHash3IiED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %56) #10
  br label %827

827:                                              ; preds = %826, %645
  %.pn405.pn = phi { ptr, i32 } [ %.pn405, %826 ], [ %646, %645 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %56) #10
  %828 = getelementptr inbounds i8, ptr %55, i64 48
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %828) #10
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %55) #10
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %55) #10
  br label %958

829:                                              ; preds = %.preheader.preheader
  invoke void @_ZN7Riemann21SimplifyAlongNewEdgesEiPPNS_11DynamicMeshEPSt6vectorIiSaIiEERSt3mapIiiSt4lessIiESaISt4pairIKiiEEEPNS_15GeometryBooleanE(i32 noundef 2, ptr noundef nonnull %3, ptr noundef nonnull %26, ptr noundef nonnull align 8 dereferenceable(48) %54, ptr noundef nonnull %0)
          to label %832 unwind label %830

830:                                              ; preds = %946, %829
  %831 = landingpad { ptr, i32 }
          cleanup
  br label %958

832:                                              ; preds = %829, %.preheader.preheader
  %833 = load i32, ptr %0, align 8, !tbaa !51
  %834 = icmp eq i32 %833, 1
  br i1 %834, label %835, label %856

835:                                              ; preds = %832
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %90) #10
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %90) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %91) #10
  store i32 0, ptr %91, align 4, !tbaa !44
  %836 = load ptr, ptr %116, align 8, !tbaa !5
  %837 = call noundef i32 @_ZNK7Riemann11DynamicMesh16GetTriangleCountEv(ptr noundef nonnull align 8 dereferenceable(452) %836)
  %838 = icmp sgt i32 %837, 0
  br i1 %838, label %.lr.ph529, label %._crit_edge530

._crit_edge530:                                   ; preds = %846, %835
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %91) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %92) #10
  %839 = load ptr, ptr %116, align 8, !tbaa !5
  call void @_ZN7Riemann18FDynamicMeshEditorC2EPNS_11DynamicMeshE(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef %839)
  invoke void @_ZN7Riemann18FDynamicMeshEditor27ReverseTriangleOrientationsERKSt6vectorIiSaIiEEb(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef nonnull align 8 dereferenceable(24) %90, i1 noundef zeroext true)
          to label %852 unwind label %853

840:                                              ; preds = %845
  %841 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %91) #10
  br label %855

.lr.ph529:                                        ; preds = %835, %846
  %842 = load ptr, ptr %116, align 8, !tbaa !5
  %843 = load i32, ptr %91, align 4, !tbaa !44
  %844 = call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsTriangleFastEi(ptr noundef nonnull align 8 dereferenceable(452) %842, i32 noundef %843)
  br i1 %844, label %845, label %846

845:                                              ; preds = %.lr.ph529
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %90, ptr noundef nonnull align 4 dereferenceable(4) %91)
          to label %846 unwind label %840

846:                                              ; preds = %845, %.lr.ph529
  %847 = load i32, ptr %91, align 4, !tbaa !44
  %848 = add nsw i32 %847, 1
  store i32 %848, ptr %91, align 4, !tbaa !44
  %849 = load ptr, ptr %116, align 8, !tbaa !5
  %850 = call noundef i32 @_ZNK7Riemann11DynamicMesh16GetTriangleCountEv(ptr noundef nonnull align 8 dereferenceable(452) %849)
  %851 = icmp slt i32 %848, %850
  br i1 %851, label %.lr.ph529, label %._crit_edge530, !llvm.loop !73

852:                                              ; preds = %._crit_edge530
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %92) #10
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %90) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %90) #10
  br label %856

853:                                              ; preds = %._crit_edge530
  %854 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %92) #10
  br label %855

855:                                              ; preds = %853, %840
  %.pn373 = phi { ptr, i32 } [ %841, %840 ], [ %854, %853 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %90) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %90) #10
  br label %958

856:                                              ; preds = %832, %852
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %93) #10
  %857 = load ptr, ptr %111, align 8, !tbaa !9
  call void @_ZN7Riemann18FDynamicMeshEditorC2EPNS_11DynamicMeshE(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef %857)
  call void @llvm.lifetime.start.p0(i64 464, ptr nonnull %94) #10
  invoke void @_ZN7Riemann18FMeshIndexMappingsC2Ev(ptr noundef nonnull align 8 dereferenceable(464) %94)
          to label %858 unwind label %868

858:                                              ; preds = %856
  %859 = load ptr, ptr %116, align 8, !tbaa !5
  call void @_ZNSt8functionIFN5Maths8TVector3IfEEiRKS2_EEC2EDn(ptr noundef nonnull align 8 dereferenceable(32) %95, ptr null) #10
  call void @_ZNSt8functionIFN5Maths8TVector3IfEEiRKS2_EEC2EDn(ptr noundef nonnull align 8 dereferenceable(32) %96, ptr null) #10
  invoke void @_ZN7Riemann18FDynamicMeshEditor10AppendMeshEPKNS_11DynamicMeshERNS_18FMeshIndexMappingsESt8functionIFN5Maths8TVector3IfEEiRKS9_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef %859, ptr noundef nonnull align 8 dereferenceable(464) %94, ptr noundef nonnull %95, ptr noundef nonnull %96)
          to label %860 unwind label %870

860:                                              ; preds = %858
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %96) #10
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %95) #10
  %861 = getelementptr inbounds i8, ptr %0, i64 232
  %862 = load i8, ptr %861, align 8, !tbaa !74, !range !40, !noundef !41
  %863 = trunc nuw i8 %862 to i1
  br i1 %863, label %864, label %874

864:                                              ; preds = %860
  %865 = call noundef nonnull align 8 dereferenceable(98) ptr @_ZN7Riemann18FMeshIndexMappings11GetGroupMapEv(ptr noundef nonnull align 8 dereferenceable(464) %94)
  %866 = getelementptr inbounds i8, ptr %0, i64 240
  %867 = invoke noundef nonnull align 8 dereferenceable(98) ptr @_ZN7Riemann10FIndexMapiaSERKS0_(ptr noundef nonnull align 8 dereferenceable(98) %866, ptr noundef nonnull align 8 dereferenceable(98) %865)
          to label %874 unwind label %872

868:                                              ; preds = %856
  %869 = landingpad { ptr, i32 }
          cleanup
  br label %926

870:                                              ; preds = %858
  %871 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %96) #10
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %95) #10
  br label %925

872:                                              ; preds = %882, %864
  %873 = landingpad { ptr, i32 }
          cleanup
  br label %925

874:                                              ; preds = %864, %860
  %875 = getelementptr inbounds i8, ptr %0, i64 10
  %876 = load i8, ptr %875, align 2, !tbaa !75, !range !40, !noundef !41
  %877 = trunc nuw i8 %876 to i1
  br i1 %877, label %878, label %882

878:                                              ; preds = %874
  %879 = invoke noundef zeroext i1 @_ZN7Riemann10MergeEdgesERKNS_18FMeshIndexMappingsEPPNS_11DynamicMeshEPKSt6vectorIiSaIiEERKSt3mapIiiSt4lessIiESaISt4pairIKiiEEEPNS_15GeometryBooleanE(ptr noundef nonnull align 8 dereferenceable(464) %94, ptr noundef nonnull %3, ptr noundef nonnull %26, ptr noundef nonnull align 8 dereferenceable(48) %54, ptr noundef nonnull %0)
          to label %921 unwind label %880

880:                                              ; preds = %878
  %881 = landingpad { ptr, i32 }
          cleanup
  br label %925

882:                                              ; preds = %874
  %883 = getelementptr inbounds i8, ptr %0, i64 160
  %884 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %883, ptr noundef nonnull align 8 dereferenceable(24) %26)
          to label %885 unwind label %872

885:                                              ; preds = %882
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %97) #10
  %886 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1) #10
  store ptr %886, ptr %97, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %98) #10
  %887 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1) #10
  store ptr %887, ptr %98, align 8
  %888 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %97, ptr noundef nonnull align 8 dereferenceable(8) %98) #10
  br i1 %888, label %.lr.ph532, label %._crit_edge533

.lr.ph532:                                        ; preds = %885
  %889 = getelementptr inbounds i8, ptr %99, i64 4
  br label %890

._crit_edge533:                                   ; preds = %917, %885
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %98) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %97) #10
  br label %921

890:                                              ; preds = %.lr.ph532, %917
  %891 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %97) #10
  %892 = load i32, ptr %891, align 4, !tbaa !44
  %893 = load ptr, ptr %116, align 8, !tbaa !5
  %894 = call noundef zeroext i1 @_ZNK7Riemann11DynamicMesh6IsEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %893, i32 noundef %892)
  br i1 %894, label %896, label %895

895:                                              ; preds = %890
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 2628, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7Riemann15GeometryBoolean7ComputeEv) #13
  unreachable

896:                                              ; preds = %890
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %99) #10
  %897 = load ptr, ptr %116, align 8, !tbaa !5
  invoke void @_ZNK7Riemann11DynamicMesh8GetEdgeVEi(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TIndex2") align 4 %99, ptr noundef nonnull align 8 dereferenceable(452) %897, i32 noundef %892)
          to label %898 unwind label %912

898:                                              ; preds = %896
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %100) #10
  %899 = load ptr, ptr %111, align 8, !tbaa !9
  %900 = load i32, ptr %99, align 4, !tbaa !49
  %901 = invoke noundef i32 @_ZNK7Riemann18FMeshIndexMappings12GetNewVertexEi(ptr noundef nonnull align 8 dereferenceable(464) %94, i32 noundef %900)
          to label %902 unwind label %914

902:                                              ; preds = %898
  %903 = load i32, ptr %889, align 4, !tbaa !47
  %904 = invoke noundef i32 @_ZNK7Riemann18FMeshIndexMappings12GetNewVertexEi(ptr noundef nonnull align 8 dereferenceable(464) %94, i32 noundef %903)
          to label %905 unwind label %914

905:                                              ; preds = %902
  %906 = invoke noundef i32 @_ZNK7Riemann11DynamicMesh8FindEdgeEii(ptr noundef nonnull align 8 dereferenceable(452) %899, i32 noundef %901, i32 noundef %904)
          to label %907 unwind label %914

907:                                              ; preds = %905
  store i32 %906, ptr %100, align 4, !tbaa !44
  %908 = load ptr, ptr %111, align 8, !tbaa !9
  %909 = invoke noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsBoundaryEdgeEi(ptr noundef nonnull align 8 dereferenceable(452) %908, i32 noundef %906)
          to label %910 unwind label %914

910:                                              ; preds = %907
  br i1 %909, label %916, label %911

911:                                              ; preds = %910
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 2633, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7Riemann15GeometryBoolean7ComputeEv) #13
  unreachable

912:                                              ; preds = %896
  %913 = landingpad { ptr, i32 }
          cleanup
  br label %920

914:                                              ; preds = %916, %907, %905, %902, %898
  %915 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %100) #10
  br label %920

916:                                              ; preds = %910
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %883, ptr noundef nonnull align 4 dereferenceable(4) %100)
          to label %917 unwind label %914

917:                                              ; preds = %916
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %100) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %99) #10
  %918 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %97) #10
  %919 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %97, ptr noundef nonnull align 8 dereferenceable(8) %98) #10
  br i1 %919, label %890, label %._crit_edge533

920:                                              ; preds = %914, %912
  %.pn = phi { ptr, i32 } [ %915, %914 ], [ %913, %912 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %99) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %98) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %97) #10
  br label %925

921:                                              ; preds = %878, %._crit_edge533
  %.0316 = phi i1 [ true, %._crit_edge533 ], [ %879, %878 ]
  call void @_ZN7Riemann18FMeshIndexMappingsD2Ev(ptr noundef nonnull align 8 dereferenceable(464) %94) #10
  call void @llvm.lifetime.end.p0(i64 464, ptr nonnull %94) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %93) #10
  %922 = getelementptr inbounds i8, ptr %0, i64 11
  %923 = load i8, ptr %922, align 1, !tbaa !76, !range !40, !noundef !41
  %924 = trunc nuw i8 %923 to i1
  br i1 %924, label %927, label %942

925:                                              ; preds = %920, %880, %872, %870
  %.pn370 = phi { ptr, i32 } [ %881, %880 ], [ %.pn, %920 ], [ %873, %872 ], [ %871, %870 ]
  call void @_ZN7Riemann18FMeshIndexMappingsD2Ev(ptr noundef nonnull align 8 dereferenceable(464) %94) #10
  br label %926

926:                                              ; preds = %925, %868
  %.pn370.pn = phi { ptr, i32 } [ %.pn370, %925 ], [ %869, %868 ]
  call void @llvm.lifetime.end.p0(i64 464, ptr nonnull %94) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %93) #10
  br label %958

927:                                              ; preds = %921
  %928 = getelementptr inbounds i8, ptr %0, i64 160
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %101) #10
  %929 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %928) #10
  store ptr %929, ptr %101, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %102) #10
  %930 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %928) #10
  store ptr %930, ptr %102, align 8
  %931 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %101, ptr noundef nonnull align 8 dereferenceable(8) %102) #10
  br i1 %931, label %.lr.ph535, label %._crit_edge536

.lr.ph535:                                        ; preds = %927
  %932 = getelementptr inbounds i8, ptr %0, i64 184
  br label %933

._crit_edge536:                                   ; preds = %937, %927
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %102) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %101) #10
  br label %942

933:                                              ; preds = %.lr.ph535, %937
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %103) #10
  %934 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %101) #10
  %935 = load i32, ptr %934, align 4, !tbaa !44
  store i32 %935, ptr %103, align 4, !tbaa !44
  %936 = invoke { ptr, i8 } @_ZNSt3setIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) %932, ptr noundef nonnull align 4 dereferenceable(4) %103)
          to label %937 unwind label %940

937:                                              ; preds = %933
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %103) #10
  %938 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %101) #10
  %939 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %101, ptr noundef nonnull align 8 dereferenceable(8) %102) #10
  br i1 %939, label %933, label %._crit_edge536

940:                                              ; preds = %933
  %941 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %103) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %102) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %101) #10
  br label %958

942:                                              ; preds = %._crit_edge536, %921
  %943 = getelementptr inbounds i8, ptr %0, i64 12
  %944 = load i8, ptr %943, align 4, !tbaa !77, !range !40, !noundef !41
  %945 = trunc nuw i8 %944 to i1
  br i1 %945, label %946, label %954

946:                                              ; preds = %942
  %947 = load ptr, ptr %111, align 8, !tbaa !9
  invoke void @_ZN7Riemann11DynamicMesh14ApplyTransformERKN5Maths9TransformEb(ptr noundef nonnull align 8 dereferenceable(452) %947, ptr noundef nonnull align 4 dereferenceable(28) %154, i1 noundef zeroext false)
          to label %948 unwind label %830

948:                                              ; preds = %946
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %104) #10
  invoke void @_ZN5Maths9Transform8IdentityEv(ptr dead_on_unwind nonnull writable sret(%"struct.Maths::Transform") align 4 %104)
          to label %949 unwind label %952

949:                                              ; preds = %948
  %950 = invoke noundef nonnull align 4 dereferenceable(28) ptr @_ZN5Maths9TransformaSERKS0_(ptr noundef nonnull align 4 dereferenceable(28) %154, ptr noundef nonnull align 4 dereferenceable(28) %104)
          to label %951 unwind label %952

951:                                              ; preds = %949
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %104) #10
  br label %954

952:                                              ; preds = %949, %948
  %953 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %104) #10
  br label %958

954:                                              ; preds = %951, %942
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %54) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %54) #10
  %955 = getelementptr inbounds i8, ptr %27, i64 48
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %955) #10
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %27) #10
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %27) #10
  %956 = getelementptr inbounds i8, ptr %26, i64 24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %956) #10
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %26) #10
  call void @_ZN7Riemann11GeometryCutD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %13) #10
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %13) #10
  call void @_ZN7Riemann24IntersectionsQueryResultD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %12) #10
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %12) #10
  %957 = getelementptr inbounds i8, ptr %11, i64 88
  call void @_ZN7Riemann19DynamicMeshAABBTreeD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %957) #10
  call void @_ZN7Riemann19DynamicMeshAABBTreeD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %11) #10
  call void @llvm.lifetime.end.p0(i64 176, ptr nonnull %11) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #10
  call void @_ZN7Riemann11DynamicMeshD1Ev(ptr noundef nonnull align 8 dereferenceable(452) %2) #10
  call void @llvm.lifetime.end.p0(i64 456, ptr nonnull %2) #10
  ret i1 %.0316

958:                                              ; preds = %830, %855, %926, %940, %952, %827
  %.pn405.pn.pn = phi { ptr, i32 } [ %.pn405.pn, %827 ], [ %.pn373, %855 ], [ %941, %940 ], [ %953, %952 ], [ %831, %830 ], [ %.pn370.pn, %926 ]
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %54) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %54) #10
  br label %959

959:                                              ; preds = %958, %626
  %.pn430.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn430.pn.pn.pn.pn, %626 ], [ %.pn405.pn.pn, %958 ]
  %960 = getelementptr inbounds i8, ptr %27, i64 48
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %960) #10
  call void @_ZNSt3setIiSt4lessIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %27) #10
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %27) #10
  %961 = getelementptr inbounds i8, ptr %26, i64 24
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %961) #10
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %26) #10
  br label %962

962:                                              ; preds = %320, %959, %188
  %.pn449.pn.pn.pn = phi { ptr, i32 } [ %189, %188 ], [ %.pn449.pn, %320 ], [ %.pn430.pn.pn.pn.pn.pn, %959 ]
  call void @_ZN7Riemann11GeometryCutD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %13) #10
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %13) #10
  call void @_ZN7Riemann24IntersectionsQueryResultD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %12) #10
  br label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %962, %186
  %.pn449.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn449.pn.pn.pn, %962 ], [ %187, %186 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %12) #10
  %963 = getelementptr inbounds i8, ptr %11, i64 88
  call void @_ZN7Riemann19DynamicMeshAABBTreeD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %963) #10
  call void @_ZN7Riemann19DynamicMeshAABBTreeD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %11) #10
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit541, %.loopexit.loopexit, %.thread
  %.pn449.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %158, %.thread ], [ %.pn449.pn.pn.pn.pn, %.loopexit.loopexit ], [ %185, %.loopexit.loopexit541 ]
  call void @llvm.lifetime.end.p0(i64 176, ptr nonnull %11) #10
  br label %964

964:                                              ; preds = %.loopexit, %183, %151, %133
  %.pn456.pn = phi { ptr, i32 } [ %.pn456, %151 ], [ %.pn449.pn.pn.pn.pn.pn, %.loopexit ], [ %184, %183 ], [ %134, %133 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #10
  br label %965

965:                                              ; preds = %964, %131
  %.pn456.pn.pn = phi { ptr, i32 } [ %.pn456.pn, %964 ], [ %132, %131 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #10
  br label %966

966:                                              ; preds = %965, %129, %127
  %.pn456.pn.pn.pn = phi { ptr, i32 } [ %.pn456.pn.pn, %965 ], [ %128, %127 ], [ %130, %129 ]
  call void @_ZN7Riemann11DynamicMeshD1Ev(ptr noundef nonnull align 8 dereferenceable(452) %2) #10
  call void @llvm.lifetime.end.p0(i64 456, ptr nonnull %2) #10
  resume { ptr, i32 } %.pn456.pn.pn.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7Riemann11DynamicMeshC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(452), ptr noundef nonnull align 8 dereferenceable(452)) unnamed_addr #3 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #7

declare void @_ZN7Riemann11DynamicMeshC1Ev(ptr noundef nonnull align 8 dereferenceable(452)) unnamed_addr #6

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #8

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(452) ptr @_ZN7Riemann11DynamicMeshaSERKS0_(ptr noundef nonnull align 8 dereferenceable(452), ptr noundef nonnull align 8 dereferenceable(452)) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths9TransformC2ERKS0_(ptr noundef nonnull align 4 dereferenceable(28), ptr noundef nonnull align 4 dereferenceable(28)) unnamed_addr #0 align 2

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

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

declare void @_ZN7Riemann11DynamicMesh14ApplyTransformERKN5Maths9TransformEb(ptr noundef nonnull align 8 dereferenceable(452), ptr noundef nonnull align 4 dereferenceable(28), i1 noundef zeroext) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths9TransformC2ERKNS_8TVector3IfEE(ptr noundef nonnull align 4 dereferenceable(28), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #0 align 2

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

declare void @_ZN7Riemann19DynamicMeshAABBTreeC1EPNS_11DynamicMeshE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef) unnamed_addr #6

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

declare void @_ZNK7Riemann19DynamicMeshAABBTree20FindAllIntersectionsERKS0_PKN5Maths9TransformE(ptr dead_on_unwind writable sret(%"struct.Riemann::IntersectionsQueryResult") align 8, ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(88), ptr noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Riemann11GeometryCut7ComputeERKNS_24IntersectionsQueryResultE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann11DynamicMesh13HasAttributesEv(ptr noundef nonnull align 8 dereferenceable(452)) local_unnamed_addr #2 align 2

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

declare noundef zeroext i1 @_ZNK7Riemann23DynamicMeshAttributeSet12IsSeamVertexEib(ptr noundef nonnull align 8 dereferenceable(168), i32 noundef, i1 noundef zeroext) local_unnamed_addr #6

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann16TFastWindingTreeC2EPNS_19DynamicMeshAABBTreeE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEE6resizeEmb(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, i1 noundef zeroext) local_unnamed_addr #0 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Riemann11DynamicMesh12GetTriNormalEi(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 8 dereferenceable(452), i32 noundef) local_unnamed_addr #0 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 #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFbiEEC2IZN7Riemann15GeometryBoolean7ComputeEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann13FQueryOptionsC2EfSt8functionIFbiEE(ptr noundef nonnull align 8 dereferenceable(40), float noundef, ptr noundef) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann11DynamicMesh10IsTriangleEi(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann9Triangle3C2Ev(ptr noundef nonnull align 4 dereferenceable(36)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Riemann11DynamicMesh14GetTriVerticesEiRN5Maths8TVector3IfEES4_S4_(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0 align 2

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

declare noundef i32 @_ZNK7Riemann19DynamicMeshAABBTree19FindNearestTriangleERKN5Maths8TVector3IfEERfRKNS_13FQueryOptionsE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #6

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5Maths8TVector3IfE6IsZeroEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN7Riemann16TFastWindingTree17FastWindingNumberERKN5Maths8TVector3IfEE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0 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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann11DynamicMesh14IsTriangleFastEi(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7Riemann11DynamicMesh12GetEdgeCountEv(ptr noundef nonnull align 8 dereferenceable(452)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann11DynamicMesh10IsEdgeFastEi(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referenceeqERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #4 align 2

declare noundef i32 @_ZN7Riemann11DynamicMesh14RemoveTriangleEibb(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef, i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #6

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNK5Maths6TAABB3IfE6MaxDimEv(ptr noundef nonnull align 4 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann18SparseSpatialHash3IiEC2Efi(ptr noundef nonnull align 8 dereferenceable(64), float noundef, i32 noundef) unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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

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

declare void @_ZN7Riemann12SparseOctreeC1ERKN5Maths8TVector3IfEES5_i(ptr noundef nonnull align 8 dereferenceable(268), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), i32 noundef) unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZZN7Riemann15GeometryBoolean7ComputeEvENK3$_2clEi"(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7Riemann18SparseSpatialHash3IiE11FindNearestERKN5Maths8TVector3IfEEfRi(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(12), float noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE4findERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiiEES5_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE7emplaceIJRiS8_EEES2_ISt17_Rb_tree_iteratorIS4_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths6TAABB3IfEC2ERKNS_8TVector3IfEEf(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12), float noundef) unnamed_addr #0 align 2

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

declare void @_ZNK7Riemann12SparseOctree10RangeQueryERKN5Maths6TAABB3IfEERSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(268), ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN7RiemannL15FindNearestEdgeERKNS_11DynamicMeshERKSt6vectorIiSaIiEERKN5Maths8TVector3IfEE(ptr noundef nonnull align 8 dereferenceable(452), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann8Segment3C2ERKN5Maths8TVector3IfEES5_(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNK7Riemann8Segment316ProjectUnitRangeERKN5Maths8TVector3IfEE(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7Riemann14FEdgeSplitInfoC2Ev(ptr noundef nonnull align 4 dereferenceable(60)) unnamed_addr #3 align 2

declare noundef i32 @_ZN7Riemann11DynamicMesh9SplitEdgeEiRNS_14FEdgeSplitInfoEf(ptr noundef nonnull align 8 dereferenceable(452), i32 noundef, ptr noundef nonnull align 4 dereferenceable(60), float noundef) local_unnamed_addr #6

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZZN7Riemann15GeometryBoolean7ComputeEvENK3$_3clEi"(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #3 align 2

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

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

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

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

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

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

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

declare void @_ZN7Riemann18FDynamicMeshEditor27ReverseTriangleOrientationsERKSt6vectorIiSaIiEEb(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7Riemann18FMeshIndexMappingsC2Ev(ptr noundef nonnull align 8 dereferenceable(464)) unnamed_addr #3 align 2

declare void @_ZN7Riemann18FDynamicMeshEditor10AppendMeshEPKNS_11DynamicMeshERNS_18FMeshIndexMappingsESt8functionIFN5Maths8TVector3IfEEiRKS9_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef nonnull align 8 dereferenceable(464), ptr noundef, ptr noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(98) ptr @_ZN7Riemann18FMeshIndexMappings11GetGroupMapEv(ptr noundef nonnull align 8 dereferenceable(464)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(98) ptr @_ZN7Riemann10FIndexMapiaSERKS0_(ptr noundef nonnull align 8 dereferenceable(98), ptr noundef nonnull align 8 dereferenceable(98)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths9Transform8IdentityEv(ptr dead_on_unwind noalias writable sret(%"struct.Maths::Transform") align 4) local_unnamed_addr #0 align 2

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

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

; Function Attrs: nounwind
declare void @_ZN7Riemann11DynamicMeshD1Ev(ptr noundef nonnull align 8 dereferenceable(452)) unnamed_addr #9

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 120}
!10 = !{!"_ZTSN7Riemann15GeometryBooleanE", !11, i64 0, !12, i64 4, !13, i64 8, !13, i64 9, !13, i64 10, !13, i64 11, !13, i64 12, !12, i64 16, !12, i64 20, !13, i64 24, !13, i64 25, !13, i64 26, !12, i64 28, !13, i64 32, !12, i64 36, !14, i64 40, !7, i64 48, !7, i64 64, !6, i64 120, !15, i64 128, !18, i64 160, !22, i64 184, !13, i64 232, !31, i64 240}
!11 = !{!"_ZTSN7Riemann15GeometryBoolean9BooleanOpE", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN5Maths9TransformE", !16, i64 0, !17, i64 12}
!16 = !{!"_ZTSN5Maths8TVector3IfEE", !12, i64 0, !12, i64 4, !12, i64 8}
!17 = !{!"_ZTSN5Maths10QuaternionE", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!18 = !{!"_ZTSSt6vectorIiSaIiEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTSSt3setIiSt4lessIiESaIiEE", !23, i64 0}
!23 = !{!"_ZTSSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE", !24, i64 0}
!24 = !{!"_ZTSNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE13_Rb_tree_implIS3_Lb1EEE", !25, i64 0, !27, i64 8}
!25 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !26, i64 0}
!26 = !{!"_ZTSSt4lessIiE"}
!27 = !{!"_ZTSSt15_Rb_tree_header", !28, i64 0, !30, i64 32}
!28 = !{!"_ZTSSt18_Rb_tree_node_base", !29, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!29 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!30 = !{!"long", !7, i64 0}
!31 = !{!"_ZTSN7Riemann10FIndexMapiE", !32, i64 0, !32, i64 48, !13, i64 96, !13, i64 97}
!32 = !{!"_ZTSSt3mapIiiSt4lessIiESaISt4pairIKiiEEE", !33, i64 0}
!33 = !{!"_ZTSSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE", !34, i64 0}
!34 = !{!"_ZTSNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE13_Rb_tree_implIS6_Lb1EEE", !25, i64 0, !27, i64 8}
!35 = !{!10, !12, i64 4}
!36 = !{!37, !12, i64 16}
!37 = !{!"_ZTSN7Riemann11GeometryCutE", !7, i64 0, !12, i64 16, !13, i64 20, !13, i64 21, !7, i64 24, !7, i64 72}
!38 = !{!37, !13, i64 20}
!39 = !{!10, !13, i64 8}
!40 = !{i8 0, i8 2}
!41 = !{}
!42 = distinct !{!42, !43}
!43 = !{!"llvm.loop.mustprogress"}
!44 = !{!14, !14, i64 0}
!45 = distinct !{!45, !43}
!46 = distinct !{!46, !43}
!47 = !{!48, !14, i64 4}
!48 = !{!"_ZTSN5Maths7TIndex2IiEE", !14, i64 0, !14, i64 4}
!49 = !{!48, !14, i64 0}
!50 = distinct !{!50, !43}
!51 = !{!10, !11, i64 0}
!52 = !{!53, !6, i64 0}
!53 = !{!"_ZTSN7Riemann19DynamicMeshAABBTreeE", !6, i64 0, !18, i64 8, !54, i64 32, !18, i64 56, !14, i64 80, !14, i64 84}
!54 = !{!"_ZTSSt6vectorIN5Maths6TAABB3IfEESaIS2_EE", !55, i64 0}
!55 = !{!"_ZTSSt12_Vector_baseIN5Maths6TAABB3IfEESaIS2_EE", !56, i64 0}
!56 = !{!"_ZTSNSt12_Vector_baseIN5Maths6TAABB3IfEESaIS2_EE12_Vector_implE", !57, i64 0}
!57 = !{!"_ZTSNSt12_Vector_baseIN5Maths6TAABB3IfEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!58 = distinct !{!58, !43}
!59 = distinct !{!59, !43}
!60 = distinct !{!60, !43}
!61 = distinct !{!61, !43}
!62 = distinct !{!62, !43}
!63 = distinct !{!63, !43}
!64 = !{!65, !14, i64 4}
!65 = !{!"_ZTSSt4pairIKiiE", !14, i64 0, !14, i64 4}
!66 = !{!67, !14, i64 32}
!67 = !{!"_ZTSN7Riemann14FEdgeSplitInfoE", !14, i64 0, !48, i64 4, !48, i64 12, !48, i64 20, !13, i64 28, !14, i64 32, !48, i64 36, !68, i64 44, !12, i64 56}
!68 = !{!"_ZTSN5Maths7TIndex3IiEE", !14, i64 0, !14, i64 4, !14, i64 8}
!69 = !{!67, !14, i64 44}
!70 = distinct !{!70, !43}
!71 = !{!10, !13, i64 9}
!72 = !{!65, !14, i64 0}
!73 = distinct !{!73, !43}
!74 = !{!10, !13, i64 232}
!75 = !{!10, !13, i64 10}
!76 = !{!10, !13, i64 11}
!77 = !{!10, !13, i64 12}


; Effective O3 passes: ADCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass