; 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::HalfedgeHandle" = type { %"class.OpenMesh::BaseHandle" }
%"class.OpenMesh::BaseHandle" = type { i32 }
%"struct.OpenMesh::VertexHandle" = type { %"class.OpenMesh::BaseHandle" }
%"struct.OpenMesh::FaceHandle" = type { %"class.OpenMesh::BaseHandle" }
%"struct.OpenMesh::EdgeHandle" = type { %"class.OpenMesh::BaseHandle" }

@_ZN8OpenMesh16PolyConnectivity21InvalidHalfedgeHandleE = external dso_local global %"struct.OpenMesh::HalfedgeHandle", align 4
@.str.4 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [47 x i8], align 1
@__PRETTY_FUNCTION__._ZN8OpenMesh16PolyConnectivity13collapse_loopENS_14HalfedgeHandleE = external hidden unnamed_addr constant [63 x i8], align 1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8OpenMesh16PolyConnectivity13collapse_loopENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(416) %0, i32 %1) #4 align 2 {
  %3 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %6 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %7 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %8 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %9 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %10 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %11 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %12 = alloca %"struct.OpenMesh::VertexHandle", align 4
  %13 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %14 = alloca %"struct.OpenMesh::VertexHandle", align 4
  %15 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %16 = alloca %"struct.OpenMesh::FaceHandle", align 4
  %17 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %18 = alloca %"struct.OpenMesh::FaceHandle", align 4
  %19 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %20 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %21 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %22 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %23 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %24 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %25 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %26 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %27 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %28 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %29 = alloca %"struct.OpenMesh::FaceHandle", align 4
  %30 = alloca %"struct.OpenMesh::VertexHandle", align 4
  %31 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %32 = alloca %"struct.OpenMesh::VertexHandle", align 4
  %33 = alloca %"struct.OpenMesh::VertexHandle", align 4
  %34 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %35 = alloca %"struct.OpenMesh::VertexHandle", align 4
  %36 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %37 = alloca %"struct.OpenMesh::FaceHandle", align 4
  %38 = alloca %"struct.OpenMesh::FaceHandle", align 4
  %39 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %40 = alloca %"struct.OpenMesh::FaceHandle", align 4
  %41 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %42 = alloca %"struct.OpenMesh::FaceHandle", align 4
  %43 = alloca %"struct.OpenMesh::EdgeHandle", align 4
  %44 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %45 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %3, i32 0, i32 0
  %46 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %45, i32 0, i32 0
  store i32 %1, ptr %46, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  %47 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 %3, i64 4, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 4 %5, i64 4, i1 false)
  %48 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %7, i32 0, i32 0
  %49 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %48, i32 0, i32 0
  %50 = load i32, ptr %49, align 4
  %51 = call i32 @_ZNK8OpenMesh11ArrayKernel20next_halfedge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %50)
  %52 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %6, i32 0, i32 0
  %53 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %52, i32 0, i32 0
  store i32 %51, ptr %53, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 4 %5, i64 4, i1 false)
  %54 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %9, i32 0, i32 0
  %55 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %54, i32 0, i32 0
  %56 = load i32, ptr %55, align 4
  %57 = call i32 @_ZNK8OpenMesh11ArrayKernel24opposite_halfedge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %56)
  %58 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %8, i32 0, i32 0
  %59 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %58, i32 0, i32 0
  store i32 %57, ptr %59, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %6, i64 4, i1 false)
  %60 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %11, i32 0, i32 0
  %61 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %60, i32 0, i32 0
  %62 = load i32, ptr %61, align 4
  %63 = call i32 @_ZNK8OpenMesh11ArrayKernel24opposite_halfedge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %62)
  %64 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %10, i32 0, i32 0
  %65 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %64, i32 0, i32 0
  store i32 %63, ptr %65, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %5, i64 4, i1 false)
  %66 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %13, i32 0, i32 0
  %67 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %66, i32 0, i32 0
  %68 = load i32, ptr %67, align 4
  %69 = call i32 @_ZNK8OpenMesh11ArrayKernel16to_vertex_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %68)
  %70 = getelementptr inbounds %"struct.OpenMesh::VertexHandle", ptr %12, i32 0, i32 0
  %71 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %70, i32 0, i32 0
  store i32 %69, ptr %71, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %6, i64 4, i1 false)
  %72 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %15, i32 0, i32 0
  %73 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %72, i32 0, i32 0
  %74 = load i32, ptr %73, align 4
  %75 = call i32 @_ZNK8OpenMesh11ArrayKernel16to_vertex_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %74)
  %76 = getelementptr inbounds %"struct.OpenMesh::VertexHandle", ptr %14, i32 0, i32 0
  %77 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %76, i32 0, i32 0
  store i32 %75, ptr %77, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 %5, i64 4, i1 false)
  %78 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %17, i32 0, i32 0
  %79 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %78, i32 0, i32 0
  %80 = load i32, ptr %79, align 4
  %81 = call i32 @_ZNK8OpenMesh11ArrayKernel11face_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %80)
  %82 = getelementptr inbounds %"struct.OpenMesh::FaceHandle", ptr %16, i32 0, i32 0
  %83 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %82, i32 0, i32 0
  store i32 %81, ptr %83, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %8, i64 4, i1 false)
  %84 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %19, i32 0, i32 0
  %85 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %84, i32 0, i32 0
  %86 = load i32, ptr %85, align 4
  %87 = call i32 @_ZNK8OpenMesh11ArrayKernel11face_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %86)
  %88 = getelementptr inbounds %"struct.OpenMesh::FaceHandle", ptr %18, i32 0, i32 0
  %89 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %88, i32 0, i32 0
  store i32 %87, ptr %89, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %6, i64 4, i1 false)
  %90 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %21, i32 0, i32 0
  %91 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %90, i32 0, i32 0
  %92 = load i32, ptr %91, align 4
  %93 = call i32 @_ZNK8OpenMesh11ArrayKernel20next_halfedge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %92)
  %94 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %20, i32 0, i32 0
  %95 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %94, i32 0, i32 0
  store i32 %93, ptr %95, align 4
  %96 = call noundef zeroext i1 @_ZNK8OpenMesh10BaseHandleeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %5)
  br i1 %96, label %97, label %99

97:                                               ; preds = %2
  %98 = call noundef zeroext i1 @_ZNK8OpenMesh10BaseHandleneERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %8)
  br label %99

99:                                               ; preds = %97, %2
  %100 = phi i1 [ false, %2 ], [ %98, %97 ]
  br i1 %100, label %101, label %102

101:                                              ; preds = %99
  br label %104

102:                                              ; preds = %99
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.4, i32 noundef 800, ptr noundef @__PRETTY_FUNCTION__._ZN8OpenMesh16PolyConnectivity13collapse_loopENS_14HalfedgeHandleE) #6
  unreachable

103:                                              ; No predecessors!
  br label %104

104:                                              ; preds = %103, %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %6, i64 4, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %8, i64 4, i1 false)
  %105 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %24, i32 0, i32 0
  %106 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %105, i32 0, i32 0
  %107 = load i32, ptr %106, align 4
  %108 = call i32 @_ZNK8OpenMesh11ArrayKernel20next_halfedge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %107)
  %109 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %23, i32 0, i32 0
  %110 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %109, i32 0, i32 0
  store i32 %108, ptr %110, align 4
  %111 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %22, i32 0, i32 0
  %112 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %111, i32 0, i32 0
  %113 = load i32, ptr %112, align 4
  %114 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %23, i32 0, i32 0
  %115 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %114, i32 0, i32 0
  %116 = load i32, ptr %115, align 4
  call void @_ZN8OpenMesh11ArrayKernel24set_next_halfedge_handleENS_14HalfedgeHandleES1_(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %113, i32 %116)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %8, i64 4, i1 false)
  %117 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %26, i32 0, i32 0
  %118 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %117, i32 0, i32 0
  %119 = load i32, ptr %118, align 4
  %120 = call i32 @_ZNK8OpenMesh11ArrayKernel20prev_halfedge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %119)
  %121 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %25, i32 0, i32 0
  %122 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %121, i32 0, i32 0
  store i32 %120, ptr %122, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %6, i64 4, i1 false)
  %123 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %25, i32 0, i32 0
  %124 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %123, i32 0, i32 0
  %125 = load i32, ptr %124, align 4
  %126 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %27, i32 0, i32 0
  %127 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %126, i32 0, i32 0
  %128 = load i32, ptr %127, align 4
  call void @_ZN8OpenMesh11ArrayKernel24set_next_halfedge_handleENS_14HalfedgeHandleES1_(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %125, i32 %128)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %6, i64 4, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %18, i64 4, i1 false)
  %129 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %28, i32 0, i32 0
  %130 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %129, i32 0, i32 0
  %131 = load i32, ptr %130, align 4
  %132 = getelementptr inbounds %"struct.OpenMesh::FaceHandle", ptr %29, i32 0, i32 0
  %133 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %132, i32 0, i32 0
  %134 = load i32, ptr %133, align 4
  call void @_ZN8OpenMesh11ArrayKernel15set_face_handleENS_14HalfedgeHandleENS_10FaceHandleE(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %131, i32 %134)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %12, i64 4, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 4 %6, i64 4, i1 false)
  %135 = getelementptr inbounds %"struct.OpenMesh::VertexHandle", ptr %30, i32 0, i32 0
  %136 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %135, i32 0, i32 0
  %137 = load i32, ptr %136, align 4
  %138 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %31, i32 0, i32 0
  %139 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %138, i32 0, i32 0
  %140 = load i32, ptr %139, align 4
  call void @_ZN8OpenMesh11ArrayKernel19set_halfedge_handleENS_12VertexHandleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %137, i32 %140)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %12, i64 4, i1 false)
  %141 = getelementptr inbounds %"struct.OpenMesh::VertexHandle", ptr %32, i32 0, i32 0
  %142 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %141, i32 0, i32 0
  %143 = load i32, ptr %142, align 4
  call void @_ZN8OpenMesh16PolyConnectivity24adjust_outgoing_halfedgeENS_12VertexHandleE(ptr noundef nonnull align 8 dereferenceable(416) %47, i32 %143)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 %14, i64 4, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 4 %10, i64 4, i1 false)
  %144 = getelementptr inbounds %"struct.OpenMesh::VertexHandle", ptr %33, i32 0, i32 0
  %145 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %144, i32 0, i32 0
  %146 = load i32, ptr %145, align 4
  %147 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %34, i32 0, i32 0
  %148 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %147, i32 0, i32 0
  %149 = load i32, ptr %148, align 4
  call void @_ZN8OpenMesh11ArrayKernel19set_halfedge_handleENS_12VertexHandleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %146, i32 %149)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %14, i64 4, i1 false)
  %150 = getelementptr inbounds %"struct.OpenMesh::VertexHandle", ptr %35, i32 0, i32 0
  %151 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %150, i32 0, i32 0
  %152 = load i32, ptr %151, align 4
  call void @_ZN8OpenMesh16PolyConnectivity24adjust_outgoing_halfedgeENS_12VertexHandleE(ptr noundef nonnull align 8 dereferenceable(416) %47, i32 %152)
  %153 = call noundef zeroext i1 @_ZNK8OpenMesh10BaseHandle8is_validEv(ptr noundef nonnull align 4 dereferenceable(4) %18)
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #5
  br i1 %153, label %154, label %162

154:                                              ; preds = %104
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %18, i64 4, i1 false)
  %155 = getelementptr inbounds %"struct.OpenMesh::FaceHandle", ptr %37, i32 0, i32 0
  %156 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %155, i32 0, i32 0
  %157 = load i32, ptr %156, align 4
  %158 = call i32 @_ZNK8OpenMesh11ArrayKernel15halfedge_handleENS_10FaceHandleE(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %157)
  %159 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %36, i32 0, i32 0
  %160 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %159, i32 0, i32 0
  store i32 %158, ptr %160, align 4
  %161 = call noundef zeroext i1 @_ZNK8OpenMesh10BaseHandleeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %36, ptr noundef nonnull align 4 dereferenceable(4) %8)
  br label %162

162:                                              ; preds = %154, %104
  %163 = phi i1 [ false, %104 ], [ %161, %154 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #5
  br i1 %163, label %164, label %171

164:                                              ; preds = %162
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %38, ptr align 4 %18, i64 4, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 4 %6, i64 4, i1 false)
  %165 = getelementptr inbounds %"struct.OpenMesh::FaceHandle", ptr %38, i32 0, i32 0
  %166 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %165, i32 0, i32 0
  %167 = load i32, ptr %166, align 4
  %168 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %39, i32 0, i32 0
  %169 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %168, i32 0, i32 0
  %170 = load i32, ptr %169, align 4
  call void @_ZN8OpenMesh11ArrayKernel19set_halfedge_handleENS_10FaceHandleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %167, i32 %170)
  br label %171

171:                                              ; preds = %164, %162
  %172 = call noundef zeroext i1 @_ZNK8OpenMesh10BaseHandle8is_validEv(ptr noundef nonnull align 4 dereferenceable(4) %16)
  br i1 %172, label %173, label %184

173:                                              ; preds = %171
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %40, ptr align 4 %16, i64 4, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %41, ptr align 4 @_ZN8OpenMesh16PolyConnectivity21InvalidHalfedgeHandleE, i64 4, i1 false)
  %174 = getelementptr inbounds %"struct.OpenMesh::FaceHandle", ptr %40, i32 0, i32 0
  %175 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %174, i32 0, i32 0
  %176 = load i32, ptr %175, align 4
  %177 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %41, i32 0, i32 0
  %178 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %177, i32 0, i32 0
  %179 = load i32, ptr %178, align 4
  call void @_ZN8OpenMesh11ArrayKernel19set_halfedge_handleENS_10FaceHandleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %176, i32 %179)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %42, ptr align 4 %16, i64 4, i1 false)
  %180 = getelementptr inbounds %"struct.OpenMesh::FaceHandle", ptr %42, i32 0, i32 0
  %181 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %180, i32 0, i32 0
  %182 = load i32, ptr %181, align 4
  %183 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8OpenMesh11ArrayKernel6statusENS_10FaceHandleE(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %182)
  call void @_ZN8OpenMesh10Attributes10StatusInfo11set_deletedEb(ptr noundef nonnull align 4 dereferenceable(4) %183, i1 noundef zeroext true)
  br label %184

184:                                              ; preds = %173, %171
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %44, ptr align 4 %5, i64 4, i1 false)
  %185 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %44, i32 0, i32 0
  %186 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %185, i32 0, i32 0
  %187 = load i32, ptr %186, align 4
  %188 = call i32 @_ZNK8OpenMesh11ArrayKernel11edge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %187)
  %189 = getelementptr inbounds %"struct.OpenMesh::EdgeHandle", ptr %43, i32 0, i32 0
  %190 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %189, i32 0, i32 0
  store i32 %188, ptr %190, align 4
  %191 = getelementptr inbounds %"struct.OpenMesh::EdgeHandle", ptr %43, i32 0, i32 0
  %192 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %191, i32 0, i32 0
  %193 = load i32, ptr %192, align 4
  %194 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8OpenMesh11ArrayKernel6statusENS_10EdgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %47, i32 %193)
  call void @_ZN8OpenMesh10Attributes10StatusInfo11set_deletedEb(ptr noundef nonnull align 4 dereferenceable(4) %194, i1 noundef zeroext true)
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret void
}

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

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


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

%"struct.OpenMesh::HalfedgeHandle" = type { %"class.OpenMesh::BaseHandle" }
%"class.OpenMesh::BaseHandle" = type { i32 }
%"struct.OpenMesh::FaceHandle" = type { %"class.OpenMesh::BaseHandle" }

@_ZN8OpenMesh16PolyConnectivity21InvalidHalfedgeHandleE = external dso_local local_unnamed_addr global %"struct.OpenMesh::HalfedgeHandle", align 4
@.str.4 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [47 x i8], align 1
@__PRETTY_FUNCTION__._ZN8OpenMesh16PolyConnectivity13collapse_loopENS_14HalfedgeHandleE = external hidden unnamed_addr constant [63 x i8], align 1

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8OpenMesh10BaseHandleneERKS0_(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 i32 @_ZNK8OpenMesh11ArrayKernel24opposite_halfedge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368), i32) local_unnamed_addr #3 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZNK8OpenMesh11ArrayKernel11face_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368), i32) local_unnamed_addr #3 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 #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8OpenMesh16PolyConnectivity13collapse_loopENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(416) %0, i32 %1) local_unnamed_addr #3 align 2 {
  %3 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %4 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %5 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %6 = alloca %"struct.OpenMesh::FaceHandle", align 4
  %7 = alloca %"struct.OpenMesh::FaceHandle", align 4
  %8 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %9 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  store i32 %1, ptr %3, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %10 = tail call i32 @_ZNK8OpenMesh11ArrayKernel20next_halfedge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %1)
  store i32 %10, ptr %4, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %11 = tail call i32 @_ZNK8OpenMesh11ArrayKernel24opposite_halfedge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %1)
  store i32 %11, ptr %5, align 4
  %12 = tail call i32 @_ZNK8OpenMesh11ArrayKernel24opposite_halfedge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %10)
  %13 = tail call i32 @_ZNK8OpenMesh11ArrayKernel16to_vertex_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %1)
  %14 = tail call i32 @_ZNK8OpenMesh11ArrayKernel16to_vertex_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %10)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  %15 = tail call i32 @_ZNK8OpenMesh11ArrayKernel11face_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %1)
  store i32 %15, ptr %6, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  %16 = tail call i32 @_ZNK8OpenMesh11ArrayKernel11face_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %11)
  store i32 %16, ptr %7, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  %17 = tail call i32 @_ZNK8OpenMesh11ArrayKernel20next_halfedge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %10)
  store i32 %17, ptr %8, align 4
  %18 = call noundef zeroext i1 @_ZNK8OpenMesh10BaseHandleeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %3)
  br i1 %18, label %19, label %.critedge

19:                                               ; preds = %2
  %20 = call noundef zeroext i1 @_ZNK8OpenMesh10BaseHandleneERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  br i1 %20, label %21, label %.critedge

.critedge:                                        ; preds = %2, %19
  call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.4, i32 noundef 800, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8OpenMesh16PolyConnectivity13collapse_loopENS_14HalfedgeHandleE) #5
  unreachable

21:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  %.sroa.023.0.copyload = load i32, ptr %4, align 4
  %.sroa.021.0.copyload = load i32, ptr %5, align 4
  %22 = call i32 @_ZNK8OpenMesh11ArrayKernel20next_halfedge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %.sroa.021.0.copyload)
  call void @_ZN8OpenMesh11ArrayKernel24set_next_halfedge_handleENS_14HalfedgeHandleES1_(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %.sroa.023.0.copyload, i32 %22)
  %.sroa.019.0.copyload = load i32, ptr %5, align 4
  %23 = call i32 @_ZNK8OpenMesh11ArrayKernel20prev_halfedge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %.sroa.019.0.copyload)
  %.sroa.018.0.copyload = load i32, ptr %4, align 4
  call void @_ZN8OpenMesh11ArrayKernel24set_next_halfedge_handleENS_14HalfedgeHandleES1_(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %23, i32 %.sroa.018.0.copyload)
  %.sroa.017.0.copyload = load i32, ptr %4, align 4
  call void @_ZN8OpenMesh11ArrayKernel15set_face_handleENS_14HalfedgeHandleENS_10FaceHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %.sroa.017.0.copyload, i32 %16)
  %.sroa.014.0.copyload = load i32, ptr %4, align 4
  call void @_ZN8OpenMesh11ArrayKernel19set_halfedge_handleENS_12VertexHandleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %13, i32 %.sroa.014.0.copyload)
  call void @_ZN8OpenMesh16PolyConnectivity24adjust_outgoing_halfedgeENS_12VertexHandleE(ptr noundef nonnull align 8 dereferenceable(416) %0, i32 %13)
  call void @_ZN8OpenMesh11ArrayKernel19set_halfedge_handleENS_12VertexHandleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %14, i32 %12)
  call void @_ZN8OpenMesh16PolyConnectivity24adjust_outgoing_halfedgeENS_12VertexHandleE(ptr noundef nonnull align 8 dereferenceable(416) %0, i32 %14)
  %24 = call noundef zeroext i1 @_ZNK8OpenMesh10BaseHandle8is_validEv(ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  br i1 %24, label %25, label %.critedge2

25:                                               ; preds = %21
  %.sroa.09.0.copyload = load i32, ptr %7, align 4
  %26 = call i32 @_ZNK8OpenMesh11ArrayKernel15halfedge_handleENS_10FaceHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %.sroa.09.0.copyload)
  store i32 %26, ptr %9, align 4
  %27 = call noundef zeroext i1 @_ZNK8OpenMesh10BaseHandleeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  br i1 %27, label %28, label %29

28:                                               ; preds = %25
  %.sroa.08.0.copyload = load i32, ptr %7, align 4
  %.sroa.07.0.copyload = load i32, ptr %4, align 4
  call void @_ZN8OpenMesh11ArrayKernel19set_halfedge_handleENS_10FaceHandleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %.sroa.08.0.copyload, i32 %.sroa.07.0.copyload)
  br label %29

.critedge2:                                       ; preds = %21
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  br label %29

29:                                               ; preds = %.critedge2, %28, %25
  %30 = call noundef zeroext i1 @_ZNK8OpenMesh10BaseHandle8is_validEv(ptr noundef nonnull align 4 dereferenceable(4) %6)
  br i1 %30, label %31, label %33

31:                                               ; preds = %29
  %.sroa.06.0.copyload = load i32, ptr %6, align 4
  %.sroa.05.0.copyload = load i32, ptr @_ZN8OpenMesh16PolyConnectivity21InvalidHalfedgeHandleE, align 4
  call void @_ZN8OpenMesh11ArrayKernel19set_halfedge_handleENS_10FaceHandleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %.sroa.06.0.copyload, i32 %.sroa.05.0.copyload)
  %.sroa.04.0.copyload = load i32, ptr %6, align 4
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8OpenMesh11ArrayKernel6statusENS_10FaceHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %.sroa.04.0.copyload)
  call void @_ZN8OpenMesh10Attributes10StatusInfo11set_deletedEb(ptr noundef nonnull align 4 dereferenceable(4) %32, i1 noundef zeroext true)
  br label %33

33:                                               ; preds = %31, %29
  %.sroa.0.0.copyload = load i32, ptr %3, align 4
  %34 = call i32 @_ZNK8OpenMesh11ArrayKernel11edge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %.sroa.0.0.copyload)
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN8OpenMesh11ArrayKernel6statusENS_10EdgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %34)
  call void @_ZN8OpenMesh10Attributes10StatusInfo11set_deletedEb(ptr noundef nonnull align 4 dereferenceable(4) %35, i1 noundef zeroext true)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  ret void
}

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass