; LLVM IR from maliput/maliput :: src/maliput/test_utilities/mock.ll (ZN7maliput3api4test15CreatePhaseRingEv)

; 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.maliput::api::rules::Phase" = type { %"class.maliput::api::TypeSpecificIdentifier.128", %"class.std::unordered_map.129", %"class.std::unordered_map.148", %"class.std::optional" }
%"class.maliput::api::TypeSpecificIdentifier.128" = 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::unordered_map.129" = type { %"class.std::_Hashtable.130" }
%"class.std::_Hashtable.130" = 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.148" = type { %"class.std::_Hashtable.149" }
%"class.std::_Hashtable.149" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"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<std::unordered_map<maliput::api::rules::UniqueBulbId, maliput::api::rules::BulbState>>::_Storage", i8 }>
%"union.std::_Optional_payload_base<std::unordered_map<maliput::api::rules::UniqueBulbId, maliput::api::rules::BulbState>>::_Storage" = type { %"class.std::unordered_map.168" }
%"class.std::unordered_map.168" = type { %"class.std::_Hashtable.169" }
%"class.std::_Hashtable.169" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.maliput::api::rules::PhaseRing" = type { %"class.maliput::api::TypeSpecificIdentifier.201", %"class.std::unordered_map.202", %"class.std::unordered_map.221" }
%"class.maliput::api::TypeSpecificIdentifier.201" = type { %"class.std::__cxx11::basic_string" }
%"class.std::unordered_map.202" = type { %"class.std::_Hashtable.203" }
%"class.std::_Hashtable.203" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_map.221" = type { %"class.std::_Hashtable.222" }
%"class.std::_Hashtable.222" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::allocator.0" = type { i8 }
%"class.std::vector.235" = type { %"struct.std::_Vector_base.236" }
%"struct.std::_Vector_base.236" = type { %"struct.std::_Vector_base<maliput::api::rules::Phase, std::allocator<maliput::api::rules::Phase>>::_Vector_impl" }
%"struct.std::_Vector_base<maliput::api::rules::Phase, std::allocator<maliput::api::rules::Phase>>::_Vector_impl" = type { %"struct.std::_Vector_base<maliput::api::rules::Phase, std::allocator<maliput::api::rules::Phase>>::_Vector_impl_data" }
%"struct.std::_Vector_base<maliput::api::rules::Phase, std::allocator<maliput::api::rules::Phase>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list.240" = type { ptr, i64 }
%"class.std::allocator.237" = type { i8 }
%"class.std::optional.241" = type { %"struct.std::_Optional_base.242" }
%"struct.std::_Optional_base.242" = type { %"struct.std::_Optional_payload.244" }
%"struct.std::_Optional_payload.244" = type { %"struct.std::_Optional_payload.base.248", [7 x i8] }
%"struct.std::_Optional_payload.base.248" = type { %"struct.std::_Optional_payload_base.base.247" }
%"struct.std::_Optional_payload_base.base.247" = type <{ %"union.std::_Optional_payload_base<const std::unordered_map<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Phase>, std::vector<maliput::api::rules::PhaseRing::NextPhase>>>::_Storage", i8 }>
%"union.std::_Optional_payload_base<const std::unordered_map<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Phase>, std::vector<maliput::api::rules::PhaseRing::NextPhase>>>::_Storage" = type { %"class.std::unordered_map.221" }
%"struct.std::nullopt_t" = type { i8 }

@.str.29 = external hidden unnamed_addr constant [5 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maliput3api4test11CreatePhaseEv(ptr dead_on_unwind noalias writable sret(%"class.maliput::api::rules::Phase") align 8) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7maliput3api4test15CreatePhaseRingEv(ptr dead_on_unwind noalias writable sret(%"class.maliput::api::rules::PhaseRing") align 8 %0) #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.maliput::api::TypeSpecificIdentifier.201", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator.0", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::vector.235", align 8
  %9 = alloca %"class.std::initializer_list.240", align 8
  %10 = alloca [1 x %"class.maliput::api::rules::Phase"], align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.std::allocator.237", align 1
  %13 = alloca %"class.std::optional.241", align 8
  %14 = alloca %"struct.std::nullopt_t", align 1
  store ptr %0, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.29, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %15 unwind label %33

15:                                               ; preds = %1
  invoke void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules9PhaseRingEEC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef %4)
          to label %16 unwind label %37

16:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 208, ptr %10) #5
  store ptr %10, ptr %11, align 8
  invoke void @_ZN7maliput3api4test11CreatePhaseEv(ptr dead_on_unwind writable sret(%"class.maliput::api::rules::Phase") align 8 %10)
          to label %17 unwind label %41

17:                                               ; preds = %16
  %18 = getelementptr inbounds %"class.std::initializer_list.240", ptr %9, i32 0, i32 0
  store ptr %10, ptr %18, align 8, !tbaa !5
  %19 = getelementptr inbounds %"class.std::initializer_list.240", ptr %9, i32 0, i32 1
  store i64 1, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  call void @_ZNSaIN7maliput3api5rules5PhaseEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  %20 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 0
  %21 = load ptr, ptr %20, align 8
  %22 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 1
  %23 = load i64, ptr %22, align 8
  invoke void @_ZNSt6vectorIN7maliput3api5rules5PhaseESaIS3_EEC2ESt16initializer_listIS3_ERKS4_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr %21, i64 %23, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %24 unwind label %52

24:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 64, ptr %13) #5
  call void @_ZNSt8optionalIKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS2_5rules5PhaseEEESt6vectorINS4_9PhaseRing9NextPhaseESaIS9_EESt4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_SB_EEEEC2ESt9nullopt_t(ptr noundef nonnull align 8 dereferenceable(64) %13) #5
  invoke void @_ZN7maliput3api5rules9PhaseRingC1ERKNS0_22TypeSpecificIdentifierIS2_EERKSt6vectorINS1_5PhaseESaIS8_EERKSt8optionalIKSt13unordered_mapINS3_IS8_EES7_INS2_9NextPhaseESaISG_EESt4hashISF_ESt8equal_toISF_ESaISt4pairIKSF_SI_EEEE(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(64) %13)
          to label %25 unwind label %56

25:                                               ; preds = %24
  call void @_ZNSt14_Optional_baseIKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS2_5rules5PhaseEEESt6vectorINS4_9PhaseRing9NextPhaseESaIS9_EESt4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_SB_EEELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %13) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #5
  call void @_ZNSt6vectorIN7maliput3api5rules5PhaseESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @_ZNSt15__new_allocatorIN7maliput3api5rules5PhaseEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  %26 = getelementptr inbounds [1 x %"class.maliput::api::rules::Phase"], ptr %10, i32 0, i32 0
  %27 = getelementptr inbounds %"class.maliput::api::rules::Phase", ptr %26, i64 1
  br label %28

28:                                               ; preds = %28, %25
  %29 = phi ptr [ %27, %25 ], [ %30, %28 ]
  %30 = getelementptr inbounds %"class.maliput::api::rules::Phase", ptr %29, i64 -1
  call void @_ZN7maliput3api5rules5PhaseD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %30) #5
  %31 = icmp eq ptr %30, %26
  br i1 %31, label %32, label %28

32:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 208, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules9PhaseRingEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #5
  ret void

33:                                               ; preds = %1
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %6, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %7, align 4
  br label %70

37:                                               ; preds = %15
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %6, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %7, align 4
  br label %69

41:                                               ; preds = %16
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %6, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %7, align 4
  %45 = load ptr, ptr %11, align 8
  %46 = icmp eq ptr %10, %45
  br i1 %46, label %51, label %47

47:                                               ; preds = %47, %41
  %48 = phi ptr [ %45, %41 ], [ %49, %47 ]
  %49 = getelementptr inbounds %"class.maliput::api::rules::Phase", ptr %48, i64 -1
  call void @_ZN7maliput3api5rules5PhaseD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %49) #5
  %50 = icmp eq ptr %49, %10
  br i1 %50, label %51, label %47

51:                                               ; preds = %47, %41
  br label %68

52:                                               ; preds = %17
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %6, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %7, align 4
  br label %60

56:                                               ; preds = %24
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %6, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %7, align 4
  call void @_ZNSt14_Optional_baseIKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS2_5rules5PhaseEEESt6vectorINS4_9PhaseRing9NextPhaseESaIS9_EESt4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_SB_EEELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %13) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #5
  call void @_ZNSt6vectorIN7maliput3api5rules5PhaseESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  br label %60

60:                                               ; preds = %56, %52
  call void @_ZNSt15__new_allocatorIN7maliput3api5rules5PhaseEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  %61 = getelementptr inbounds [1 x %"class.maliput::api::rules::Phase"], ptr %10, i32 0, i32 0
  %62 = getelementptr inbounds %"class.maliput::api::rules::Phase", ptr %61, i64 1
  br label %63

63:                                               ; preds = %63, %60
  %64 = phi ptr [ %62, %60 ], [ %65, %63 ]
  %65 = getelementptr inbounds %"class.maliput::api::rules::Phase", ptr %64, i64 -1
  call void @_ZN7maliput3api5rules5PhaseD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %65) #5
  %66 = icmp eq ptr %65, %61
  br i1 %66, label %67, label %63

67:                                               ; preds = %63
  br label %68

68:                                               ; preds = %67, %51
  call void @llvm.lifetime.end.p0(i64 208, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules9PhaseRingEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  br label %69

69:                                               ; preds = %68, %37
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %70

70:                                               ; preds = %69, %33
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #5
  br label %71

71:                                               ; preds = %70
  %72 = load ptr, ptr %6, align 8
  %73 = load i32, ptr %7, align 4
  %74 = insertvalue { ptr, i32 } poison, ptr %72, 0
  %75 = insertvalue { ptr, i32 } %74, i32 %73, 1
  resume { ptr, i32 } %75
}

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

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

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

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

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

declare void @_ZN7maliput3api5rules9PhaseRingC1ERKNS0_22TypeSpecificIdentifierIS2_EERKSt6vectorINS1_5PhaseESaIS8_EERKSt8optionalIKSt13unordered_mapINS3_IS8_EES7_INS2_9NextPhaseESaISG_EESt4hashISF_ESt8equal_toISF_ESaISt4pairIKSF_SI_EEEE(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #4

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

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

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

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

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

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

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


; 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.maliput::api::rules::Phase" = type { %"class.maliput::api::TypeSpecificIdentifier.128", %"class.std::unordered_map.129", %"class.std::unordered_map.148", %"class.std::optional" }
%"class.maliput::api::TypeSpecificIdentifier.128" = 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::unordered_map.129" = type { %"class.std::_Hashtable.130" }
%"class.std::_Hashtable.130" = 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.148" = type { %"class.std::_Hashtable.149" }
%"class.std::_Hashtable.149" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"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<std::unordered_map<maliput::api::rules::UniqueBulbId, maliput::api::rules::BulbState>>::_Storage", i8 }>
%"union.std::_Optional_payload_base<std::unordered_map<maliput::api::rules::UniqueBulbId, maliput::api::rules::BulbState>>::_Storage" = type { %"class.std::unordered_map.168" }
%"class.std::unordered_map.168" = type { %"class.std::_Hashtable.169" }
%"class.std::_Hashtable.169" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.maliput::api::rules::PhaseRing" = type { %"class.maliput::api::TypeSpecificIdentifier.201", %"class.std::unordered_map.202", %"class.std::unordered_map.221" }
%"class.maliput::api::TypeSpecificIdentifier.201" = type { %"class.std::__cxx11::basic_string" }
%"class.std::unordered_map.202" = type { %"class.std::_Hashtable.203" }
%"class.std::_Hashtable.203" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_map.221" = type { %"class.std::_Hashtable.222" }
%"class.std::_Hashtable.222" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::allocator.0" = type { i8 }
%"class.std::vector.235" = type { %"struct.std::_Vector_base.236" }
%"struct.std::_Vector_base.236" = type { %"struct.std::_Vector_base<maliput::api::rules::Phase, std::allocator<maliput::api::rules::Phase>>::_Vector_impl" }
%"struct.std::_Vector_base<maliput::api::rules::Phase, std::allocator<maliput::api::rules::Phase>>::_Vector_impl" = type { %"struct.std::_Vector_base<maliput::api::rules::Phase, std::allocator<maliput::api::rules::Phase>>::_Vector_impl_data" }
%"struct.std::_Vector_base<maliput::api::rules::Phase, std::allocator<maliput::api::rules::Phase>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.237" = type { i8 }
%"class.std::optional.241" = type { %"struct.std::_Optional_base.242" }
%"struct.std::_Optional_base.242" = type { %"struct.std::_Optional_payload.244" }
%"struct.std::_Optional_payload.244" = type { %"struct.std::_Optional_payload.base.248", [7 x i8] }
%"struct.std::_Optional_payload.base.248" = type { %"struct.std::_Optional_payload_base.base.247" }
%"struct.std::_Optional_payload_base.base.247" = type <{ %"union.std::_Optional_payload_base<const std::unordered_map<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Phase>, std::vector<maliput::api::rules::PhaseRing::NextPhase>>>::_Storage", i8 }>
%"union.std::_Optional_payload_base<const std::unordered_map<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Phase>, std::vector<maliput::api::rules::PhaseRing::NextPhase>>>::_Storage" = type { %"class.std::unordered_map.221" }

@.str.29 = external hidden unnamed_addr constant [5 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maliput3api4test11CreatePhaseEv(ptr dead_on_unwind noalias writable sret(%"class.maliput::api::rules::Phase") align 8) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7maliput3api4test15CreatePhaseRingEv(ptr dead_on_unwind noalias writable sret(%"class.maliput::api::rules::PhaseRing") align 8 %0) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.maliput::api::TypeSpecificIdentifier.201", align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator.0", align 1
  %5 = alloca %"class.std::vector.235", align 8
  %6 = alloca [1 x %"class.maliput::api::rules::Phase"], align 8
  %7 = alloca %"class.std::allocator.237", align 1
  %8 = alloca %"class.std::optional.241", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.29, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %9 unwind label %14

9:                                                ; preds = %1
  invoke void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules9PhaseRingEEC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull %3)
          to label %10 unwind label %16

10:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %6) #5
  invoke void @_ZN7maliput3api4test11CreatePhaseEv(ptr dead_on_unwind nonnull writable sret(%"class.maliput::api::rules::Phase") align 8 %6)
          to label %11 unwind label %18

11:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaIN7maliput3api5rules5PhaseEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt6vectorIN7maliput3api5rules5PhaseESaIS3_EEC2ESt16initializer_listIS3_ERKS4_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr nonnull %6, i64 1, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %12 unwind label %20

12:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #5
  call void @_ZNSt8optionalIKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS2_5rules5PhaseEEESt6vectorINS4_9PhaseRing9NextPhaseESaIS9_EESt4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_SB_EEEEC2ESt9nullopt_t(ptr noundef nonnull align 8 dereferenceable(64) %8) #5
  invoke void @_ZN7maliput3api5rules9PhaseRingC1ERKNS0_22TypeSpecificIdentifierIS2_EERKSt6vectorINS1_5PhaseESaIS8_EERKSt8optionalIKSt13unordered_mapINS3_IS8_EES7_INS2_9NextPhaseESaISG_EESt4hashISF_ESt8equal_toISF_ESaISt4pairIKSF_SI_EEEE(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(64) %8)
          to label %13 unwind label %22

13:                                               ; preds = %12
  call void @_ZNSt14_Optional_baseIKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS2_5rules5PhaseEEESt6vectorINS4_9PhaseRing9NextPhaseESaIS9_EESt4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_SB_EEELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %8) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #5
  call void @_ZNSt6vectorIN7maliput3api5rules5PhaseESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @_ZNSt15__new_allocatorIN7maliput3api5rules5PhaseEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @_ZN7maliput3api5rules5PhaseD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %6) #5
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules9PhaseRingEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #5
  ret void

14:                                               ; preds = %1
  %15 = landingpad { ptr, i32 }
          cleanup
  br label %25

16:                                               ; preds = %9
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %24

18:                                               ; preds = %10
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

20:                                               ; preds = %11
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.loopexit

22:                                               ; preds = %12
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Optional_baseIKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS2_5rules5PhaseEEESt6vectorINS4_9PhaseRing9NextPhaseESaIS9_EESt4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_SB_EEELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %8) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #5
  call void @_ZNSt6vectorIN7maliput3api5rules5PhaseESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %22, %20
  %.pn = phi { ptr, i32 } [ %23, %22 ], [ %21, %20 ]
  call void @_ZNSt15__new_allocatorIN7maliput3api5rules5PhaseEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @_ZN7maliput3api5rules5PhaseD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %6) #5
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %18
  %.pn.pn = phi { ptr, i32 } [ %19, %18 ], [ %.pn, %.loopexit.loopexit ]
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules9PhaseRingEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  br label %24

24:                                               ; preds = %.loopexit, %16
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %.loopexit ], [ %17, %16 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  br label %25

25:                                               ; preds = %24, %14
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %24 ], [ %15, %14 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn.pn.pn.pn
}

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

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

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

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

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

declare void @_ZN7maliput3api5rules9PhaseRingC1ERKNS0_22TypeSpecificIdentifierIS2_EERKSt6vectorINS1_5PhaseESaIS8_EERKSt8optionalIKSt13unordered_mapINS3_IS8_EES7_INS2_9NextPhaseESaISG_EESt4hashISF_ESt8equal_toISF_ESaISt4pairIKSF_SI_EEEE(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #4

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass