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

; 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 @_ZN7maliput3api4test11CreatePhaseERKNS1_15PhaseBuildFlagsE(ptr dead_on_unwind noalias writable sret(%"class.maliput::api::rules::Phase") align 8, ptr noundef nonnull align 1 dereferenceable(4)) #2

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

17:                                               ; preds = %2
  invoke void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules9PhaseRingEEC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %6)
          to label %18 unwind label %40

18:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 208, ptr %12) #5
  store ptr %12, ptr %13, align 8
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN7maliput3api4test11CreatePhaseERKNS1_15PhaseBuildFlagsE(ptr dead_on_unwind writable sret(%"class.maliput::api::rules::Phase") align 8 %12, ptr noundef nonnull align 1 dereferenceable(4) %19)
          to label %20 unwind label %44

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

27:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #5
  call void @_ZNSt8optionalIKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS2_5rules5PhaseEEESt6vectorINS4_9PhaseRing9NextPhaseESaIS9_EESt4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_SB_EEEEC2ESt9nullopt_t(ptr noundef nonnull align 8 dereferenceable(64) %15) #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) %5, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(64) %15)
          to label %28 unwind label %59

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

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

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

36:                                               ; preds = %2
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %8, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %9, align 4
  br label %73

40:                                               ; preds = %17
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %8, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %9, align 4
  br label %72

44:                                               ; preds = %18
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %8, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %9, align 4
  %48 = load ptr, ptr %13, align 8
  %49 = icmp eq ptr %12, %48
  br i1 %49, label %54, label %50

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

54:                                               ; preds = %50, %44
  br label %71

55:                                               ; preds = %20
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %8, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %9, align 4
  br label %63

59:                                               ; preds = %27
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %8, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %9, align 4
  call void @_ZNSt14_Optional_baseIKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS2_5rules5PhaseEEESt6vectorINS4_9PhaseRing9NextPhaseESaIS9_EESt4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_SB_EEELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %15) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #5
  call void @_ZNSt6vectorIN7maliput3api5rules5PhaseESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  br label %63

63:                                               ; preds = %59, %55
  call void @_ZNSt15__new_allocatorIN7maliput3api5rules5PhaseEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  %64 = getelementptr inbounds [1 x %"class.maliput::api::rules::Phase"], ptr %12, i32 0, i32 0
  %65 = getelementptr inbounds %"class.maliput::api::rules::Phase", ptr %64, i64 1
  br label %66

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

70:                                               ; preds = %66
  br label %71

71:                                               ; preds = %70, %54
  call void @llvm.lifetime.end.p0(i64 208, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  call void @_ZN7maliput3api22TypeSpecificIdentifierINS0_5rules9PhaseRingEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  br label %72

72:                                               ; preds = %71, %40
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %73

73:                                               ; preds = %72, %36
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #5
  br label %74

74:                                               ; preds = %73
  %75 = load ptr, ptr %8, align 8
  %76 = load i32, ptr %9, align 4
  %77 = insertvalue { ptr, i32 } poison, ptr %75, 0
  %78 = insertvalue { ptr, i32 } %77, i32 %76, 1
  resume { ptr, i32 } %78
}

; 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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSSt16initializer_listIN7maliput3api5rules5PhaseEE", !6, i64 0, !11, i64 8}
!11 = !{!"long", !7, i64 0}
!12 = !{!10, !11, 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 @_ZN7maliput3api4test11CreatePhaseERKNS1_15PhaseBuildFlagsE(ptr dead_on_unwind noalias writable sret(%"class.maliput::api::rules::Phase") align 8, ptr noundef nonnull align 1 dereferenceable(4)) local_unnamed_addr #2

; 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 uwtable
define dso_local void @_ZN7maliput3api4test15CreatePhaseRingERKNS1_15PhaseBuildFlagsE(ptr dead_on_unwind noalias writable sret(%"class.maliput::api::rules::PhaseRing") align 8 %0, ptr noundef nonnull align 1 dereferenceable(4) %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %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 %"class.std::vector.235", align 8
  %7 = alloca [1 x %"class.maliput::api::rules::Phase"], align 8
  %8 = alloca %"class.std::allocator.237", align 1
  %9 = alloca %"class.std::optional.241", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %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 nonnull @.str.29, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %10 unwind label %15

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

11:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %7) #5
  invoke void @_ZN7maliput3api4test11CreatePhaseERKNS1_15PhaseBuildFlagsE(ptr dead_on_unwind nonnull writable sret(%"class.maliput::api::rules::Phase") align 8 %7, ptr noundef nonnull align 1 dereferenceable(4) %1)
          to label %12 unwind label %19

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

13:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #5
  call void @_ZNSt8optionalIKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS2_5rules5PhaseEEESt6vectorINS4_9PhaseRing9NextPhaseESaIS9_EESt4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_SB_EEEEC2ESt9nullopt_t(ptr noundef nonnull align 8 dereferenceable(64) %9) #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) %6, ptr noundef nonnull align 8 dereferenceable(64) %9)
          to label %14 unwind label %23

14:                                               ; preds = %13
  call void @_ZNSt14_Optional_baseIKSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS2_5rules5PhaseEEESt6vectorINS4_9PhaseRing9NextPhaseESaIS9_EESt4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_SB_EEELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %9) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #5
  call void @_ZNSt6vectorIN7maliput3api5rules5PhaseESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @_ZNSt15__new_allocatorIN7maliput3api5rules5PhaseEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  call void @_ZN7maliput3api5rules5PhaseD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %7) #5
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #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 nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  ret void

15:                                               ; preds = %2
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %26

17:                                               ; preds = %10
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %25

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

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

23:                                               ; preds = %13
  %24 = 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) %9) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #5
  call void @_ZNSt6vectorIN7maliput3api5rules5PhaseESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  br label %.loopexit.loopexit

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

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

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

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

; 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