; LLVM IR from maliput/maliput :: src/maliput/base (phase_based_right_of_way_rule_state_provider)

; 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.17", [7 x i8] }
%"struct.std::_Optional_payload.base.17" = type { %"struct.std::_Optional_payload_base.base.16" }
%"struct.std::_Optional_payload_base.base.16" = type <{ %"union.std::_Optional_payload_base<maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule::State>>>::_Storage", i8 }>
%"union.std::_Optional_payload_base<maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule::State>>>::_Storage" = type { %"struct.maliput::api::rules::StateProviderResult" }
%"struct.maliput::api::rules::StateProviderResult" = type { %"class.maliput::api::TypeSpecificIdentifier", %"class.std::optional.1" }
%"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::optional.1" = type { %"struct.std::_Optional_base.2" }
%"struct.std::_Optional_base.2" = type { %"struct.std::_Optional_payload.4" }
%"struct.std::_Optional_payload.4" = type { %"struct.std::_Optional_payload.base.13", [7 x i8] }
%"struct.std::_Optional_payload.base.13" = type { %"struct.std::_Optional_payload_base.base.12" }
%"struct.std::_Optional_payload_base.base.12" = type <{ %"union.std::_Optional_payload_base<maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule::State>>::Next>::_Storage", i8 }>
%"union.std::_Optional_payload_base<maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule::State>>::Next>::_Storage" = type { %"struct.maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule::State>>::Next" }
%"struct.maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule::State>>::Next" = type { %"class.maliput::api::TypeSpecificIdentifier", %"class.std::optional.7" }
%"class.std::optional.7" = type { %"struct.std::_Optional_base.8" }
%"struct.std::_Optional_base.8" = type { %"struct.std::_Optional_payload.10" }
%"struct.std::_Optional_payload.10" = type { %"struct.std::_Optional_payload_base.base", [7 x i8] }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<double>::_Storage", i8 }>
%"union.std::_Optional_payload_base<double>::_Storage" = type { double }
%"class.std::optional.20" = type { %"struct.std::_Optional_base.21" }
%"struct.std::_Optional_base.21" = type { %"struct.std::_Optional_payload.23" }
%"struct.std::_Optional_payload.23" = type { %"struct.std::_Optional_payload.base.47", [7 x i8] }
%"struct.std::_Optional_payload.base.47" = type { %"struct.std::_Optional_payload_base.base.46" }
%"struct.std::_Optional_payload_base.base.46" = type <{ %"union.std::_Optional_payload_base<maliput::api::rules::PhaseRing>::_Storage", i8 }>
%"union.std::_Optional_payload_base<maliput::api::rules::PhaseRing>::_Storage" = type { %"class.maliput::api::rules::PhaseRing" }
%"class.maliput::api::rules::PhaseRing" = type { %"class.maliput::api::TypeSpecificIdentifier.26", %"class.std::unordered_map", %"class.std::unordered_map.32" }
%"class.maliput::api::TypeSpecificIdentifier.26" = type { %"class.std::__cxx11::basic_string" }
%"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.32" = type { %"class.std::_Hashtable.33" }
%"class.std::_Hashtable.33" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::optional.51" = type { %"struct.std::_Optional_base.52" }
%"struct.std::_Optional_base.52" = type { %"struct.std::_Optional_payload.54" }
%"struct.std::_Optional_payload.54" = type { %"struct.std::_Optional_payload.base.70", [7 x i8] }
%"struct.std::_Optional_payload.base.70" = type { %"struct.std::_Optional_payload_base.base.69" }
%"struct.std::_Optional_payload_base.base.69" = type <{ %"union.std::_Optional_payload_base<maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Phase>>>::_Storage", i8 }>
%"union.std::_Optional_payload_base<maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Phase>>>::_Storage" = type { %"struct.maliput::api::rules::StateProviderResult.57" }
%"struct.maliput::api::rules::StateProviderResult.57" = type { %"class.maliput::api::TypeSpecificIdentifier.58", %"class.std::optional.59" }
%"class.maliput::api::TypeSpecificIdentifier.58" = type { %"class.std::__cxx11::basic_string" }
%"class.std::optional.59" = type { %"struct.std::_Optional_base.60" }
%"struct.std::_Optional_base.60" = type { %"struct.std::_Optional_payload.62" }
%"struct.std::_Optional_payload.62" = type { %"struct.std::_Optional_payload.base.66", [7 x i8] }
%"struct.std::_Optional_payload.base.66" = type { %"struct.std::_Optional_payload_base.base.65" }
%"struct.std::_Optional_payload_base.base.65" = type <{ %"union.std::_Optional_payload_base<maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Phase>>::Next>::_Storage", i8 }>
%"union.std::_Optional_payload_base<maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Phase>>::Next>::_Storage" = type { %"struct.maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Phase>>::Next" }
%"struct.maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Phase>>::Next" = type { %"class.maliput::api::TypeSpecificIdentifier.58", %"class.std::optional.7" }
%"struct.std::nullopt_t" = type { i8 }
%"class.maliput::PhaseBasedRightOfWayRuleStateProvider" = type { %"class.maliput::api::rules::RightOfWayRuleStateProvider", ptr, ptr }
%"class.maliput::api::rules::RightOfWayRuleStateProvider" = type { ptr }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7maliput37PhaseBasedRightOfWayRuleStateProvider10DoGetStateERKNS_3api22TypeSpecificIdentifierINS1_5rules14RightOfWayRuleEEE(ptr dead_on_unwind noalias writable sret(%"class.std::optional") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.std::optional.20", align 8
  %8 = alloca %"class.std::optional.51", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.maliput::api::TypeSpecificIdentifier.58", align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"class.maliput::api::TypeSpecificIdentifier", align 8
  %14 = alloca %"class.std::optional.1", align 8
  %15 = alloca %"struct.std::nullopt_t", align 1
  %16 = alloca %"class.maliput::api::TypeSpecificIdentifier.58", align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"class.maliput::api::TypeSpecificIdentifier", align 8
  %19 = alloca %"struct.maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule::State>>::Next", align 8
  %20 = alloca %"struct.maliput::api::rules::StateProviderResult", align 8
  %21 = alloca i32, align 4
  %22 = alloca %"struct.std::nullopt_t", align 1
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %23 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 152, ptr %7) #6
  %24 = getelementptr inbounds %"class.maliput::PhaseBasedRightOfWayRuleStateProvider", ptr %23, i32 0, i32 1
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZNK7maliput3api5rules13PhaseRingBook13FindPhaseRingERKNS0_22TypeSpecificIdentifierINS1_14RightOfWayRuleEEE(ptr dead_on_unwind writable sret(%"class.std::optional.20") align 8 %7, ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(32) %26)
  %27 = call noundef zeroext i1 @_ZNKSt8optionalIN7maliput3api5rules9PhaseRingEE9has_valueEv(ptr noundef nonnull align 8 dereferenceable(152) %7) #6
  br i1 %27, label %28, label %139

28:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 96, ptr %8) #6
  %29 = getelementptr inbounds %"class.maliput::PhaseBasedRightOfWayRuleStateProvider", ptr %23, i32 0, i32 2
  %30 = load ptr, ptr %29, align 8, !tbaa !12
  %31 = call noundef ptr @_ZNSt8optionalIN7maliput3api5rules9PhaseRingEEptEv(ptr noundef nonnull align 8 dereferenceable(152) %7) #6
  %32 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7maliput3api5rules9PhaseRing2idEv(ptr noundef nonnull align 8 dereferenceable(144) %31)
          to label %33 unwind label %81

33:                                               ; preds = %28
  invoke void @_ZNK7maliput3api5rules13PhaseProvider8GetPhaseERKNS0_22TypeSpecificIdentifierINS1_9PhaseRingEEE(ptr dead_on_unwind writable sret(%"class.std::optional.51") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(32) %32)
          to label %34 unwind label %81

34:                                               ; preds = %33
  %35 = call noundef zeroext i1 @_ZNKSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEEEE9has_valueEv(ptr noundef nonnull align 8 dereferenceable(96) %8) #6
  br i1 %35, label %36, label %134

36:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #6
  %37 = call noundef ptr @_ZNKSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(96) %8) #6
  %38 = getelementptr inbounds %"struct.maliput::api::rules::StateProviderResult.57", ptr %37, i32 0, i32 0
  invoke void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules5PhaseEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %38)
          to label %39 unwind label %85

39:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %40 = call noundef ptr @_ZNSt8optionalIN7maliput3api5rules9PhaseRingEEptEv(ptr noundef nonnull align 8 dereferenceable(152) %7) #6
  %41 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNK7maliput3api5rules9PhaseRing6phasesEv(ptr noundef nonnull align 8 dereferenceable(144) %40)
          to label %42 unwind label %89

42:                                               ; preds = %39
  %43 = invoke noundef nonnull align 8 dereferenceable(208) ptr @_ZNKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS1_5rules5PhaseEEES4_St4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S4_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(56) %41, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %44 unwind label %89

44:                                               ; preds = %42
  store ptr %43, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #6
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  %46 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNK7maliput3api5rules5Phase11rule_statesEv(ptr noundef nonnull align 8 dereferenceable(208) %45)
          to label %47 unwind label %93

47:                                               ; preds = %44
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS1_5rules14RightOfWayRuleEEENS2_INS4_5StateEEESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE2atERSD_(ptr noundef nonnull align 8 dereferenceable(56) %46, ptr noundef nonnull align 8 dereferenceable(32) %48)
          to label %50 unwind label %93

50:                                               ; preds = %47
  invoke void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %49)
          to label %51 unwind label %93

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 56, ptr %14) #6
  call void @_ZNSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_14RightOfWayRule5StateEEEE4NextEEC2ESt9nullopt_t(ptr noundef nonnull align 8 dereferenceable(56) %14) #6
  %52 = call noundef ptr @_ZNKSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(96) %8) #6
  %53 = getelementptr inbounds %"struct.maliput::api::rules::StateProviderResult.57", ptr %52, i32 0, i32 1
  %54 = call noundef zeroext i1 @_ZNKSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEE4NextEE9has_valueEv(ptr noundef nonnull align 8 dereferenceable(56) %53) #6
  br i1 %54, label %55, label %116

55:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  %56 = call noundef ptr @_ZNKSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(96) %8) #6
  %57 = getelementptr inbounds %"struct.maliput::api::rules::StateProviderResult.57", ptr %56, i32 0, i32 1
  %58 = call noundef ptr @_ZNKSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEE4NextEEptEv(ptr noundef nonnull align 8 dereferenceable(56) %57) #6
  %59 = getelementptr inbounds %"struct.maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Phase>>::Next", ptr %58, i32 0, i32 0
  invoke void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules5PhaseEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %59)
          to label %60 unwind label %97

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %61 = call noundef ptr @_ZNSt8optionalIN7maliput3api5rules9PhaseRingEEptEv(ptr noundef nonnull align 8 dereferenceable(152) %7) #6
  %62 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNK7maliput3api5rules9PhaseRing6phasesEv(ptr noundef nonnull align 8 dereferenceable(144) %61)
          to label %63 unwind label %101

63:                                               ; preds = %60
  %64 = invoke noundef nonnull align 8 dereferenceable(208) ptr @_ZNKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS1_5rules5PhaseEEES4_St4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S4_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(56) %62, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %65 unwind label %101

65:                                               ; preds = %63
  store ptr %64, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #6
  %66 = load ptr, ptr %17, align 8, !tbaa !5
  %67 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNK7maliput3api5rules5Phase11rule_statesEv(ptr noundef nonnull align 8 dereferenceable(208) %66)
          to label %68 unwind label %105

68:                                               ; preds = %65
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS1_5rules14RightOfWayRuleEEENS2_INS4_5StateEEESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE2atERSD_(ptr noundef nonnull align 8 dereferenceable(56) %67, ptr noundef nonnull align 8 dereferenceable(32) %69)
          to label %71 unwind label %105

71:                                               ; preds = %68
  invoke void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(32) %70)
          to label %72 unwind label %105

72:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 48, ptr %19) #6
  %73 = getelementptr inbounds %"struct.maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule::State>>::Next", ptr %19, i32 0, i32 0
  invoke void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(32) %73, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %74 unwind label %109

74:                                               ; preds = %72
  %75 = getelementptr inbounds %"struct.maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule::State>>::Next", ptr %19, i32 0, i32 1
  %76 = call noundef ptr @_ZNKSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(96) %8) #6
  %77 = getelementptr inbounds %"struct.maliput::api::rules::StateProviderResult.57", ptr %76, i32 0, i32 1
  %78 = call noundef ptr @_ZNKSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEE4NextEEptEv(ptr noundef nonnull align 8 dereferenceable(56) %77) #6
  %79 = getelementptr inbounds %"struct.maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Phase>>::Next", ptr %78, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %75, ptr align 8 %79, i64 16, i1 false)
  %80 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_14RightOfWayRule5StateEEEE4NextEEaSIS9_EENSt9enable_ifIX7__and_vISt6__not_ISt7is_sameISA_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEESD_ISt6__and_IJSt9is_scalarIS9_ESE_IS9_NSt5decayISH_E4typeEEEEESt16is_constructibleIS9_JSH_EESt13is_assignableIRS9_SH_EEERSA_E4typeEOSH_(ptr noundef nonnull align 8 dereferenceable(56) %14, ptr noundef nonnull align 8 dereferenceable(48) %19) #6
  call void @_ZN7maliput3api5rules19StateProviderResultINS0_22TypeSpecificIdentifierINS1_14RightOfWayRule5StateEEEE4NextD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %19) #6
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules5PhaseEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  br label %116

81:                                               ; preds = %33, %28
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %9, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %10, align 4
  br label %138

85:                                               ; preds = %36
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %9, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %10, align 4
  br label %133

89:                                               ; preds = %42, %39
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %9, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %10, align 4
  br label %132

93:                                               ; preds = %50, %47, %44
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %9, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %10, align 4
  br label %131

97:                                               ; preds = %55
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %9, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %10, align 4
  br label %115

101:                                              ; preds = %63, %60
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %9, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %10, align 4
  br label %114

105:                                              ; preds = %71, %68, %65
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %9, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %10, align 4
  br label %113

109:                                              ; preds = %72
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %9, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 48, ptr %19) #6
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #6
  br label %113

113:                                              ; preds = %109, %105
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #6
  br label %114

114:                                              ; preds = %113, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules5PhaseEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  br label %115

115:                                              ; preds = %114, %97
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  br label %130

116:                                              ; preds = %74, %51
  call void @llvm.lifetime.start.p0(i64 88, ptr %20) #6
  %117 = getelementptr inbounds %"struct.maliput::api::rules::StateProviderResult", ptr %20, i32 0, i32 0
  invoke void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(32) %117, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %118 unwind label %121

118:                                              ; preds = %116
  %119 = getelementptr inbounds %"struct.maliput::api::rules::StateProviderResult", ptr %20, i32 0, i32 1
  invoke void @_ZNSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_14RightOfWayRule5StateEEEE4NextEEC2ERKSA_(ptr noundef nonnull align 8 dereferenceable(56) %119, ptr noundef nonnull align 8 dereferenceable(56) %14)
          to label %120 unwind label %125

120:                                              ; preds = %118
  call void @_ZNSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_14RightOfWayRule5StateEEEEEEC2IS8_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS9_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEESC_ISD_ISt10in_place_tSK_EESt16is_constructibleIS8_JSG_EESt14is_convertibleISG_S8_EEEbE4typeELb1EEEOSG_(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef nonnull align 8 dereferenceable(88) %20) #6
  call void @_ZN7maliput3api5rules19StateProviderResultINS0_22TypeSpecificIdentifierINS1_14RightOfWayRule5StateEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %20) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr %20) #6
  store i32 1, ptr %21, align 4
  call void @_ZNSt14_Optional_baseIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_14RightOfWayRule5StateEEEE4NextELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %14) #6
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules5PhaseEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  br label %135

121:                                              ; preds = %116
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %9, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %10, align 4
  br label %129

125:                                              ; preds = %118
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %9, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %10, align 4
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %117) #6
  br label %129

129:                                              ; preds = %125, %121
  call void @llvm.lifetime.end.p0(i64 88, ptr %20) #6
  br label %130

130:                                              ; preds = %129, %115
  call void @_ZNSt14_Optional_baseIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_14RightOfWayRule5StateEEEE4NextELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %14) #6
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  br label %131

131:                                              ; preds = %130, %93
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  br label %132

132:                                              ; preds = %131, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules5PhaseEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  br label %133

133:                                              ; preds = %132, %85
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @_ZNSt14_Optional_baseIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEEELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(96) %8) #6
  br label %138

134:                                              ; preds = %34
  store i32 0, ptr %21, align 4
  br label %135

135:                                              ; preds = %134, %120
  call void @_ZNSt14_Optional_baseIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEEELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(96) %8) #6
  call void @llvm.lifetime.end.p0(i64 96, ptr %8) #6
  %136 = load i32, ptr %21, align 4
  switch i32 %136, label %140 [
    i32 0, label %137
  ]

137:                                              ; preds = %135
  br label %139

138:                                              ; preds = %133, %81
  call void @llvm.lifetime.end.p0(i64 96, ptr %8) #6
  call void @_ZNSt14_Optional_baseIN7maliput3api5rules9PhaseRingELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(152) %7) #6
  call void @llvm.lifetime.end.p0(i64 152, ptr %7) #6
  br label %141

139:                                              ; preds = %137, %3
  call void @_ZNSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_14RightOfWayRule5StateEEEEEEC2ESt9nullopt_t(ptr noundef nonnull align 8 dereferenceable(96) %0) #6
  store i32 1, ptr %21, align 4
  br label %140

140:                                              ; preds = %139, %135
  call void @_ZNSt14_Optional_baseIN7maliput3api5rules9PhaseRingELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(152) %7) #6
  call void @llvm.lifetime.end.p0(i64 152, ptr %7) #6
  ret void

141:                                              ; preds = %138
  %142 = load ptr, ptr %9, align 8
  %143 = load i32, ptr %10, align 4
  %144 = insertvalue { ptr, i32 } poison, ptr %142, 0
  %145 = insertvalue { ptr, i32 } %144, i32 %143, 1
  resume { ptr, i32 } %145
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7maliput3api5rules13PhaseRingBook13FindPhaseRingERKNS0_22TypeSpecificIdentifierINS1_14RightOfWayRuleEEE(ptr dead_on_unwind noalias writable sret(%"class.std::optional.20") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7maliput3api5rules13PhaseProvider8GetPhaseERKNS0_22TypeSpecificIdentifierINS1_9PhaseRingEEE(ptr dead_on_unwind noalias writable sret(%"class.std::optional.51") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules5PhaseEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(208) ptr @_ZNKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS1_5rules5PhaseEEES4_St4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S4_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7maliput3api5rules19StateProviderResultINS0_22TypeSpecificIdentifierINS1_14RightOfWayRule5StateEEEE4NextD2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #4 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_14RightOfWayRule5StateEEEE4NextEEC2ERKSA_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #5 align 2

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

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

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #6 = { nounwind }

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

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


; 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.17", [7 x i8] }
%"struct.std::_Optional_payload.base.17" = type { %"struct.std::_Optional_payload_base.base.16" }
%"struct.std::_Optional_payload_base.base.16" = type <{ %"union.std::_Optional_payload_base<maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule::State>>>::_Storage", i8 }>
%"union.std::_Optional_payload_base<maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule::State>>>::_Storage" = type { %"struct.maliput::api::rules::StateProviderResult" }
%"struct.maliput::api::rules::StateProviderResult" = type { %"class.maliput::api::TypeSpecificIdentifier", %"class.std::optional.1" }
%"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::optional.1" = type { %"struct.std::_Optional_base.2" }
%"struct.std::_Optional_base.2" = type { %"struct.std::_Optional_payload.4" }
%"struct.std::_Optional_payload.4" = type { %"struct.std::_Optional_payload.base.13", [7 x i8] }
%"struct.std::_Optional_payload.base.13" = type { %"struct.std::_Optional_payload_base.base.12" }
%"struct.std::_Optional_payload_base.base.12" = type <{ %"union.std::_Optional_payload_base<maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule::State>>::Next>::_Storage", i8 }>
%"union.std::_Optional_payload_base<maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule::State>>::Next>::_Storage" = type { %"struct.maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule::State>>::Next" }
%"struct.maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule::State>>::Next" = type { %"class.maliput::api::TypeSpecificIdentifier", %"class.std::optional.7" }
%"class.std::optional.7" = type { %"struct.std::_Optional_base.8" }
%"struct.std::_Optional_base.8" = type { %"struct.std::_Optional_payload.10" }
%"struct.std::_Optional_payload.10" = type { %"struct.std::_Optional_payload_base.base", [7 x i8] }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<double>::_Storage", i8 }>
%"union.std::_Optional_payload_base<double>::_Storage" = type { double }
%"class.std::optional.20" = type { %"struct.std::_Optional_base.21" }
%"struct.std::_Optional_base.21" = type { %"struct.std::_Optional_payload.23" }
%"struct.std::_Optional_payload.23" = type { %"struct.std::_Optional_payload.base.47", [7 x i8] }
%"struct.std::_Optional_payload.base.47" = type { %"struct.std::_Optional_payload_base.base.46" }
%"struct.std::_Optional_payload_base.base.46" = type <{ %"union.std::_Optional_payload_base<maliput::api::rules::PhaseRing>::_Storage", i8 }>
%"union.std::_Optional_payload_base<maliput::api::rules::PhaseRing>::_Storage" = type { %"class.maliput::api::rules::PhaseRing" }
%"class.maliput::api::rules::PhaseRing" = type { %"class.maliput::api::TypeSpecificIdentifier.26", %"class.std::unordered_map", %"class.std::unordered_map.32" }
%"class.maliput::api::TypeSpecificIdentifier.26" = type { %"class.std::__cxx11::basic_string" }
%"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.32" = type { %"class.std::_Hashtable.33" }
%"class.std::_Hashtable.33" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::optional.51" = type { %"struct.std::_Optional_base.52" }
%"struct.std::_Optional_base.52" = type { %"struct.std::_Optional_payload.54" }
%"struct.std::_Optional_payload.54" = type { %"struct.std::_Optional_payload.base.70", [7 x i8] }
%"struct.std::_Optional_payload.base.70" = type { %"struct.std::_Optional_payload_base.base.69" }
%"struct.std::_Optional_payload_base.base.69" = type <{ %"union.std::_Optional_payload_base<maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Phase>>>::_Storage", i8 }>
%"union.std::_Optional_payload_base<maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Phase>>>::_Storage" = type { %"struct.maliput::api::rules::StateProviderResult.57" }
%"struct.maliput::api::rules::StateProviderResult.57" = type { %"class.maliput::api::TypeSpecificIdentifier.58", %"class.std::optional.59" }
%"class.maliput::api::TypeSpecificIdentifier.58" = type { %"class.std::__cxx11::basic_string" }
%"class.std::optional.59" = type { %"struct.std::_Optional_base.60" }
%"struct.std::_Optional_base.60" = type { %"struct.std::_Optional_payload.62" }
%"struct.std::_Optional_payload.62" = type { %"struct.std::_Optional_payload.base.66", [7 x i8] }
%"struct.std::_Optional_payload.base.66" = type { %"struct.std::_Optional_payload_base.base.65" }
%"struct.std::_Optional_payload_base.base.65" = type <{ %"union.std::_Optional_payload_base<maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Phase>>::Next>::_Storage", i8 }>
%"union.std::_Optional_payload_base<maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Phase>>::Next>::_Storage" = type { %"struct.maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Phase>>::Next" }
%"struct.maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Phase>>::Next" = type { %"class.maliput::api::TypeSpecificIdentifier.58", %"class.std::optional.7" }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7maliput37PhaseBasedRightOfWayRuleStateProvider10DoGetStateERKNS_3api22TypeSpecificIdentifierINS1_5rules14RightOfWayRuleEEE(ptr dead_on_unwind noalias writable sret(%"class.std::optional") align 8 %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::optional.20", align 8
  %5 = alloca %"class.std::optional.51", align 8
  %6 = alloca %"class.maliput::api::TypeSpecificIdentifier.58", align 8
  %7 = alloca %"class.maliput::api::TypeSpecificIdentifier", align 8
  %8 = alloca %"class.std::optional.1", align 8
  %9 = alloca %"class.maliput::api::TypeSpecificIdentifier.58", align 8
  %10 = alloca %"class.maliput::api::TypeSpecificIdentifier", align 8
  %11 = alloca %"struct.maliput::api::rules::StateProviderResult<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule::State>>::Next", align 8
  %12 = alloca %"struct.maliput::api::rules::StateProviderResult", align 8
  call void @llvm.lifetime.start.p0(i64 152, ptr nonnull %4) #6
  %13 = getelementptr inbounds i8, ptr %1, i64 8
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZNK7maliput3api5rules13PhaseRingBook13FindPhaseRingERKNS0_22TypeSpecificIdentifierINS1_14RightOfWayRuleEEE(ptr dead_on_unwind nonnull writable sret(%"class.std::optional.20") align 8 %4, ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(32) %2)
  %15 = call noundef zeroext i1 @_ZNKSt8optionalIN7maliput3api5rules9PhaseRingEE9has_valueEv(ptr noundef nonnull align 8 dereferenceable(152) %4) #6
  br i1 %15, label %16, label %90

16:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %5) #6
  %17 = getelementptr inbounds i8, ptr %1, i64 16
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  %19 = call noundef ptr @_ZNSt8optionalIN7maliput3api5rules9PhaseRingEEptEv(ptr noundef nonnull align 8 dereferenceable(152) %4) #6
  %20 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7maliput3api5rules9PhaseRing2idEv(ptr noundef nonnull align 8 dereferenceable(144) %19)
  invoke void @_ZNK7maliput3api5rules13PhaseProvider8GetPhaseERKNS0_22TypeSpecificIdentifierINS1_9PhaseRingEEE(ptr dead_on_unwind nonnull writable sret(%"class.std::optional.51") align 8 %5, ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %21 unwind label %57

21:                                               ; preds = %16
  %22 = call noundef zeroext i1 @_ZNKSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEEEE9has_valueEv(ptr noundef nonnull align 8 dereferenceable(96) %5) #6
  br i1 %22, label %23, label %.critedge

23:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  %24 = call noundef ptr @_ZNKSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(96) %5) #6
  invoke void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules5PhaseEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %24)
          to label %25 unwind label %59

25:                                               ; preds = %23
  %26 = call noundef ptr @_ZNSt8optionalIN7maliput3api5rules9PhaseRingEEptEv(ptr noundef nonnull align 8 dereferenceable(152) %4) #6
  %27 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK7maliput3api5rules9PhaseRing6phasesEv(ptr noundef nonnull align 8 dereferenceable(144) %26)
  %28 = invoke noundef nonnull align 8 dereferenceable(208) ptr @_ZNKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS1_5rules5PhaseEEES4_St4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S4_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(56) %27, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %29 unwind label %61

29:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  %30 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK7maliput3api5rules5Phase11rule_statesEv(ptr noundef nonnull align 8 dereferenceable(208) %28)
  %31 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS1_5rules14RightOfWayRuleEEENS2_INS4_5StateEEESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE2atERSD_(ptr noundef nonnull align 8 dereferenceable(56) %30, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %32 unwind label %63

32:                                               ; preds = %29
  invoke void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %31)
          to label %33 unwind label %63

33:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %8) #6
  call void @_ZNSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_14RightOfWayRule5StateEEEE4NextEEC2ESt9nullopt_t(ptr noundef nonnull align 8 dereferenceable(56) %8) #6
  %34 = call noundef ptr @_ZNKSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(96) %5) #6
  %35 = getelementptr inbounds i8, ptr %34, i64 32
  %36 = call noundef zeroext i1 @_ZNKSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEE4NextEE9has_valueEv(ptr noundef nonnull align 8 dereferenceable(56) %35) #6
  br i1 %36, label %37, label %76

37:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #6
  %38 = call noundef ptr @_ZNKSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(96) %5) #6
  %39 = getelementptr inbounds i8, ptr %38, i64 32
  %40 = call noundef ptr @_ZNKSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEE4NextEEptEv(ptr noundef nonnull align 8 dereferenceable(56) %39) #6
  invoke void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules5PhaseEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %40)
          to label %41 unwind label %65

41:                                               ; preds = %37
  %42 = call noundef ptr @_ZNSt8optionalIN7maliput3api5rules9PhaseRingEEptEv(ptr noundef nonnull align 8 dereferenceable(152) %4) #6
  %43 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK7maliput3api5rules9PhaseRing6phasesEv(ptr noundef nonnull align 8 dereferenceable(144) %42)
  %44 = invoke noundef nonnull align 8 dereferenceable(208) ptr @_ZNKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS1_5rules5PhaseEEES4_St4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S4_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(56) %43, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %45 unwind label %67

45:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  %46 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK7maliput3api5rules5Phase11rule_statesEv(ptr noundef nonnull align 8 dereferenceable(208) %44)
  %47 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS1_5rules14RightOfWayRuleEEENS2_INS4_5StateEEESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE2atERSD_(ptr noundef nonnull align 8 dereferenceable(56) %46, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %48 unwind label %69

48:                                               ; preds = %45
  invoke void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %47)
          to label %49 unwind label %69

49:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %11) #6
  invoke void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %50 unwind label %71

50:                                               ; preds = %49
  %51 = getelementptr inbounds i8, ptr %11, i64 32
  %52 = call noundef ptr @_ZNKSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(96) %5) #6
  %53 = getelementptr inbounds i8, ptr %52, i64 32
  %54 = call noundef ptr @_ZNKSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEE4NextEEptEv(ptr noundef nonnull align 8 dereferenceable(56) %53) #6
  %55 = getelementptr inbounds i8, ptr %54, i64 32
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 8 dereferenceable(16) %55, i64 16, i1 false)
  %56 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_14RightOfWayRule5StateEEEE4NextEEaSIS9_EENSt9enable_ifIX7__and_vISt6__not_ISt7is_sameISA_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEESD_ISt6__and_IJSt9is_scalarIS9_ESE_IS9_NSt5decayISH_E4typeEEEEESt16is_constructibleIS9_JSH_EESt13is_assignableIRS9_SH_EEERSA_E4typeEOSH_(ptr noundef nonnull align 8 dereferenceable(56) %8, ptr noundef nonnull align 8 dereferenceable(48) %11) #6
  call void @_ZN7maliput3api5rules19StateProviderResultINS0_22TypeSpecificIdentifierINS1_14RightOfWayRule5StateEEEE4NextD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #6
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules5PhaseEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  br label %76

57:                                               ; preds = %16
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %89

59:                                               ; preds = %23
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %88

61:                                               ; preds = %25
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %87

63:                                               ; preds = %32, %29
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %86

65:                                               ; preds = %37
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %75

67:                                               ; preds = %41
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %74

69:                                               ; preds = %48, %45
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %73

71:                                               ; preds = %49
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #6
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  br label %73

73:                                               ; preds = %71, %69
  %.pn = phi { ptr, i32 } [ %72, %71 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  br label %74

74:                                               ; preds = %73, %67
  %.pn.pn = phi { ptr, i32 } [ %.pn, %73 ], [ %68, %67 ]
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules5PhaseEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  br label %75

75:                                               ; preds = %74, %65
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %74 ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  br label %85

76:                                               ; preds = %50, %33
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %12) #6
  invoke void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %77 unwind label %80

77:                                               ; preds = %76
  %78 = getelementptr inbounds i8, ptr %12, i64 32
  invoke void @_ZNSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_14RightOfWayRule5StateEEEE4NextEEC2ERKSA_(ptr noundef nonnull align 8 dereferenceable(56) %78, ptr noundef nonnull align 8 dereferenceable(56) %8)
          to label %79 unwind label %82

79:                                               ; preds = %77
  call void @_ZNSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_14RightOfWayRule5StateEEEEEEC2IS8_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS9_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEESC_ISD_ISt10in_place_tSK_EESt16is_constructibleIS8_JSG_EESt14is_convertibleISG_S8_EEEbE4typeELb1EEEOSG_(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef nonnull align 8 dereferenceable(88) %12) #6
  call void @_ZN7maliput3api5rules19StateProviderResultINS0_22TypeSpecificIdentifierINS1_14RightOfWayRule5StateEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(88) %12) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %12) #6
  call void @_ZNSt14_Optional_baseIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_14RightOfWayRule5StateEEEE4NextELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %8) #6
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules5PhaseEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @_ZNSt14_Optional_baseIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEEELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(96) %5) #6
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %5) #6
  br label %91

80:                                               ; preds = %76
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %84

82:                                               ; preds = %77
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  br label %84

84:                                               ; preds = %82, %80
  %.pn21 = phi { ptr, i32 } [ %83, %82 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %12) #6
  br label %85

85:                                               ; preds = %84, %75
  %.pn21.pn = phi { ptr, i32 } [ %.pn21, %84 ], [ %.pn.pn.pn, %75 ]
  call void @_ZNSt14_Optional_baseIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_14RightOfWayRule5StateEEEE4NextELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %8) #6
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  br label %86

86:                                               ; preds = %85, %63
  %.pn21.pn.pn = phi { ptr, i32 } [ %.pn21.pn, %85 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  br label %87

87:                                               ; preds = %86, %61
  %.pn21.pn.pn.pn = phi { ptr, i32 } [ %.pn21.pn.pn, %86 ], [ %62, %61 ]
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules5PhaseEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  br label %88

88:                                               ; preds = %87, %59
  %.pn21.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn21.pn.pn.pn, %87 ], [ %60, %59 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @_ZNSt14_Optional_baseIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEEELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(96) %5) #6
  br label %89

89:                                               ; preds = %88, %57
  %.pn21.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn21.pn.pn.pn.pn, %88 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %5) #6
  call void @_ZNSt14_Optional_baseIN7maliput3api5rules9PhaseRingELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(152) %4) #6
  call void @llvm.lifetime.end.p0(i64 152, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn21.pn.pn.pn.pn.pn

.critedge:                                        ; preds = %21
  call void @_ZNSt14_Optional_baseIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_5PhaseEEEEELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(96) %5) #6
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %5) #6
  br label %90

90:                                               ; preds = %.critedge, %3
  call void @_ZNSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_14RightOfWayRule5StateEEEEEEC2ESt9nullopt_t(ptr noundef nonnull align 8 dereferenceable(96) %0) #6
  br label %91

91:                                               ; preds = %79, %90
  call void @_ZNSt14_Optional_baseIN7maliput3api5rules9PhaseRingELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(152) %4) #6
  call void @llvm.lifetime.end.p0(i64 152, ptr nonnull %4) #6
  ret void
}

; 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 uwtable
declare dso_local void @_ZNK7maliput3api5rules13PhaseRingBook13FindPhaseRingERKNS0_22TypeSpecificIdentifierINS1_14RightOfWayRuleEEE(ptr dead_on_unwind noalias writable sret(%"class.std::optional.20") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7maliput3api5rules13PhaseProvider8GetPhaseERKNS0_22TypeSpecificIdentifierINS1_9PhaseRingEEE(ptr dead_on_unwind noalias writable sret(%"class.std::optional.51") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules5PhaseEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(208) ptr @_ZNKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS1_5rules5PhaseEEES4_St4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S4_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

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

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

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

; Function Attrs: mustprogress 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) #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7maliput3api5rules19StateProviderResultINS0_22TypeSpecificIdentifierINS1_14RightOfWayRule5StateEEEE4NextD2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #4 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules14RightOfWayRule5StateEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNSt8optionalIN7maliput3api5rules19StateProviderResultINS1_22TypeSpecificIdentifierINS2_14RightOfWayRule5StateEEEE4NextEEC2ERKSA_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #5 align 2

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

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

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

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #6 = { nounwind }

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass