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

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

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

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

; 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 i32 @_ZNK8OpenMesh11ArrayKernel24opposite_halfedge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368), i32) #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local i32 @_ZN8OpenMesh15TriConnectivity11insert_loopENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(416) %0, i32 %1) #2 align 2 {
  %3 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %4 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %5 = alloca ptr, align 8
  %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::VertexHandle", align 4
  %10 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %11 = alloca %"struct.OpenMesh::VertexHandle", align 4
  %12 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %13 = alloca %"struct.OpenMesh::VertexHandle", align 4
  %14 = alloca %"struct.OpenMesh::VertexHandle", align 4
  %15 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %16 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %17 = alloca %"struct.OpenMesh::FaceHandle", align 4
  %18 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %19 = alloca %"struct.OpenMesh::FaceHandle", 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::HalfedgeHandle", align 4
  %30 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %31 = alloca %"struct.OpenMesh::FaceHandle", align 4
  %32 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %33 = alloca %"struct.OpenMesh::FaceHandle", align 4
  %34 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %35 = alloca %"struct.OpenMesh::FaceHandle", align 4
  %36 = alloca %"struct.OpenMesh::FaceHandle", align 4
  %37 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %38 = alloca %"struct.OpenMesh::FaceHandle", align 4
  %39 = alloca %"struct.OpenMesh::HalfedgeHandle", align 4
  %40 = alloca %"struct.OpenMesh::VertexHandle", align 4
  %41 = alloca %"struct.OpenMesh::VertexHandle", align 4
  %42 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %4, i32 0, i32 0
  %43 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %42, i32 0, i32 0
  store i32 %1, ptr %43, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  %44 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %6, ptr align 4 %4, i64 4, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %6, i64 4, i1 false)
  %45 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %8, i32 0, i32 0
  %46 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %45, i32 0, i32 0
  %47 = load i32, ptr %46, align 4
  %48 = call i32 @_ZNK8OpenMesh11ArrayKernel24opposite_halfedge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %44, i32 %47)
  %49 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %7, i32 0, i32 0
  %50 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %49, i32 0, i32 0
  store i32 %48, ptr %50, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 4 %7, i64 4, i1 false)
  %51 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %10, i32 0, i32 0
  %52 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %51, i32 0, i32 0
  %53 = load i32, ptr %52, align 4
  %54 = call i32 @_ZNK8OpenMesh11ArrayKernel16to_vertex_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %44, i32 %53)
  %55 = getelementptr inbounds %"struct.OpenMesh::VertexHandle", ptr %9, i32 0, i32 0
  %56 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %55, i32 0, i32 0
  store i32 %54, ptr %56, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %6, i64 4, i1 false)
  %57 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %12, i32 0, i32 0
  %58 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %57, i32 0, i32 0
  %59 = load i32, ptr %58, align 4
  %60 = call i32 @_ZNK8OpenMesh11ArrayKernel16to_vertex_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %44, i32 %59)
  %61 = getelementptr inbounds %"struct.OpenMesh::VertexHandle", ptr %11, i32 0, i32 0
  %62 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %61, i32 0, i32 0
  store i32 %60, ptr %62, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %11, i64 4, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %9, i64 4, i1 false)
  %63 = getelementptr inbounds %"struct.OpenMesh::VertexHandle", ptr %13, i32 0, i32 0
  %64 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %63, i32 0, i32 0
  %65 = load i32, ptr %64, align 4
  %66 = getelementptr inbounds %"struct.OpenMesh::VertexHandle", ptr %14, 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 @_ZN8OpenMesh11ArrayKernel8new_edgeENS_12VertexHandleES1_(ptr noundef nonnull align 8 dereferenceable(368) %44, i32 %65, i32 %68)
  %70 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %3, 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 %15) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %3, i64 4, i1 false)
  %72 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %16, 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 @_ZNK8OpenMesh11ArrayKernel24opposite_halfedge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %44, i32 %74)
  %76 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %15, 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 %17) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %6, i64 4, i1 false)
  %78 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %18, 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) %44, i32 %80)
  %82 = getelementptr inbounds %"struct.OpenMesh::FaceHandle", ptr %17, 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 %19) #6
  %84 = call i32 @_ZN8OpenMesh11ArrayKernel8new_faceEv(ptr noundef nonnull align 8 dereferenceable(368) %44)
  %85 = getelementptr inbounds %"struct.OpenMesh::FaceHandle", ptr %19, i32 0, i32 0
  %86 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %85, i32 0, i32 0
  store i32 %84, ptr %86, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %6, i64 4, i1 false)
  %87 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %21, i32 0, i32 0
  %88 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %87, i32 0, i32 0
  %89 = load i32, ptr %88, align 4
  %90 = call i32 @_ZNK8OpenMesh11ArrayKernel20prev_halfedge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %44, i32 %89)
  %91 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %20, i32 0, i32 0
  %92 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %91, i32 0, i32 0
  store i32 %90, ptr %92, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %15, i64 4, i1 false)
  %93 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %20, i32 0, i32 0
  %94 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %93, i32 0, i32 0
  %95 = load i32, ptr %94, align 4
  %96 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %22, i32 0, i32 0
  %97 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %96, i32 0, i32 0
  %98 = load i32, ptr %97, align 4
  call void @_ZN8OpenMesh11ArrayKernel24set_next_halfedge_handleENS_14HalfedgeHandleES1_(ptr noundef nonnull align 8 dereferenceable(368) %44, i32 %95, i32 %98)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %15, i64 4, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %6, i64 4, i1 false)
  %99 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %25, i32 0, i32 0
  %100 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %99, i32 0, i32 0
  %101 = load i32, ptr %100, align 4
  %102 = call i32 @_ZNK8OpenMesh11ArrayKernel20next_halfedge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %44, i32 %101)
  %103 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %24, i32 0, i32 0
  %104 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %103, i32 0, i32 0
  store i32 %102, ptr %104, align 4
  %105 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %23, i32 0, i32 0
  %106 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %105, i32 0, i32 0
  %107 = load i32, ptr %106, align 4
  %108 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %24, i32 0, i32 0
  %109 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %108, i32 0, i32 0
  %110 = load i32, ptr %109, align 4
  call void @_ZN8OpenMesh11ArrayKernel24set_next_halfedge_handleENS_14HalfedgeHandleES1_(ptr noundef nonnull align 8 dereferenceable(368) %44, i32 %107, i32 %110)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %3, i64 4, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %6, i64 4, i1 false)
  %111 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %26, 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 %27, 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) %44, i32 %113, i32 %116)
  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 %3, i64 4, i1 false)
  %117 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %28, i32 0, i32 0
  %118 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %117, i32 0, i32 0
  %119 = load i32, ptr %118, align 4
  %120 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %29, i32 0, i32 0
  %121 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %120, i32 0, i32 0
  %122 = load i32, ptr %121, align 4
  call void @_ZN8OpenMesh11ArrayKernel24set_next_halfedge_handleENS_14HalfedgeHandleES1_(ptr noundef nonnull align 8 dereferenceable(368) %44, i32 %119, i32 %122)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %15, i64 4, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 4 %17, i64 4, i1 false)
  %123 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %30, 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::FaceHandle", ptr %31, 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 @_ZN8OpenMesh11ArrayKernel15set_face_handleENS_14HalfedgeHandleENS_10FaceHandleE(ptr noundef nonnull align 8 dereferenceable(368) %44, i32 %125, i32 %128)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %6, i64 4, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 %19, i64 4, i1 false)
  %129 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %32, 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 %33, 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) %44, i32 %131, i32 %134)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 4 %3, i64 4, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %19, i64 4, i1 false)
  %135 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %34, 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::FaceHandle", ptr %35, 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 @_ZN8OpenMesh11ArrayKernel15set_face_handleENS_14HalfedgeHandleENS_10FaceHandleE(ptr noundef nonnull align 8 dereferenceable(368) %44, i32 %137, i32 %140)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 %19, i64 4, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %6, i64 4, i1 false)
  %141 = getelementptr inbounds %"struct.OpenMesh::FaceHandle", ptr %36, i32 0, i32 0
  %142 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %141, i32 0, i32 0
  %143 = load i32, ptr %142, align 4
  %144 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %37, i32 0, i32 0
  %145 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %144, i32 0, i32 0
  %146 = load i32, ptr %145, align 4
  call void @_ZN8OpenMesh11ArrayKernel19set_halfedge_handleENS_10FaceHandleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %44, i32 %143, i32 %146)
  %147 = call noundef zeroext i1 @_ZNK8OpenMesh10BaseHandle8is_validEv(ptr noundef nonnull align 4 dereferenceable(4) %17)
  br i1 %147, label %148, label %155

148:                                              ; preds = %2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %38, ptr align 4 %17, i64 4, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 4 %15, i64 4, i1 false)
  %149 = getelementptr inbounds %"struct.OpenMesh::FaceHandle", ptr %38, i32 0, i32 0
  %150 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %149, i32 0, i32 0
  %151 = load i32, ptr %150, align 4
  %152 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %39, i32 0, i32 0
  %153 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %152, i32 0, i32 0
  %154 = load i32, ptr %153, align 4
  call void @_ZN8OpenMesh11ArrayKernel19set_halfedge_handleENS_10FaceHandleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %44, i32 %151, i32 %154)
  br label %155

155:                                              ; preds = %148, %2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %40, ptr align 4 %9, i64 4, i1 false)
  %156 = getelementptr inbounds %"struct.OpenMesh::VertexHandle", ptr %40, i32 0, i32 0
  %157 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %156, i32 0, i32 0
  %158 = load i32, ptr %157, align 4
  call void @_ZN8OpenMesh16PolyConnectivity24adjust_outgoing_halfedgeENS_12VertexHandleE(ptr noundef nonnull align 8 dereferenceable(416) %44, i32 %158)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %41, ptr align 4 %11, i64 4, i1 false)
  %159 = getelementptr inbounds %"struct.OpenMesh::VertexHandle", ptr %41, i32 0, i32 0
  %160 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %159, i32 0, i32 0
  %161 = load i32, ptr %160, align 4
  call void @_ZN8OpenMesh16PolyConnectivity24adjust_outgoing_halfedgeENS_12VertexHandleE(ptr noundef nonnull align 8 dereferenceable(416) %44, i32 %161)
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %162 = getelementptr inbounds %"struct.OpenMesh::HalfedgeHandle", ptr %3, i32 0, i32 0
  %163 = getelementptr inbounds %"class.OpenMesh::BaseHandle", ptr %162, i32 0, i32 0
  %164 = load i32, ptr %163, align 4
  ret i32 %164
}

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

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

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

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

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

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

declare void @_ZN8OpenMesh16PolyConnectivity24adjust_outgoing_halfedgeENS_12VertexHandleE(ptr noundef nonnull align 8 dereferenceable(416), i32) #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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::FaceHandle" = type { %"class.OpenMesh::BaseHandle" }
%"class.OpenMesh::BaseHandle" = type { i32 }

; 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 i32 @_ZNK8OpenMesh11ArrayKernel24opposite_halfedge_handleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368), i32) local_unnamed_addr #1 align 2

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

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

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

14:                                               ; preds = %2
  %.sroa.03.0.copyload = load i32, ptr %3, align 4
  call void @_ZN8OpenMesh11ArrayKernel19set_halfedge_handleENS_10FaceHandleENS_14HalfedgeHandleE(ptr noundef nonnull align 8 dereferenceable(368) %0, i32 %.sroa.03.0.copyload, i32 %8)
  br label %15

15:                                               ; preds = %14, %2
  call void @_ZN8OpenMesh16PolyConnectivity24adjust_outgoing_halfedgeENS_12VertexHandleE(ptr noundef nonnull align 8 dereferenceable(416) %0, i32 %5)
  call void @_ZN8OpenMesh16PolyConnectivity24adjust_outgoing_halfedgeENS_12VertexHandleE(ptr noundef nonnull align 8 dereferenceable(416) %0, i32 %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  ret i32 %7
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN8OpenMesh11ArrayKernel8new_faceEv(ptr noundef nonnull align 8 dereferenceable(368)) 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 #1 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 #1 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 #1 align 2

declare void @_ZN8OpenMesh16PolyConnectivity24adjust_outgoing_halfedgeENS_12VertexHandleE(ptr noundef nonnull align 8 dereferenceable(416), i32) local_unnamed_addr #4

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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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,TailCallElimPass