; LLVM IR from maliput/maliput :: src/maliput/utility (mesh_simplification)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector.83" = type { %"struct.std::_Vector_base.84" }
%"struct.std::_Vector_base.84" = type { %"struct.std::_Vector_base<maliput::utility::mesh::FaceVertexIndex, std::allocator<maliput::utility::mesh::FaceVertexIndex>>::_Vector_impl" }
%"struct.std::_Vector_base<maliput::utility::mesh::FaceVertexIndex, std::allocator<maliput::utility::mesh::FaceVertexIndex>>::_Vector_impl" = type { %"struct.std::_Vector_base<maliput::utility::mesh::FaceVertexIndex, std::allocator<maliput::utility::mesh::FaceVertexIndex>>::_Vector_impl_data" }
%"struct.std::_Vector_base<maliput::utility::mesh::FaceVertexIndex, std::allocator<maliput::utility::mesh::FaceVertexIndex>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.maliput::utility::mesh::GeoFace" = type { %"class.std::vector.91", %"class.std::vector.96" }
%"class.std::vector.91" = type { %"struct.std::_Vector_base.92" }
%"struct.std::_Vector_base.92" = type { %"struct.std::_Vector_base<maliput::utility::mesh::GeoVertex, std::allocator<maliput::utility::mesh::GeoVertex>>::_Vector_impl" }
%"struct.std::_Vector_base<maliput::utility::mesh::GeoVertex, std::allocator<maliput::utility::mesh::GeoVertex>>::_Vector_impl" = type { %"struct.std::_Vector_base<maliput::utility::mesh::GeoVertex, std::allocator<maliput::utility::mesh::GeoVertex>>::_Vector_impl_data" }
%"struct.std::_Vector_base<maliput::utility::mesh::GeoVertex, std::allocator<maliput::utility::mesh::GeoVertex>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.96" = type { %"struct.std::_Vector_base.97" }
%"struct.std::_Vector_base.97" = type { %"struct.std::_Vector_base<maliput::utility::mesh::GeoNormal, std::allocator<maliput::utility::mesh::GeoNormal>>::_Vector_impl" }
%"struct.std::_Vector_base<maliput::utility::mesh::GeoNormal, std::allocator<maliput::utility::mesh::GeoNormal>>::_Vector_impl" = type { %"struct.std::_Vector_base<maliput::utility::mesh::GeoNormal, std::allocator<maliput::utility::mesh::GeoNormal>>::_Vector_impl_data" }
%"struct.std::_Vector_base<maliput::utility::mesh::GeoNormal, std::allocator<maliput::utility::mesh::GeoNormal>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.88" = type { ptr }
%"struct.maliput::utility::mesh::IndexFace::Vertex" = type { i32, i32 }

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maliput7utility4mesh23ComputeMeshFacesContourERKSt3setIiSt4lessIiESaIiEERKSt13unordered_mapIiSt6vectorINS1_13FaceEdgeIndexESaISB_EESt4hashIiESt8equal_toIiESaISt4pairIKiSD_EEE(ptr dead_on_unwind noalias writable sret(%"class.std::vector.83") align 8, ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(56)) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN7maliput7utility4mesh16MeshFaceVertexAtERKNS1_7GeoMeshERKNS1_15FaceVertexIndexE(ptr noundef nonnull align 8 dereferenceable(184), ptr noundef nonnull align 4 dereferenceable(8)) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maliput7utility4mesh24SimplifyMeshFacesContourERKNS1_7GeoMeshERKSt6vectorINS1_15FaceVertexIndexESaIS6_EEd(ptr dead_on_unwind noalias writable sret(%"class.std::vector.83") align 8, ptr noundef nonnull align 8 dereferenceable(184), ptr noundef nonnull align 8 dereferenceable(24), double noundef) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7maliput7utility4mesh14MergeMeshFacesERKNS1_7GeoMeshERKSt3setIiSt4lessIiESaIiEERKSt13unordered_mapIiSt6vectorINS1_13FaceEdgeIndexESaISE_EESt4hashIiESt8equal_toIiESaISt4pairIKiSG_EEEd(ptr dead_on_unwind noalias writable sret(%"class.maliput::utility::mesh::GeoFace") align 8 %0, ptr noundef nonnull align 8 dereferenceable(184) %1, ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(56) %3, double noundef %4) #1 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca double, align 8
  %11 = alloca %"class.std::vector.83", align 8
  %12 = alloca %"class.std::vector.83", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i1, align 1
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.88", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.88", align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store double %4, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #4
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #4
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN7maliput7utility4mesh23ComputeMeshFacesContourERKSt3setIiSt4lessIiESaIiEERKSt13unordered_mapIiSt6vectorINS1_13FaceEdgeIndexESaISB_EESt4hashIiESt8equal_toIiESaISt4pairIKiSD_EEE(ptr dead_on_unwind writable sret(%"class.std::vector.83") align 8 %12, ptr noundef nonnull align 8 dereferenceable(48) %24, ptr noundef nonnull align 8 dereferenceable(56) %25)
  %26 = load double, ptr %10, align 8, !tbaa !9
  invoke void @_ZN7maliput7utility4mesh24SimplifyMeshFacesContourERKNS1_7GeoMeshERKSt6vectorINS1_15FaceVertexIndexESaIS6_EEd(ptr dead_on_unwind writable sret(%"class.std::vector.83") align 8 %11, ptr noundef nonnull align 8 dereferenceable(184) %23, ptr noundef nonnull align 8 dereferenceable(24) %12, double noundef %26)
          to label %27 unwind label %44

27:                                               ; preds = %5
  call void @_ZNSt6vectorIN7maliput7utility4mesh15FaceVertexIndexESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  store i1 false, ptr %15, align 1
  invoke void @_ZN7maliput7utility4mesh7GeoFaceC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0)
          to label %28 unwind label %48

28:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7maliput7utility4mesh7GeoMesh8verticesEv(ptr noundef nonnull align 8 dereferenceable(184) %29)
          to label %31 unwind label %52

31:                                               ; preds = %28
  store ptr %30, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7maliput7utility4mesh7GeoMesh7normalsEv(ptr noundef nonnull align 8 dereferenceable(184) %32)
          to label %34 unwind label %56

34:                                               ; preds = %31
  store ptr %33, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  store ptr %11, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %35 = load ptr, ptr %18, align 8, !tbaa !5
  %36 = call ptr @_ZNKSt6vectorIN7maliput7utility4mesh15FaceVertexIndexESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #4
  %37 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.88", ptr %19, i32 0, i32 0
  store ptr %36, ptr %37, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %38 = load ptr, ptr %18, align 8, !tbaa !5
  %39 = call ptr @_ZNKSt6vectorIN7maliput7utility4mesh15FaceVertexIndexESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #4
  %40 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.88", ptr %20, i32 0, i32 0
  store ptr %39, ptr %40, align 8
  br label %41

41:                                               ; preds = %81, %34
  %42 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7maliput7utility4mesh15FaceVertexIndexESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #4
  br i1 %42, label %60, label %43

43:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %87

44:                                               ; preds = %5
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %13, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %14, align 4
  call void @_ZNSt6vectorIN7maliput7utility4mesh15FaceVertexIndexESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  br label %94

48:                                               ; preds = %27
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %13, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %14, align 4
  br label %93

52:                                               ; preds = %28
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %13, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %14, align 4
  br label %90

56:                                               ; preds = %31
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %13, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %14, align 4
  br label %89

60:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %61 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN7maliput7utility4mesh15FaceVertexIndexESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #4
  store ptr %61, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = load ptr, ptr %21, align 8, !tbaa !5
  %64 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN7maliput7utility4mesh16MeshFaceVertexAtERKNS1_7GeoMeshERKNS1_15FaceVertexIndexE(ptr noundef nonnull align 8 dereferenceable(184) %62, ptr noundef nonnull align 4 dereferenceable(8) %63)
          to label %65 unwind label %83

65:                                               ; preds = %60
  store ptr %64, ptr %22, align 8, !tbaa !5
  %66 = load ptr, ptr %16, align 8, !tbaa !5
  %67 = load ptr, ptr %22, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.maliput::utility::mesh::IndexFace::Vertex", ptr %67, i32 0, i32 0
  %69 = load i32, ptr %68, align 4, !tbaa !11
  %70 = sext i32 %69 to i64
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPKN7maliput7utility4mesh9GeoVertexESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %70) #4
  %72 = load ptr, ptr %71, align 8, !tbaa !5
  %73 = load ptr, ptr %17, align 8, !tbaa !5
  %74 = load ptr, ptr %22, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.maliput::utility::mesh::IndexFace::Vertex", ptr %74, i32 0, i32 1
  %76 = load i32, ptr %75, align 4, !tbaa !14
  %77 = sext i32 %76 to i64
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPKN7maliput7utility4mesh9GeoNormalESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef %77) #4
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  invoke void @_ZN7maliput7utility4mesh7GeoFace7push_vnERKNS1_9GeoVertexERKNS1_9GeoNormalE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(24) %72, ptr noundef nonnull align 8 dereferenceable(24) %79)
          to label %80 unwind label %83

80:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  br label %81

81:                                               ; preds = %80
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN7maliput7utility4mesh15FaceVertexIndexESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #4
  br label %41

83:                                               ; preds = %65, %60
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %13, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %89

87:                                               ; preds = %43
  store i1 true, ptr %15, align 1
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  %88 = load i1, ptr %15, align 1
  br i1 %88, label %92, label %91

89:                                               ; preds = %83, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %90

90:                                               ; preds = %89, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @_ZN7maliput7utility4mesh7GeoFaceD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #4
  br label %93

91:                                               ; preds = %87
  call void @_ZN7maliput7utility4mesh7GeoFaceD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #4
  br label %92

92:                                               ; preds = %91, %87
  call void @_ZNSt6vectorIN7maliput7utility4mesh15FaceVertexIndexESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  ret void

93:                                               ; preds = %90, %48
  call void @_ZNSt6vectorIN7maliput7utility4mesh15FaceVertexIndexESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  br label %94

94:                                               ; preds = %93, %44
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  br label %95

95:                                               ; preds = %94
  %96 = load ptr, ptr %13, align 8
  %97 = load i32, ptr %14, align 4
  %98 = insertvalue { ptr, i32 } poison, ptr %96, 0
  %99 = insertvalue { ptr, i32 } %98, i32 %97, 1
  resume { ptr, i32 } %99
}

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

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

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

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

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

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

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

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

attributes #0 = { 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 = !{!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 = !{!"double", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN7maliput7utility4mesh9IndexFace6VertexE", !13, i64 0, !13, i64 4}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !13, i64 4}


; 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.83" = type { %"struct.std::_Vector_base.84" }
%"struct.std::_Vector_base.84" = type { %"struct.std::_Vector_base<maliput::utility::mesh::FaceVertexIndex, std::allocator<maliput::utility::mesh::FaceVertexIndex>>::_Vector_impl" }
%"struct.std::_Vector_base<maliput::utility::mesh::FaceVertexIndex, std::allocator<maliput::utility::mesh::FaceVertexIndex>>::_Vector_impl" = type { %"struct.std::_Vector_base<maliput::utility::mesh::FaceVertexIndex, std::allocator<maliput::utility::mesh::FaceVertexIndex>>::_Vector_impl_data" }
%"struct.std::_Vector_base<maliput::utility::mesh::FaceVertexIndex, std::allocator<maliput::utility::mesh::FaceVertexIndex>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.maliput::utility::mesh::GeoFace" = type { %"class.std::vector.91", %"class.std::vector.96" }
%"class.std::vector.91" = type { %"struct.std::_Vector_base.92" }
%"struct.std::_Vector_base.92" = type { %"struct.std::_Vector_base<maliput::utility::mesh::GeoVertex, std::allocator<maliput::utility::mesh::GeoVertex>>::_Vector_impl" }
%"struct.std::_Vector_base<maliput::utility::mesh::GeoVertex, std::allocator<maliput::utility::mesh::GeoVertex>>::_Vector_impl" = type { %"struct.std::_Vector_base<maliput::utility::mesh::GeoVertex, std::allocator<maliput::utility::mesh::GeoVertex>>::_Vector_impl_data" }
%"struct.std::_Vector_base<maliput::utility::mesh::GeoVertex, std::allocator<maliput::utility::mesh::GeoVertex>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.96" = type { %"struct.std::_Vector_base.97" }
%"struct.std::_Vector_base.97" = type { %"struct.std::_Vector_base<maliput::utility::mesh::GeoNormal, std::allocator<maliput::utility::mesh::GeoNormal>>::_Vector_impl" }
%"struct.std::_Vector_base<maliput::utility::mesh::GeoNormal, std::allocator<maliput::utility::mesh::GeoNormal>>::_Vector_impl" = type { %"struct.std::_Vector_base<maliput::utility::mesh::GeoNormal, std::allocator<maliput::utility::mesh::GeoNormal>>::_Vector_impl_data" }
%"struct.std::_Vector_base<maliput::utility::mesh::GeoNormal, std::allocator<maliput::utility::mesh::GeoNormal>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.88" = 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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maliput7utility4mesh23ComputeMeshFacesContourERKSt3setIiSt4lessIiESaIiEERKSt13unordered_mapIiSt6vectorINS1_13FaceEdgeIndexESaISB_EESt4hashIiESt8equal_toIiESaISt4pairIKiSD_EEE(ptr dead_on_unwind noalias writable sret(%"class.std::vector.83") align 8, ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN7maliput7utility4mesh16MeshFaceVertexAtERKNS1_7GeoMeshERKNS1_15FaceVertexIndexE(ptr noundef nonnull align 8 dereferenceable(184), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maliput7utility4mesh24SimplifyMeshFacesContourERKNS1_7GeoMeshERKSt6vectorINS1_15FaceVertexIndexESaIS6_EEd(ptr dead_on_unwind noalias writable sret(%"class.std::vector.83") align 8, ptr noundef nonnull align 8 dereferenceable(184), ptr noundef nonnull align 8 dereferenceable(24), double noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7maliput7utility4mesh14MergeMeshFacesERKNS1_7GeoMeshERKSt3setIiSt4lessIiESaIiEERKSt13unordered_mapIiSt6vectorINS1_13FaceEdgeIndexESaISE_EESt4hashIiESt8equal_toIiESaISt4pairIKiSG_EEEd(ptr dead_on_unwind noalias writable sret(%"class.maliput::utility::mesh::GeoFace") align 8 %0, ptr noundef nonnull align 8 dereferenceable(184) %1, ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(56) %3, double noundef %4) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::vector.83", align 8
  %7 = alloca %"class.std::vector.83", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.88", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.88", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #4
  call void @_ZN7maliput7utility4mesh23ComputeMeshFacesContourERKSt3setIiSt4lessIiESaIiEERKSt13unordered_mapIiSt6vectorINS1_13FaceEdgeIndexESaISB_EESt4hashIiESt8equal_toIiESaISt4pairIKiSD_EEE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.83") align 8 %7, ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(56) %3)
  invoke void @_ZN7maliput7utility4mesh24SimplifyMeshFacesContourERKNS1_7GeoMeshERKSt6vectorINS1_15FaceVertexIndexESaIS6_EEd(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.83") align 8 %6, ptr noundef nonnull align 8 dereferenceable(184) %1, ptr noundef nonnull align 8 dereferenceable(24) %7, double noundef %4)
          to label %10 unwind label %18

10:                                               ; preds = %5
  call void @_ZNSt6vectorIN7maliput7utility4mesh15FaceVertexIndexESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  call void @_ZN7maliput7utility4mesh7GeoFaceC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0)
  %11 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7maliput7utility4mesh7GeoMesh8verticesEv(ptr noundef nonnull align 8 dereferenceable(184) %1)
          to label %12 unwind label %20

12:                                               ; preds = %10
  %13 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7maliput7utility4mesh7GeoMesh7normalsEv(ptr noundef nonnull align 8 dereferenceable(184) %1)
          to label %14 unwind label %22

14:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %15 = call ptr @_ZNKSt6vectorIN7maliput7utility4mesh15FaceVertexIndexESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  store ptr %15, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %16 = call ptr @_ZNKSt6vectorIN7maliput7utility4mesh15FaceVertexIndexESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  store ptr %16, ptr %9, align 8
  %17 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7maliput7utility4mesh15FaceVertexIndexESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  br i1 %17, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %36, %14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @_ZNSt6vectorIN7maliput7utility4mesh15FaceVertexIndexESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  ret void

18:                                               ; preds = %5
  %19 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIN7maliput7utility4mesh15FaceVertexIndexESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  br label %42

20:                                               ; preds = %10
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %41

22:                                               ; preds = %12
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %41

.lr.ph:                                           ; preds = %14, %36
  %24 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN7maliput7utility4mesh15FaceVertexIndexESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  %25 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN7maliput7utility4mesh16MeshFaceVertexAtERKNS1_7GeoMeshERKNS1_15FaceVertexIndexE(ptr noundef nonnull align 8 dereferenceable(184) %1, ptr noundef nonnull align 4 dereferenceable(8) %24)
          to label %26 unwind label %39

26:                                               ; preds = %.lr.ph
  %27 = load i32, ptr %25, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPKN7maliput7utility4mesh9GeoVertexESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %28) #4
  %30 = load ptr, ptr %29, align 8, !tbaa !10
  %31 = getelementptr inbounds i8, ptr %25, i64 4
  %32 = load i32, ptr %31, align 4, !tbaa !12
  %33 = sext i32 %32 to i64
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPKN7maliput7utility4mesh9GeoNormalESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %33) #4
  %35 = load ptr, ptr %34, align 8, !tbaa !10
  invoke void @_ZN7maliput7utility4mesh7GeoFace7push_vnERKNS1_9GeoVertexERKNS1_9GeoNormalE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(24) %30, ptr noundef nonnull align 8 dereferenceable(24) %35)
          to label %36 unwind label %39

36:                                               ; preds = %26
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN7maliput7utility4mesh15FaceVertexIndexESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  %38 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7maliput7utility4mesh15FaceVertexIndexESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  br i1 %38, label %.lr.ph, label %._crit_edge

39:                                               ; preds = %26, %.lr.ph
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  br label %41

41:                                               ; preds = %22, %39, %20
  %.pn.pn = phi { ptr, i32 } [ %21, %20 ], [ %40, %39 ], [ %23, %22 ]
  call void @_ZN7maliput7utility4mesh7GeoFaceD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #4
  call void @_ZNSt6vectorIN7maliput7utility4mesh15FaceVertexIndexESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  br label %42

42:                                               ; preds = %41, %18
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %41 ], [ %19, %18 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  resume { ptr, i32 } %.pn.pn.pn
}

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPKN7maliput7utility4mesh9GeoNormalESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) 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_iteratorIPKN7maliput7utility4mesh15FaceVertexIndexESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7maliput7utility4mesh7GeoFaceD2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 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 = !{!6, !7, i64 0}
!6 = !{!"_ZTSN7maliput7utility4mesh9IndexFace6VertexE", !7, i64 0, !7, i64 4}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !7, i64 4}


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