; 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" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload.base", [7 x i8] }
%"struct.std::_Optional_payload.base" = type { %"struct.std::_Optional_payload_base.base" }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<maliput::routing::graph::Node>::_Storage", i8 }>
%"union.std::_Optional_payload_base<maliput::routing::graph::Node>::_Storage" = type { %"struct.maliput::routing::graph::Node" }
%"struct.maliput::routing::graph::Node" = type { %"class.maliput::api::TypeSpecificIdentifier", %"class.std::set", %"class.std::set.30" }
%"class.maliput::api::TypeSpecificIdentifier" = 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.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" }
%"struct.std::__detail::_Node_const_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"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.std::pair" = type { %"class.maliput::api::TypeSpecificIdentifier", %"struct.maliput::routing::graph::Node" }

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

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

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

; 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
define dso_local void @_ZN7maliput7routing5graph8FindNodeERKNS1_5GraphERKNS_3api4LaneERKNS5_7LaneEnd5WhichE(ptr dead_on_unwind noalias writable sret(%"class.std::optional") align 8 %0, ptr noundef nonnull align 8 dereferenceable(112) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(4) %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.std::__detail::_Node_const_iterator", align 8
  %12 = alloca %"struct.std::__detail::_Node_const_iterator", align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %17 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = load ptr, ptr %8, align 8, !tbaa !5
  %20 = load i32, ptr %19, align 4, !tbaa !9
  %21 = call noundef ptr @_ZNK7maliput3api4Lane14GetBranchPointENS0_7LaneEnd5WhichE(ptr noundef nonnull align 8 dereferenceable(8) %18, i32 noundef %20)
  store ptr %21, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.maliput::routing::graph::Graph", ptr %22, i32 0, i32 1
  store ptr %23, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  %25 = call ptr @_ZNKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4NodeEEES5_St4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_S5_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %24) #4
  %26 = getelementptr inbounds %"struct.std::__detail::_Node_const_iterator", ptr %11, i32 0, i32 0
  %27 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %26, i32 0, i32 0
  store ptr %25, ptr %27, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  %29 = call ptr @_ZNKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4NodeEEES5_St4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_S5_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %28) #4
  %30 = getelementptr inbounds %"struct.std::__detail::_Node_const_iterator", ptr %12, i32 0, i32 0
  %31 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %30, i32 0, i32 0
  store ptr %29, ptr %31, align 8
  br label %32

32:                                               ; preds = %57, %4
  %33 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN7maliput3api22TypeSpecificIdentifierINS2_7routing5graph4NodeEEES7_ELb0EEESD_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  br i1 %33, label %35, label %34

34:                                               ; preds = %32
  store i32 2, ptr %13, align 4
  br label %59

35:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %36 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZNKSt8__detail20_Node_const_iteratorISt4pairIKN7maliput3api22TypeSpecificIdentifierINS2_7routing5graph4NodeEEES7_ELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  store ptr %36, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %37 = load ptr, ptr %14, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.std::pair", ptr %37, i32 0, i32 1
  store ptr %38, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %39 = load ptr, ptr %15, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.maliput::routing::graph::Node", ptr %39, i32 0, i32 1
  %41 = call ptr @_ZNKSt3setIPKN7maliput3api11BranchPointESt4lessIS4_ESaIS4_EE4findERKS4_(ptr noundef nonnull align 8 dereferenceable(48) %40, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %42 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %16, i32 0, i32 0
  store ptr %41, ptr %42, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %43 = load ptr, ptr %15, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.maliput::routing::graph::Node", ptr %43, i32 0, i32 1
  %45 = call ptr @_ZNKSt3setIPKN7maliput3api11BranchPointESt4lessIS4_ESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %44) #4
  %46 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %17, i32 0, i32 0
  store ptr %45, ptr %46, align 8
  %47 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIPKN7maliput3api11BranchPointEES7_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  br i1 %47, label %48, label %50

48:                                               ; preds = %35
  %49 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZNSt8optionalIN7maliput7routing5graph4NodeEEC2IRKS3_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS4_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES9_ISA_ISt10in_place_tSH_EESt16is_constructibleIS3_JSD_EESt14is_convertibleISD_S3_EEEbE4typeELb1EEEOSD_(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull align 8 dereferenceable(128) %49)
  store i32 1, ptr %13, align 4
  br label %51

50:                                               ; preds = %35
  store i32 0, ptr %13, align 4
  br label %51

51:                                               ; preds = %50, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  %52 = load i32, ptr %13, align 4
  switch i32 %52, label %54 [
    i32 0, label %53
  ]

53:                                               ; preds = %51
  store i32 0, ptr %13, align 4
  br label %54

54:                                               ; preds = %53, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  %55 = load i32, ptr %13, align 4
  switch i32 %55, label %59 [
    i32 0, label %56
  ]

56:                                               ; preds = %54
  br label %57

57:                                               ; preds = %56
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail20_Node_const_iteratorISt4pairIKN7maliput3api22TypeSpecificIdentifierINS2_7routing5graph4NodeEEES7_ELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  br label %32

59:                                               ; preds = %54, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %60 = load i32, ptr %13, align 4
  switch i32 %60, label %62 [
    i32 2, label %61
  ]

61:                                               ; preds = %59
  call void @_ZNSt8optionalIN7maliput7routing5graph4NodeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(136) %0) #4
  store i32 1, ptr %13, align 4
  br label %62

62:                                               ; preds = %61, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  ret void
}

declare noundef ptr @_ZNK7maliput3api4Lane14GetBranchPointENS0_7LaneEnd5WhichE(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt8optionalIN7maliput7routing5graph4NodeEEC2IRKS3_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS4_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES9_ISA_ISt10in_place_tSH_EESt16is_constructibleIS3_JSD_EESt14is_convertibleISD_S3_EEEbE4typeELb1EEEOSD_(ptr noundef nonnull align 8 dereferenceable(136), ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #2 align 2

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

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { "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 = !{!"_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" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload.base", [7 x i8] }
%"struct.std::_Optional_payload.base" = type { %"struct.std::_Optional_payload_base.base" }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<maliput::routing::graph::Node>::_Storage", i8 }>
%"union.std::_Optional_payload_base<maliput::routing::graph::Node>::_Storage" = type { %"struct.maliput::routing::graph::Node" }
%"struct.maliput::routing::graph::Node" = type { %"class.maliput::api::TypeSpecificIdentifier", %"class.std::set", %"class.std::set.30" }
%"class.maliput::api::TypeSpecificIdentifier" = 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.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" }
%"struct.std::__detail::_Node_const_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7maliput7routing5graph8FindNodeERKNS1_5GraphERKNS_3api4LaneERKNS5_7LaneEnd5WhichE(ptr dead_on_unwind noalias writable sret(%"class.std::optional") align 8 %0, ptr noundef nonnull align 8 dereferenceable(112) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr nocapture noundef nonnull readonly align 4 dereferenceable(4) %3) local_unnamed_addr #2 {
  %5 = alloca ptr, align 8
  %6 = alloca %"struct.std::__detail::_Node_const_iterator", align 8
  %7 = alloca %"struct.std::__detail::_Node_const_iterator", align 8
  %8 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %10 = load i32, ptr %3, align 4, !tbaa !5
  %11 = tail call noundef ptr @_ZNK7maliput3api4Lane14GetBranchPointENS0_7LaneEnd5WhichE(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef %10)
  store ptr %11, ptr %5, align 8, !tbaa !9
  %12 = getelementptr inbounds i8, ptr %1, i64 56
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %13 = tail call ptr @_ZNKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4NodeEEES5_St4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_S5_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %12) #4
  store ptr %13, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %14 = tail call ptr @_ZNKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS0_7routing5graph4NodeEEES5_St4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_S5_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %12) #4
  store ptr %14, ptr %7, align 8
  %15 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN7maliput3api22TypeSpecificIdentifierINS2_7routing5graph4NodeEEES7_ELb0EEESD_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br i1 %15, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %4, %.critedge
  %16 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZNKSt8__detail20_Node_const_iteratorISt4pairIKN7maliput3api22TypeSpecificIdentifierINS2_7routing5graph4NodeEEES7_ELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %17 = getelementptr inbounds i8, ptr %16, i64 64
  %18 = call ptr @_ZNKSt3setIPKN7maliput3api11BranchPointESt4lessIS4_ESaIS4_EE4findERKS4_(ptr noundef nonnull align 8 dereferenceable(48) %17, ptr noundef nonnull align 8 dereferenceable(8) %5)
  store ptr %18, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %19 = call ptr @_ZNKSt3setIPKN7maliput3api11BranchPointESt4lessIS4_ESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %17) #4
  store ptr %19, ptr %9, align 8
  %20 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIPKN7maliput3api11BranchPointEES7_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  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 i1 %20, label %21, label %.critedge

21:                                               ; preds = %.lr.ph
  %22 = getelementptr inbounds i8, ptr %16, i64 32
  call void @_ZNSt8optionalIN7maliput7routing5graph4NodeEEC2IRKS3_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS4_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES9_ISA_ISt10in_place_tSH_EESt16is_constructibleIS3_JSD_EESt14is_convertibleISD_S3_EEEbE4typeELb1EEEOSD_(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull align 8 dereferenceable(128) %22)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br label %25

.critedge:                                        ; preds = %.lr.ph
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail20_Node_const_iteratorISt4pairIKN7maliput3api22TypeSpecificIdentifierINS2_7routing5graph4NodeEEES7_ELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %24 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN7maliput3api22TypeSpecificIdentifierINS2_7routing5graph4NodeEEES7_ELb0EEESD_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br i1 %24, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.critedge, %4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @_ZNSt8optionalIN7maliput7routing5graph4NodeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(136) %0) #4
  br label %25

25:                                               ; preds = %21, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  ret void
}

declare noundef ptr @_ZNK7maliput3api4Lane14GetBranchPointENS0_7LaneEnd5WhichE(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt8optionalIN7maliput7routing5graph4NodeEEC2IRKS3_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS4_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES9_ISA_ISt10in_place_tSH_EESt16is_constructibleIS3_JSD_EESt14is_convertibleISD_S3_EEEbE4typeELb1EEEOSD_(ptr noundef nonnull align 8 dereferenceable(136), ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #2 align 2

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

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 = { "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 = !{!"_ZTSN7maliput3api7LaneEnd5WhichE", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}


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