; LLVM IR from maliput/maliput :: src/maliput/routing/graph (graph_utils)

; 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::optional.48" = type { %"struct.std::_Optional_base.49" }
%"struct.std::_Optional_base.49" = type { %"struct.std::_Optional_payload.51" }
%"struct.std::_Optional_payload.51" = type { %"struct.std::_Optional_payload_base.base.53", [3 x i8] }
%"struct.std::_Optional_payload_base.base.53" = type <{ %"union.std::_Optional_payload_base<maliput::api::LaneEnd::Which>::_Storage", i8 }>
%"union.std::_Optional_payload_base<maliput::api::LaneEnd::Which>::_Storage" = type { i32 }
%"struct.std::nullopt_t" = type { i8 }
%"struct.std::_Rb_tree_const_iterator.57" = type { ptr }
%"struct.maliput::routing::graph::Edge" = type { %"class.maliput::api::TypeSpecificIdentifier.56", ptr, %"class.maliput::api::TypeSpecificIdentifier", %"class.maliput::api::TypeSpecificIdentifier" }
%"class.maliput::api::TypeSpecificIdentifier.56" = type { %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.maliput::api::TypeSpecificIdentifier" = type { %"class.std::__cxx11::basic_string" }
%"struct.maliput::routing::graph::Graph" = type { %"class.std::unordered_map", %"class.std::unordered_map.5" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::unordered_map.5" = type { %"class.std::_Hashtable.6" }
%"class.std::_Hashtable.6" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.maliput::routing::graph::Node" = type { %"class.maliput::api::TypeSpecificIdentifier", %"class.std::set", %"class.std::set.30" }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<const maliput::api::BranchPoint *, const maliput::api::BranchPoint *, std::_Identity<const maliput::api::BranchPoint *>, std::less<const maliput::api::BranchPoint *>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<const maliput::api::BranchPoint *, const maliput::api::BranchPoint *, std::_Identity<const maliput::api::BranchPoint *>, std::less<const maliput::api::BranchPoint *>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::set.30" = type { %"class.std::_Rb_tree.31" }
%"class.std::_Rb_tree.31" = type { %"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::routing::graph::Edge>, maliput::api::TypeSpecificIdentifier<maliput::routing::graph::Edge>, std::_Identity<maliput::api::TypeSpecificIdentifier<maliput::routing::graph::Edge>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::routing::graph::Edge>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::routing::graph::Edge>, maliput::api::TypeSpecificIdentifier<maliput::routing::graph::Edge>, std::_Identity<maliput::api::TypeSpecificIdentifier<maliput::routing::graph::Edge>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::routing::graph::Edge>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }

; 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: mustprogress uwtable
define dso_local i64 @_ZN7maliput7routing5graph16DetermineEdgeEndERKNS1_5GraphERKNS1_4EdgeES7_(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(104) %1, ptr noundef nonnull align 8 dereferenceable(104) %2) #1 {
  %4 = alloca %"class.std::optional.48", align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"struct.std::nullopt_t", align 1
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.std::_Rb_tree_const_iterator.57", align 8
  %11 = alloca %"struct.std::_Rb_tree_const_iterator.57", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca %"struct.std::_Rb_tree_const_iterator.57", align 8
  %16 = alloca %"struct.std::_Rb_tree_const_iterator.57", align 8
  %17 = alloca i32, align 4
  %18 = alloca %"struct.std::nullopt_t", align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.maliput::routing::graph::Edge", ptr %19, i32 0, i32 1
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.maliput::routing::graph::Edge", ptr %22, i32 0, i32 1
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = icmp eq ptr %21, %24
  br i1 %25, label %26, label %27

26:                                               ; preds = %3
  call void @_ZNSt8optionalIN7maliput3api7LaneEnd5WhichEEC2ESt9nullopt_t(ptr noundef nonnull align 4 dereferenceable(8) %4) #3
  br label %66

27:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.maliput::routing::graph::Graph", ptr %28, i32 0, i32 1
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.maliput::routing::graph::Edge", ptr %30, i32 0, i32 2
  %32 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZNKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4NodeEEES5_St4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_S5_EEE2atERSC_(ptr noundef nonnull align 8 dereferenceable(56) %29, ptr noundef nonnull align 8 dereferenceable(32) %31)
  store ptr %32, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.maliput::routing::graph::Node", ptr %33, i32 0, i32 2
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.maliput::routing::graph::Edge", ptr %35, i32 0, i32 0
  %37 = call ptr @_ZNKSt3setIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4EdgeEEESt4lessIS6_ESaIS6_EE4findERKS6_(ptr noundef nonnull align 8 dereferenceable(48) %34, ptr noundef nonnull align 8 dereferenceable(32) %36)
  %38 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator.57", ptr %10, i32 0, i32 0
  store ptr %37, ptr %38, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.maliput::routing::graph::Node", ptr %39, i32 0, i32 2
  %41 = call ptr @_ZNKSt3setIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4EdgeEEESt4lessIS6_ESaIS6_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %40) #3
  %42 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator.57", ptr %11, i32 0, i32 0
  store ptr %41, ptr %42, align 8
  %43 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4EdgeEEEES9_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br i1 %43, label %44, label %45

44:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 0, ptr %12, align 4, !tbaa !16
  call void @_ZNSt8optionalIN7maliput3api7LaneEnd5WhichEEC2IS3_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS4_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES7_IS8_ISt10in_place_tSF_EESt16is_constructibleIS3_JSB_EESt14is_convertibleISB_S3_EEEbE4typeELb1EEEOSB_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(4) %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  store i32 1, ptr %13, align 4
  br label %65

45:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.maliput::routing::graph::Graph", ptr %46, i32 0, i32 1
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.maliput::routing::graph::Edge", ptr %48, i32 0, i32 3
  %50 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZNKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4NodeEEES5_St4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_S5_EEE2atERSC_(ptr noundef nonnull align 8 dereferenceable(56) %47, ptr noundef nonnull align 8 dereferenceable(32) %49)
  store ptr %50, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %51 = load ptr, ptr %14, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.maliput::routing::graph::Node", ptr %51, i32 0, i32 2
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.maliput::routing::graph::Edge", ptr %53, i32 0, i32 0
  %55 = call ptr @_ZNKSt3setIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4EdgeEEESt4lessIS6_ESaIS6_EE4findERKS6_(ptr noundef nonnull align 8 dereferenceable(48) %52, ptr noundef nonnull align 8 dereferenceable(32) %54)
  %56 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator.57", ptr %15, i32 0, i32 0
  store ptr %55, ptr %56, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %57 = load ptr, ptr %14, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.maliput::routing::graph::Node", ptr %57, i32 0, i32 2
  %59 = call ptr @_ZNKSt3setIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4EdgeEEESt4lessIS6_ESaIS6_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %58) #3
  %60 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator.57", ptr %16, i32 0, i32 0
  store ptr %59, ptr %60, align 8
  %61 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4EdgeEEEES9_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  br i1 %61, label %62, label %63

62:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  store i32 1, ptr %17, align 4, !tbaa !16
  call void @_ZNSt8optionalIN7maliput3api7LaneEnd5WhichEEC2IS3_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS4_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES7_IS8_ISt10in_place_tSF_EESt16is_constructibleIS3_JSB_EESt14is_convertibleISB_S3_EEEbE4typeELb1EEEOSB_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(4) %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  store i32 1, ptr %13, align 4
  br label %64

63:                                               ; preds = %45
  call void @_ZNSt8optionalIN7maliput3api7LaneEnd5WhichEEC2ESt9nullopt_t(ptr noundef nonnull align 4 dereferenceable(8) %4) #3
  store i32 1, ptr %13, align 4
  br label %64

64:                                               ; preds = %63, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  br label %65

65:                                               ; preds = %64, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  br label %66

66:                                               ; preds = %65, %26
  %67 = getelementptr inbounds %"class.std::optional.48", ptr %4, i32 0, i32 0
  %68 = getelementptr inbounds %"struct.std::_Optional_base.49", ptr %67, i32 0, i32 0
  %69 = load i64, ptr %68, align 4
  ret i64 %69
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZNKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4NodeEEES5_St4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_S5_EEE2atERSC_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt8optionalIN7maliput3api7LaneEnd5WhichEEC2IS3_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS4_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES7_IS8_ISt10in_place_tSF_EESt16is_constructibleIS3_JSB_EESt14is_convertibleISB_S3_EEEbE4typeELb1EEEOSB_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 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 = { 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, !6, i64 32}
!10 = !{!"_ZTSN7maliput7routing5graph4EdgeE", !11, i64 0, !6, i64 32, !15, i64 40, !15, i64 72}
!11 = !{!"_ZTSN7maliput3api22TypeSpecificIdentifierINS_7routing5graph4EdgeEEE", !12, i64 0}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !14, i64 8, !7, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSN7maliput3api22TypeSpecificIdentifierINS_7routing5graph4NodeEEE", !12, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"_ZTSN7maliput3api7LaneEnd5WhichE", !7, i64 0}


; 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::optional.48" = type { %"struct.std::_Optional_base.49" }
%"struct.std::_Optional_base.49" = type { %"struct.std::_Optional_payload.51" }
%"struct.std::_Optional_payload.51" = type { %"struct.std::_Optional_payload_base.base.53", [3 x i8] }
%"struct.std::_Optional_payload_base.base.53" = type <{ %"union.std::_Optional_payload_base<maliput::api::LaneEnd::Which>::_Storage", i8 }>
%"union.std::_Optional_payload_base<maliput::api::LaneEnd::Which>::_Storage" = type { i32 }
%"struct.std::_Rb_tree_const_iterator.57" = 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
define dso_local i64 @_ZN7maliput7routing5graph16DetermineEdgeEndERKNS1_5GraphERKNS1_4EdgeES7_(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(104) %1, ptr noundef nonnull align 8 dereferenceable(104) %2) local_unnamed_addr #1 {
  %4 = alloca %"class.std::optional.48", align 8
  %5 = alloca %"struct.std::_Rb_tree_const_iterator.57", align 8
  %6 = alloca %"struct.std::_Rb_tree_const_iterator.57", align 8
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::_Rb_tree_const_iterator.57", align 8
  %9 = alloca %"struct.std::_Rb_tree_const_iterator.57", align 8
  %10 = alloca i32, align 4
  %11 = getelementptr inbounds i8, ptr %1, i64 32
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %2, i64 32
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %15 = icmp eq ptr %12, %14
  br i1 %15, label %16, label %17

16:                                               ; preds = %3
  call void @_ZNSt8optionalIN7maliput3api7LaneEnd5WhichEEC2ESt9nullopt_t(ptr noundef nonnull align 4 dereferenceable(8) %4) #3
  br label %35

17:                                               ; preds = %3
  %18 = getelementptr inbounds i8, ptr %0, i64 56
  %19 = getelementptr inbounds i8, ptr %1, i64 40
  %20 = tail call noundef nonnull align 8 dereferenceable(128) ptr @_ZNKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4NodeEEES5_St4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_S5_EEE2atERSC_(ptr noundef nonnull align 8 dereferenceable(56) %18, ptr noundef nonnull align 8 dereferenceable(32) %19)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %21 = getelementptr inbounds i8, ptr %20, i64 80
  %22 = tail call ptr @_ZNKSt3setIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4EdgeEEESt4lessIS6_ESaIS6_EE4findERKS6_(ptr noundef nonnull align 8 dereferenceable(48) %21, ptr noundef nonnull align 8 dereferenceable(32) %2)
  store ptr %22, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  %23 = tail call ptr @_ZNKSt3setIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4EdgeEEESt4lessIS6_ESaIS6_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %21) #3
  store ptr %23, ptr %6, align 8
  %24 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4EdgeEEEES9_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  br i1 %24, label %25, label %26

25:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  store i32 0, ptr %7, align 4, !tbaa !15
  call void @_ZNSt8optionalIN7maliput3api7LaneEnd5WhichEEC2IS3_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS4_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES7_IS8_ISt10in_place_tSF_EESt16is_constructibleIS3_JSB_EESt14is_convertibleISB_S3_EEEbE4typeELb1EEEOSB_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(4) %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  br label %35

26:                                               ; preds = %17
  %27 = getelementptr inbounds i8, ptr %1, i64 72
  %28 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZNKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4NodeEEES5_St4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_S5_EEE2atERSC_(ptr noundef nonnull align 8 dereferenceable(56) %18, ptr noundef nonnull align 8 dereferenceable(32) %27)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  %29 = getelementptr inbounds i8, ptr %28, i64 80
  %30 = call ptr @_ZNKSt3setIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4EdgeEEESt4lessIS6_ESaIS6_EE4findERKS6_(ptr noundef nonnull align 8 dereferenceable(48) %29, ptr noundef nonnull align 8 dereferenceable(32) %2)
  store ptr %30, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #3
  %31 = call ptr @_ZNKSt3setIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4EdgeEEESt4lessIS6_ESaIS6_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %29) #3
  store ptr %31, ptr %9, align 8
  %32 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4EdgeEEEES9_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  br i1 %32, label %33, label %34

33:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #3
  store i32 1, ptr %10, align 4, !tbaa !15
  call void @_ZNSt8optionalIN7maliput3api7LaneEnd5WhichEEC2IS3_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS4_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES7_IS8_ISt10in_place_tSF_EESt16is_constructibleIS3_JSB_EESt14is_convertibleISB_S3_EEEbE4typeELb1EEEOSB_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(4) %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #3
  br label %35

34:                                               ; preds = %26
  call void @_ZNSt8optionalIN7maliput3api7LaneEnd5WhichEEC2ESt9nullopt_t(ptr noundef nonnull align 4 dereferenceable(8) %4) #3
  br label %35

35:                                               ; preds = %25, %34, %33, %16
  %36 = load i64, ptr %4, align 8
  ret i64 %36
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZNKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4NodeEEES5_St4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_S5_EEE2atERSC_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !10, i64 32}
!6 = !{!"_ZTSN7maliput7routing5graph4EdgeE", !7, i64 0, !10, i64 32, !14, i64 40, !14, i64 72}
!7 = !{!"_ZTSN7maliput3api22TypeSpecificIdentifierINS_7routing5graph4EdgeEEE", !8, i64 0}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !9, i64 0, !13, i64 8, !11, i64 16}
!9 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !10, i64 0}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"long", !11, i64 0}
!14 = !{!"_ZTSN7maliput3api22TypeSpecificIdentifierINS_7routing5graph4NodeEEE", !8, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"_ZTSN7maliput3api7LaneEnd5WhichE", !11, i64 0}


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