; LLVM IR from bldeng/AASolver :: AndersonOpt/external/OpenMesh/Core/Mesh (PolyConnectivity)

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

%"struct.OpenMesh::VertexHandle" = type { %"class.OpenMesh::BaseHandle" }
%"class.OpenMesh::BaseHandle" = type { i32 }
%"class.std::vector.49" = type { %"struct.std::_Vector_base.50" }
%"struct.std::_Vector_base.50" = type { %"struct.std::_Vector_base<OpenMesh::FaceHandle, std::allocator<OpenMesh::FaceHandle>>::_Vector_impl" }
%"struct.std::_Vector_base<OpenMesh::FaceHandle, std::allocator<OpenMesh::FaceHandle>>::_Vector_impl" = type { %"struct.std::_Vector_base<OpenMesh::FaceHandle, std::allocator<OpenMesh::FaceHandle>>::_Vector_impl_data" }
%"struct.std::_Vector_base<OpenMesh::FaceHandle, std::allocator<OpenMesh::FaceHandle>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.OpenMesh::Iterators::GenericCirculatorT_DEPRECATED.54" = type { %"class.OpenMesh::Iterators::GenericCirculatorBaseT.base", %"struct.OpenMesh::FaceHandle" }
%"class.OpenMesh::Iterators::GenericCirculatorBaseT.base" = type <{ ptr, %"struct.OpenMesh::HalfedgeHandle", %"struct.OpenMesh::HalfedgeHandle", i32 }>
%"struct.OpenMesh::HalfedgeHandle" = type { %"class.OpenMesh::BaseHandle" }
%"struct.OpenMesh::FaceHandle" = type { %"class.OpenMesh::BaseHandle" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8OpenMesh16PolyConnectivity13delete_vertexENS_12VertexHandleEb(ptr noundef nonnull align 8 dereferenceable(416) %0, i32 %1, i1 noundef zeroext %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"struct.OpenMesh::VertexHandle", align 4
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca %"class.std::vector.49", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.OpenMesh::Iterators::GenericCirculatorT_DEPRECATED.54", align 8
  %11 = alloca %"struct.OpenMesh::VertexHandle", align 4
  %12 = alloca %"struct.OpenMesh::FaceHandle", align 4
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"struct.OpenMesh::FaceHandle", align 4
  %16 = alloca %"struct.OpenMesh::VertexHandle", align 4
  %17 = getelementptr inbounds %"struct.OpenMesh::VertexHandle", ptr %4, i32 0, i32 0
  %18 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %17, i32 0, i32 0
  store i32 %1, ptr %18, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  %19 = zext i1 %2 to i8
  store i8 %19, ptr %6, align 1, !tbaa !9
  %20 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #5
  call void @_ZNSt6vectorIN8OpenMesh10FaceHandleESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  invoke void @_ZNSt6vectorIN8OpenMesh10FaceHandleESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 8)
          to label %21 unwind label %30

21:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %4, i64 4, i1 false)
  %22 = getelementptr inbounds %"struct.OpenMesh::VertexHandle", ptr %11, i32 0, i32 0
  %23 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %22, i32 0, i32 0
  %24 = load i32, ptr %23, align 4
  invoke void @_ZN8OpenMesh16PolyConnectivity7vf_iterENS_12VertexHandleE(ptr dead_on_unwind writable sret(%"class.OpenMesh::Iterators::GenericCirculatorT_DEPRECATED.54") align 8 %10, ptr noundef nonnull align 8 dereferenceable(416) %20, i32 %24)
          to label %25 unwind label %34

25:                                               ; preds = %21
  br label %26

26:                                               ; preds = %46, %25
  %27 = invoke noundef zeroext i1 @_ZNK8OpenMesh9Iterators29GenericCirculatorT_DEPRECATEDINS_16PolyConnectivityENS_12VertexHandleENS_10FaceHandleEXadL_ZNKS0_22GenericCirculatorBaseTIS2_E12toFaceHandleEvEEE8is_validEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %28 unwind label %34

28:                                               ; preds = %26
  br i1 %27, label %38, label %29

29:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  br label %52

30:                                               ; preds = %3
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %8, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %9, align 4
  br label %80

34:                                               ; preds = %44, %26, %21
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %8, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %9, align 4
  br label %51

38:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %39 = invoke i32 @_ZNK8OpenMesh9Iterators29GenericCirculatorT_DEPRECATEDINS_16PolyConnectivityENS_12VertexHandleENS_10FaceHandleEXadL_ZNKS0_22GenericCirculatorBaseTIS2_E12toFaceHandleEvEEEdeEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %40 unwind label %47

40:                                               ; preds = %38
  %41 = getelementptr inbounds %"struct.OpenMesh::FaceHandle", ptr %12, i32 0, i32 0
  %42 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %41, i32 0, i32 0
  store i32 %39, ptr %42, align 4
  invoke void @_ZNSt6vectorIN8OpenMesh10FaceHandleESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %43 unwind label %47

43:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %44

44:                                               ; preds = %43
  %45 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8OpenMesh9Iterators29GenericCirculatorT_DEPRECATEDINS_16PolyConnectivityENS_12VertexHandleENS_10FaceHandleEXadL_ZNKS0_22GenericCirculatorBaseTIS2_E12toFaceHandleEvEEEppEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %46 unwind label %34

46:                                               ; preds = %44
  br label %26, !llvm.loop !11

47:                                               ; preds = %40, %38
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %8, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %51

51:                                               ; preds = %47, %34
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  br label %80

52:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %53 = call ptr @_ZNSt6vectorIN8OpenMesh10FaceHandleESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %54 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %53, ptr %54, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %55 = call ptr @_ZNSt6vectorIN8OpenMesh10FaceHandleESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %56 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %55, ptr %56, align 8
  br label %57

57:                                               ; preds = %67, %52
  %58 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN8OpenMesh10FaceHandleESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br i1 %58, label %59, label %73

59:                                               ; preds = %57
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN8OpenMesh10FaceHandleESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %60, i64 4, i1 false)
  %61 = load i8, ptr %6, align 1, !tbaa !9, !range !13, !noundef !14
  %62 = trunc i8 %61 to i1
  %63 = getelementptr inbounds %"struct.OpenMesh::FaceHandle", ptr %15, i32 0, i32 0
  %64 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %63, i32 0, i32 0
  %65 = load i32, ptr %64, align 4
  invoke void @_ZN8OpenMesh16PolyConnectivity11delete_faceENS_10FaceHandleEb(ptr noundef nonnull align 8 dereferenceable(416) %20, i32 %65, i1 noundef zeroext %62)
          to label %66 unwind label %69

66:                                               ; preds = %59
  br label %67

67:                                               ; preds = %66
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN8OpenMesh10FaceHandleESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  br label %57, !llvm.loop !15

69:                                               ; preds = %78, %73, %59
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %8, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %80

73:                                               ; preds = %57
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %4, i64 4, i1 false)
  %74 = getelementptr inbounds %"struct.OpenMesh::VertexHandle", ptr %16, i32 0, i32 0
  %75 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %74, i32 0, i32 0
  %76 = load i32, ptr %75, align 4
  %77 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN8OpenMesh11ArrayKernel6statusENS_12VertexHandleE(ptr noundef nonnull align 8 dereferenceable(368) %20, i32 %76)
          to label %78 unwind label %69

78:                                               ; preds = %73
  invoke void @_ZN8OpenMesh10Attributes10StatusInfo11set_deletedEb(ptr noundef nonnull align 4 dereferenceable(4) %77, i1 noundef zeroext true)
          to label %79 unwind label %69

79:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @_ZNSt6vectorIN8OpenMesh10FaceHandleESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  ret void

80:                                               ; preds = %69, %51, %30
  call void @_ZNSt6vectorIN8OpenMesh10FaceHandleESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  br label %81

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8OpenMesh16PolyConnectivity7vf_iterENS_12VertexHandleE(ptr dead_on_unwind noalias writable sret(%"class.OpenMesh::Iterators::GenericCirculatorT_DEPRECATED.54") align 8, ptr noundef nonnull align 8 dereferenceable(416), i32) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8OpenMesh9Iterators29GenericCirculatorT_DEPRECATEDINS_16PolyConnectivityENS_12VertexHandleENS_10FaceHandleEXadL_ZNKS0_22GenericCirculatorBaseTIS2_E12toFaceHandleEvEEE8is_validEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8OpenMesh16PolyConnectivity11delete_faceENS_10FaceHandleEb(ptr noundef nonnull align 8 dereferenceable(416), i32, i1 noundef zeroext) #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8OpenMesh10Attributes10StatusInfo11set_deletedEb(ptr noundef nonnull align 4 dereferenceable(4), i1 noundef zeroext) #3 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !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.std::vector.49" = type { %"struct.std::_Vector_base.50" }
%"struct.std::_Vector_base.50" = type { %"struct.std::_Vector_base<OpenMesh::FaceHandle, std::allocator<OpenMesh::FaceHandle>>::_Vector_impl" }
%"struct.std::_Vector_base<OpenMesh::FaceHandle, std::allocator<OpenMesh::FaceHandle>>::_Vector_impl" = type { %"struct.std::_Vector_base<OpenMesh::FaceHandle, std::allocator<OpenMesh::FaceHandle>>::_Vector_impl_data" }
%"struct.std::_Vector_base<OpenMesh::FaceHandle, std::allocator<OpenMesh::FaceHandle>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.OpenMesh::Iterators::GenericCirculatorT_DEPRECATED.54" = type { %"class.OpenMesh::Iterators::GenericCirculatorBaseT.base", %"struct.OpenMesh::FaceHandle" }
%"class.OpenMesh::Iterators::GenericCirculatorBaseT.base" = type <{ ptr, %"struct.OpenMesh::HalfedgeHandle", %"struct.OpenMesh::HalfedgeHandle", i32 }>
%"struct.OpenMesh::HalfedgeHandle" = type { %"class.OpenMesh::BaseHandle" }
%"class.OpenMesh::BaseHandle" = type { i32 }
%"struct.OpenMesh::FaceHandle" = type { %"class.OpenMesh::BaseHandle" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN8OpenMesh11ArrayKernel6statusENS_12VertexHandleE(ptr noundef nonnull align 8 dereferenceable(368), i32) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8OpenMesh16PolyConnectivity13delete_vertexENS_12VertexHandleEb(ptr noundef nonnull align 8 dereferenceable(416) %0, i32 %1, i1 noundef zeroext %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector.49", align 8
  %5 = alloca %"class.OpenMesh::Iterators::GenericCirculatorT_DEPRECATED.54", align 8
  %6 = alloca %"struct.OpenMesh::FaceHandle", align 4
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  call void @_ZNSt6vectorIN8OpenMesh10FaceHandleESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  invoke void @_ZNSt6vectorIN8OpenMesh10FaceHandleESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 8)
          to label %9 unwind label %15

9:                                                ; preds = %3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #4
  invoke void @_ZN8OpenMesh16PolyConnectivity7vf_iterENS_12VertexHandleE(ptr dead_on_unwind nonnull writable sret(%"class.OpenMesh::Iterators::GenericCirculatorT_DEPRECATED.54") align 8 %5, ptr noundef nonnull align 8 dereferenceable(416) %0, i32 %1)
          to label %.preheader unwind label %.loopexit.split-lp12

.preheader:                                       ; preds = %9, %20
  %10 = call noundef zeroext i1 @_ZNK8OpenMesh9Iterators29GenericCirculatorT_DEPRECATEDINS_16PolyConnectivityENS_12VertexHandleENS_10FaceHandleEXadL_ZNKS0_22GenericCirculatorBaseTIS2_E12toFaceHandleEvEEE8is_validEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  br i1 %10, label %17, label %11

11:                                               ; preds = %.preheader
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %12 = call ptr @_ZNSt6vectorIN8OpenMesh10FaceHandleESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  store ptr %12, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %13 = call ptr @_ZNSt6vectorIN8OpenMesh10FaceHandleESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  store ptr %13, ptr %8, align 8
  %14 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN8OpenMesh10FaceHandleESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  br i1 %14, label %.lr.ph, label %._crit_edge

15:                                               ; preds = %3
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %32

.loopexit11:                                      ; preds = %20
  %lpad.loopexit13 = landingpad { ptr, i32 }
          cleanup
  br label %24

.loopexit.split-lp12:                             ; preds = %9
  %lpad.loopexit.split-lp14 = landingpad { ptr, i32 }
          cleanup
  br label %24

17:                                               ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  %18 = invoke i32 @_ZNK8OpenMesh9Iterators29GenericCirculatorT_DEPRECATEDINS_16PolyConnectivityENS_12VertexHandleENS_10FaceHandleEXadL_ZNKS0_22GenericCirculatorBaseTIS2_E12toFaceHandleEvEEEdeEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %19 unwind label %22

19:                                               ; preds = %17
  store i32 %18, ptr %6, align 4
  invoke void @_ZNSt6vectorIN8OpenMesh10FaceHandleESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %20 unwind label %22

20:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  %21 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8OpenMesh9Iterators29GenericCirculatorT_DEPRECATEDINS_16PolyConnectivityENS_12VertexHandleENS_10FaceHandleEXadL_ZNKS0_22GenericCirculatorBaseTIS2_E12toFaceHandleEvEEEppEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %.preheader unwind label %.loopexit11, !llvm.loop !5

22:                                               ; preds = %19, %17
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  br label %24

24:                                               ; preds = %.loopexit11, %.loopexit.split-lp12, %22
  %.pn = phi { ptr, i32 } [ %23, %22 ], [ %lpad.loopexit13, %.loopexit11 ], [ %lpad.loopexit.split-lp14, %.loopexit.split-lp12 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  br label %32

.lr.ph:                                           ; preds = %11, %26
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN8OpenMesh10FaceHandleESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %.sroa.01.0.copyload = load i32, ptr %25, align 4
  invoke void @_ZN8OpenMesh16PolyConnectivity11delete_faceENS_10FaceHandleEb(ptr noundef nonnull align 8 dereferenceable(416) %0, i32 %.sroa.01.0.copyload, i1 noundef zeroext %2)
          to label %26 unwind label %.loopexit

26:                                               ; preds = %.lr.ph
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN8OpenMesh10FaceHandleESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %28 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN8OpenMesh10FaceHandleESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  br i1 %28, label %.lr.ph, label %._crit_edge, !llvm.loop !7

.loopexit:                                        ; preds = %.lr.ph
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %29

.loopexit.split-lp:                               ; preds = %._crit_edge
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %29

29:                                               ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br label %32

._crit_edge:                                      ; preds = %26, %11
  %30 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN8OpenMesh11ArrayKernel6statusENS_12VertexHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %1)
          to label %31 unwind label %.loopexit.split-lp

31:                                               ; preds = %._crit_edge
  call void @_ZN8OpenMesh10Attributes10StatusInfo11set_deletedEb(ptr noundef nonnull align 4 dereferenceable(4) %30, i1 noundef zeroext true)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @_ZNSt6vectorIN8OpenMesh10FaceHandleESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  ret void

32:                                               ; preds = %29, %24, %15
  %.pn.pn = phi { ptr, i32 } [ %.pn, %24 ], [ %lpad.phi, %29 ], [ %16, %15 ]
  call void @_ZNSt6vectorIN8OpenMesh10FaceHandleESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn.pn
}

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8OpenMesh16PolyConnectivity7vf_iterENS_12VertexHandleE(ptr dead_on_unwind noalias writable sret(%"class.OpenMesh::Iterators::GenericCirculatorT_DEPRECATED.54") align 8, ptr noundef nonnull align 8 dereferenceable(416), i32) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZNK8OpenMesh9Iterators29GenericCirculatorT_DEPRECATEDINS_16PolyConnectivityENS_12VertexHandleENS_10FaceHandleEXadL_ZNKS0_22GenericCirculatorBaseTIS2_E12toFaceHandleEvEEEdeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8OpenMesh16PolyConnectivity11delete_faceENS_10FaceHandleEb(ptr noundef nonnull align 8 dereferenceable(416), i32, i1 noundef zeroext) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN8OpenMesh10FaceHandleESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) 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_iteratorIPN8OpenMesh10FaceHandleESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass