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

%"struct.maliput::utility::mesh::FaceEdgeIndex" = type { i32, i32 }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.82" = type { ptr }
%class.anon = type { ptr }

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local i64 @_ZN7maliput7utility4mesh22FindOuterFaceEdgeIndexERKSt3setIiSt4lessIiESaIiEERKSt13unordered_mapIiSt6vectorINS1_13FaceEdgeIndexESaISB_EESt4hashIiESt8equal_toIiESaISt4pairIKiSD_EEE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(56) %1) #2 {
  %3 = alloca %"struct.maliput::utility::mesh::FaceEdgeIndex", align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %8 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.82", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.82", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.82", align 8
  %15 = alloca %class.anon, align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator.82", align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.82", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.82", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %20, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %21) #7
  %23 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %7, i32 0, i32 0
  store ptr %22, ptr %23, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %24) #7
  %26 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %8, i32 0, i32 0
  store ptr %25, ptr %26, align 8
  br label %27

27:                                               ; preds = %76, %2
  %28 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br i1 %28, label %30, label %29

29:                                               ; preds = %27
  store i32 2, ptr %9, align 4
  br label %78

30:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  %32 = load i32, ptr %31, align 4, !tbaa !9
  store i32 %32, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt13unordered_mapIiSt6vectorIN7maliput7utility4mesh13FaceEdgeIndexESaIS4_EESt4hashIiESt8equal_toIiESaISt4pairIKiS6_EEE2atERSC_(ptr noundef nonnull align 8 dereferenceable(56) %33, ptr noundef nonnull align 4 dereferenceable(4) %10)
  store ptr %34, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %35 = load ptr, ptr %11, align 8, !tbaa !5
  %36 = call ptr @_ZNKSt6vectorIN7maliput7utility4mesh13FaceEdgeIndexESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #7
  %37 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.82", ptr %13, i32 0, i32 0
  store ptr %36, ptr %37, align 8
  %38 = load ptr, ptr %11, align 8, !tbaa !5
  %39 = call ptr @_ZNKSt6vectorIN7maliput7utility4mesh13FaceEdgeIndexESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #7
  %40 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.82", ptr %14, i32 0, i32 0
  store ptr %39, ptr %40, align 8
  %41 = getelementptr inbounds %class.anon, ptr %15, i32 0, i32 0
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %42, ptr %41, align 8, !tbaa !5
  %43 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.82", ptr %13, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8
  %45 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.82", ptr %14, i32 0, i32 0
  %46 = load ptr, ptr %45, align 8
  %47 = getelementptr inbounds %class.anon, ptr %15, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8
  %49 = call ptr @"_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPKN7maliput7utility4mesh13FaceEdgeIndexESt6vectorIS5_SaIS5_EEEEZNS4_22FindOuterFaceEdgeIndexERKSt3setIiSt4lessIiESaIiEERKSt13unordered_mapIiSA_St4hashIiESt8equal_toIiESaISt4pairIKiSA_EEEE3$_0ET_SW_SW_T0_"(ptr %44, ptr %46, ptr %48)
  %50 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.82", ptr %12, i32 0, i32 0
  store ptr %49, ptr %50, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %51 = load ptr, ptr %11, align 8, !tbaa !5
  %52 = call ptr @_ZNKSt6vectorIN7maliput7utility4mesh13FaceEdgeIndexESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %51) #7
  %53 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.82", ptr %16, i32 0, i32 0
  store ptr %52, ptr %53, align 8
  %54 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7maliput7utility4mesh13FaceEdgeIndexESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br i1 %54, label %55, label %69

55:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %56 = load ptr, ptr %11, align 8, !tbaa !5
  %57 = call ptr @_ZNKSt6vectorIN7maliput7utility4mesh13FaceEdgeIndexESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %56) #7
  %58 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.82", ptr %18, i32 0, i32 0
  store ptr %57, ptr %58, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %12, i64 8, i1 false), !tbaa.struct !11
  %59 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.82", ptr %18, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8
  %61 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.82", ptr %19, i32 0, i32 0
  %62 = load ptr, ptr %61, align 8
  %63 = call noundef i64 @_ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPKN7maliput7utility4mesh13FaceEdgeIndexESt6vectorIS5_SaIS5_EEEEENSt15iterator_traitsIT_E15difference_typeESD_SD_(ptr %60, ptr %62)
  %64 = trunc i64 %63 to i32
  store i32 %64, ptr %17, align 4, !tbaa !9
  %65 = getelementptr inbounds %"struct.maliput::utility::mesh::FaceEdgeIndex", ptr %3, i32 0, i32 0
  %66 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %66, ptr %65, align 4, !tbaa !12
  %67 = getelementptr inbounds %"struct.maliput::utility::mesh::FaceEdgeIndex", ptr %3, i32 0, i32 1
  %68 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %68, ptr %67, align 4, !tbaa !14
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %70

69:                                               ; preds = %30
  store i32 0, ptr %9, align 4
  br label %70

70:                                               ; preds = %69, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  %71 = load i32, ptr %9, align 4
  switch i32 %71, label %73 [
    i32 0, label %72
  ]

72:                                               ; preds = %70
  store i32 0, ptr %9, align 4
  br label %73

73:                                               ; preds = %72, %70
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  %74 = load i32, ptr %9, align 4
  switch i32 %74, label %78 [
    i32 0, label %75
  ]

75:                                               ; preds = %73
  br label %76

76:                                               ; preds = %75
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br label %27

78:                                               ; preds = %73, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  %79 = load i32, ptr %9, align 4
  switch i32 %79, label %83 [
    i32 2, label %80
    i32 1, label %81
  ]

80:                                               ; preds = %78
  call void @llvm.memset.p0.i64(ptr align 4 %3, i8 0, i64 8, i1 false)
  call void @_ZN7maliput7utility4mesh13FaceEdgeIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %3) #7
  br label %81

81:                                               ; preds = %80, %78
  %82 = load i64, ptr %3, align 4
  ret i64 %82

83:                                               ; preds = %78
  unreachable
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden ptr @"_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPKN7maliput7utility4mesh13FaceEdgeIndexESt6vectorIS5_SaIS5_EEEEZNS4_22FindOuterFaceEdgeIndexERKSt3setIiSt4lessIiESaIiEERKSt13unordered_mapIiSA_St4hashIiESt8equal_toIiESaISt4pairIKiSA_EEEE3$_0ET_SW_SW_T0_"(ptr, ptr, ptr) #4

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPKN7maliput7utility4mesh13FaceEdgeIndexESt6vectorIS5_SaIS5_EEEEENSt15iterator_traitsIT_E15difference_typeESD_SD_(ptr, ptr) #4

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

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

%"struct.maliput::utility::mesh::FaceEdgeIndex" = type { i32, i32 }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.82" = type { ptr }

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local i64 @_ZN7maliput7utility4mesh22FindOuterFaceEdgeIndexERKSt3setIiSt4lessIiESaIiEERKSt13unordered_mapIiSt6vectorINS1_13FaceEdgeIndexESaISB_EESt4hashIiESt8equal_toIiESaISt4pairIKiSD_EEE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(56) %1) local_unnamed_addr #1 {
  %3 = alloca %"struct.maliput::utility::mesh::FaceEdgeIndex", align 8
  %4 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %5 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.82", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.82", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %9 = tail call ptr @_ZNKSt3setIiSt4lessIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #5
  store ptr %9, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %10 = tail call ptr @_ZNKSt3setIiSt4lessIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #5
  store ptr %10, ptr %5, align 8
  %11 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  br i1 %11, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2, %.critedge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %12 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIiEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %13 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %13, ptr %6, align 4, !tbaa !5
  %14 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt13unordered_mapIiSt6vectorIN7maliput7utility4mesh13FaceEdgeIndexESaIS4_EESt4hashIiESt8equal_toIiESaISt4pairIKiS6_EEE2atERSC_(ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %15 = call ptr @_ZNKSt6vectorIN7maliput7utility4mesh13FaceEdgeIndexESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  %16 = call ptr @_ZNKSt6vectorIN7maliput7utility4mesh13FaceEdgeIndexESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  %17 = call ptr @"_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPKN7maliput7utility4mesh13FaceEdgeIndexESt6vectorIS5_SaIS5_EEEEZNS4_22FindOuterFaceEdgeIndexERKSt3setIiSt4lessIiESaIiEERKSt13unordered_mapIiSA_St4hashIiESt8equal_toIiESaISt4pairIKiSA_EEEE3$_0ET_SW_SW_T0_"(ptr %15, ptr %16, ptr nonnull %0)
  store ptr %17, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %18 = call ptr @_ZNKSt6vectorIN7maliput7utility4mesh13FaceEdgeIndexESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  store ptr %18, ptr %8, align 8
  %19 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7maliput7utility4mesh13FaceEdgeIndexESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br i1 %19, label %22, label %.critedge

.critedge:                                        ; preds = %.lr.ph
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIiEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %21 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIiES2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  br i1 %21, label %.lr.ph, label %._crit_edge

22:                                               ; preds = %.lr.ph
  %23 = call ptr @_ZNKSt6vectorIN7maliput7utility4mesh13FaceEdgeIndexESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  %.sroa.0.0.copyload = load ptr, ptr %7, align 8, !tbaa !9
  %24 = call noundef i64 @_ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPKN7maliput7utility4mesh13FaceEdgeIndexESt6vectorIS5_SaIS5_EEEEENSt15iterator_traitsIT_E15difference_typeESD_SD_(ptr %23, ptr %.sroa.0.0.copyload)
  %25 = trunc i64 %24 to i32
  %26 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %26, ptr %3, align 8, !tbaa !11
  %27 = getelementptr inbounds i8, ptr %3, i64 4
  store i32 %25, ptr %27, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %28

._crit_edge:                                      ; preds = %.critedge, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  store i64 0, ptr %3, align 8
  call void @_ZN7maliput7utility4mesh13FaceEdgeIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %3) #5
  br label %28

28:                                               ; preds = %22, %._crit_edge
  %29 = load i64, ptr %3, align 8
  ret i64 %29
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden ptr @"_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPKN7maliput7utility4mesh13FaceEdgeIndexESt6vectorIS5_SaIS5_EEEEZNS4_22FindOuterFaceEdgeIndexERKSt3setIiSt4lessIiESaIiEERKSt13unordered_mapIiSA_St4hashIiESt8equal_toIiESaISt4pairIKiSA_EEEE3$_0ET_SW_SW_T0_"(ptr, ptr, ptr) local_unnamed_addr #3

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPKN7maliput7utility4mesh13FaceEdgeIndexESt6vectorIS5_SaIS5_EEEEENSt15iterator_traitsIT_E15difference_typeESD_SD_(ptr, ptr) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7maliput7utility4mesh13FaceEdgeIndexC2Ev(ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #4 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSN7maliput7utility4mesh13FaceEdgeIndexE", !6, i64 0, !6, i64 4}
!13 = !{!12, !6, i64 4}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass