; LLVM IR from maliput/maliput :: src/maliput/api/rules (rule_registry)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload.base", [7 x i8] }
%"struct.std::_Optional_payload.base" = type { %"struct.std::_Optional_payload_base.base" }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<maliput::api::rules::RuleRegistry::QueryResult>::_Storage", i8 }>
%"union.std::_Optional_payload_base<maliput::api::rules::RuleRegistry::QueryResult>::_Storage" = type { %"struct.maliput::api::rules::RuleRegistry::QueryResult" }
%"struct.maliput::api::rules::RuleRegistry::QueryResult" = type { %"class.maliput::api::TypeSpecificIdentifier", %"class.std::variant" }
%"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::variant" = type { %"struct.std::__detail::__variant::_Variant_base.base", [7 x i8] }
%"struct.std::__detail::__variant::_Variant_base.base" = type { %"struct.std::__detail::__variant::_Move_assign_base.base" }
%"struct.std::__detail::__variant::_Move_assign_base.base" = type { %"struct.std::__detail::__variant::_Copy_assign_base.base" }
%"struct.std::__detail::__variant::_Copy_assign_base.base" = type { %"struct.std::__detail::__variant::_Move_ctor_base.base" }
%"struct.std::__detail::__variant::_Move_ctor_base.base" = type { %"struct.std::__detail::__variant::_Copy_ctor_base.base" }
%"struct.std::__detail::__variant::_Copy_ctor_base.base" = type { %"struct.std::__detail::__variant::_Variant_storage.base" }
%"struct.std::__detail::__variant::_Variant_storage.base" = type { %"union.std::__detail::__variant::_Variadic_union", i8 }
%"union.std::__detail::__variant::_Variadic_union" = type { %"struct.std::__detail::__variant::_Uninitialized" }
%"struct.std::__detail::__variant::_Uninitialized" = type { %"struct.__gnu_cxx::__aligned_membuf" }
%"struct.__gnu_cxx::__aligned_membuf" = type { [24 x i8] }
%"struct.std::nullopt_t" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"class.maliput::api::rules::RuleRegistry" = type { ptr, %"class.std::map", %"class.std::map.10" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule::Type>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule::Type>, std::vector<maliput::api::rules::RangeValueRule::Range>>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule::Type>, std::vector<maliput::api::rules::RangeValueRule::Range>>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule::Type>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule::Type>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule::Type>, std::vector<maliput::api::rules::RangeValueRule::Range>>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule::Type>, std::vector<maliput::api::rules::RangeValueRule::Range>>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule::Type>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::map.10" = type { %"class.std::_Rb_tree.11" }
%"class.std::_Rb_tree.11" = type { %"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule::Type>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule::Type>, std::vector<maliput::api::rules::DiscreteValueRule::DiscreteValue>>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule::Type>, std::vector<maliput::api::rules::DiscreteValueRule::DiscreteValue>>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule::Type>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule::Type>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule::Type>, std::vector<maliput::api::rules::DiscreteValueRule::DiscreteValue>>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule::Type>, std::vector<maliput::api::rules::DiscreteValueRule::DiscreteValue>>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule::Type>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }

@.str = external hidden unnamed_addr constant [53 x i8], align 1
@__func__._ZN7maliput3api5rules12RuleRegistry22RegisterRangeValueRuleERKNS0_22TypeSpecificIdentifierINS1_4Rule4TypeEEERKSt6vectorINS1_14RangeValueRule5RangeESaISB_EE = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [63 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7maliput3api5rules12RuleRegistry22RegisterRangeValueRuleERKNS0_22TypeSpecificIdentifierINS1_4Rule4TypeEEERKSt6vectorINS1_14RangeValueRule5RangeESaISB_EE(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #0 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.std::optional", align 8
  %8 = alloca %"struct.std::nullopt_t", align 1
  %9 = alloca ptr, align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"struct.std::pair", align 8
  %16 = alloca { ptr, i8 }, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8
  br label %18

18:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 72, ptr %7) #7
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK7maliput3api5rules12RuleRegistry27GetPossibleStatesOfRuleTypeERKNS0_22TypeSpecificIdentifierINS1_4Rule4TypeEEE(ptr dead_on_unwind writable sret(%"class.std::optional") align 8 %7, ptr noundef nonnull align 8 dereferenceable(104) %17, ptr noundef nonnull align 8 dereferenceable(32) %19)
  %20 = call noundef zeroext i1 @_ZSteqIN7maliput3api5rules12RuleRegistry11QueryResultEEbRKSt8optionalIT_ESt9nullopt_t(ptr noundef nonnull align 8 dereferenceable(72) %7) #7
  %21 = xor i1 %20, true
  call void @_ZNSt14_Optional_baseIN7maliput3api5rules12RuleRegistry11QueryResultELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %7) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %7) #7
  br i1 %21, label %22, label %23

22:                                               ; preds = %18
  call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef @.str, ptr noundef @__func__._ZN7maliput3api5rules12RuleRegistry22RegisterRangeValueRuleERKNS0_22TypeSpecificIdentifierINS1_4Rule4TypeEEERKSt6vectorINS1_14RangeValueRule5RangeESaISB_EE, ptr noundef @.str.1, i32 noundef 66) #8
  unreachable

23:                                               ; preds = %18
  br label %24

24:                                               ; preds = %23
  br label %25

25:                                               ; preds = %24
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = call noundef zeroext i1 @_ZNKSt6vectorIN7maliput3api5rules14RangeValueRule5RangeESaIS4_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #7
  br i1 %27, label %28, label %29

28:                                               ; preds = %25
  call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef @.str.2, ptr noundef @__func__._ZN7maliput3api5rules12RuleRegistry22RegisterRangeValueRuleERKNS0_22TypeSpecificIdentifierINS1_4Rule4TypeEEERKSt6vectorINS1_14RangeValueRule5RangeESaISB_EE, ptr noundef @.str.1, i32 noundef 67) #8
  unreachable

29:                                               ; preds = %25
  br label %30

30:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %31, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = call ptr @_ZNKSt6vectorIN7maliput3api5rules14RangeValueRule5RangeESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #7
  %34 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %33, ptr %34, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = call ptr @_ZNKSt6vectorIN7maliput3api5rules14RangeValueRule5RangeESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #7
  %37 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %36, ptr %37, align 8
  br label %38

38:                                               ; preds = %61, %30
  %39 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7maliput3api5rules14RangeValueRule5RangeESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br i1 %39, label %41, label %40

40:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %63

41:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %42 = call noundef nonnull align 8 dereferenceable(152) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN7maliput3api5rules14RangeValueRule5RangeESt6vectorIS5_SaIS5_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  store ptr %42, ptr %12, align 8, !tbaa !5
  br label %43

43:                                               ; preds = %41
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = call ptr @_ZNKSt6vectorIN7maliput3api5rules14RangeValueRule5RangeESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %44) #7
  %46 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %45, ptr %46, align 8
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = call ptr @_ZNKSt6vectorIN7maliput3api5rules14RangeValueRule5RangeESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %47) #7
  %49 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %48, ptr %49, align 8
  %50 = load ptr, ptr %12, align 8, !tbaa !5
  %51 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8
  %53 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  %54 = load ptr, ptr %53, align 8
  %55 = call noundef i64 @_ZSt5countIN9__gnu_cxx17__normal_iteratorIPKN7maliput3api5rules14RangeValueRule5RangeESt6vectorIS6_SaIS6_EEEES6_ENSt15iterator_traitsIT_E15difference_typeESE_SE_RKT0_(ptr %52, ptr %54, ptr noundef nonnull align 8 dereferenceable(152) %50)
  %56 = icmp eq i64 %55, 1
  br i1 %56, label %58, label %57

57:                                               ; preds = %43
  call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef @.str.3, ptr noundef @__func__._ZN7maliput3api5rules12RuleRegistry22RegisterRangeValueRuleERKNS0_22TypeSpecificIdentifierINS1_4Rule4TypeEEERKSt6vectorINS1_14RangeValueRule5RangeESaISB_EE, ptr noundef @.str.1, i32 noundef 69) #8
  unreachable

58:                                               ; preds = %43
  br label %59

59:                                               ; preds = %58
  br label %60

60:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %61

61:                                               ; preds = %60
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN7maliput3api5rules14RangeValueRule5RangeESt6vectorIS5_SaIS5_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br label %38

63:                                               ; preds = %40
  br label %64

64:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #7
  %65 = getelementptr inbounds %"class.maliput::api::rules::RuleRegistry", ptr %17, i32 0, i32 1
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = call { ptr, i8 } @_ZNSt3mapIN7maliput3api22TypeSpecificIdentifierINS1_5rules4Rule4TypeEEESt6vectorINS3_14RangeValueRule5RangeESaIS9_EESt4lessIS6_ESaISt4pairIKS6_SB_EEE7emplaceIJRSF_RKSB_EEESE_ISt17_Rb_tree_iteratorISG_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(48) %65, ptr noundef nonnull align 8 dereferenceable(32) %66, ptr noundef nonnull align 8 dereferenceable(24) %67)
  store { ptr, i8 } %68, ptr %16, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %16, i64 9, i1 false)
  %69 = getelementptr inbounds %"struct.std::pair", ptr %15, i32 0, i32 1
  %70 = load i8, ptr %69, align 8, !tbaa !9, !range !13, !noundef !14
  %71 = trunc i8 %70 to i1
  %72 = xor i1 %71, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  br i1 %72, label %73, label %74

73:                                               ; preds = %64
  call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef @.str.4, ptr noundef @__func__._ZN7maliput3api5rules12RuleRegistry22RegisterRangeValueRuleERKNS0_22TypeSpecificIdentifierINS1_4Rule4TypeEEERKSt6vectorINS1_14RangeValueRule5RangeESaISB_EE, ptr noundef @.str.1, i32 noundef 72) #8
  unreachable

74:                                               ; preds = %64
  br label %75

75:                                               ; preds = %74
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIN7maliput3api5rules12RuleRegistry11QueryResultEEbRKSt8optionalIT_ESt9nullopt_t(ptr noundef nonnull align 8 dereferenceable(72)) #1

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

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

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

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

; Function Attrs: noreturn
declare void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #4

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt5countIN9__gnu_cxx17__normal_iteratorIPKN7maliput3api5rules14RangeValueRule5RangeESt6vectorIS6_SaIS6_EEEES6_ENSt15iterator_traitsIT_E15difference_typeESE_SE_RKT0_(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(152)) #5

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3mapIN7maliput3api22TypeSpecificIdentifierINS1_5rules4Rule4TypeEEESt6vectorINS3_14RangeValueRule5RangeESaIS9_EESt4lessIS6_ESaISt4pairIKS6_SB_EEE7emplaceIJRSF_RKSB_EEESE_ISt17_Rb_tree_iteratorISG_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) #0 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) #6

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

!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, !12, i64 8}
!10 = !{!"_ZTSSt4pairISt17_Rb_tree_iteratorIS_IKN7maliput3api22TypeSpecificIdentifierINS2_5rules4Rule4TypeEEESt6vectorINS4_14RangeValueRule5RangeESaISB_EEEEbE", !11, i64 0, !12, i64 8}
!11 = !{!"_ZTSSt17_Rb_tree_iteratorISt4pairIKN7maliput3api22TypeSpecificIdentifierINS2_5rules4Rule4TypeEEESt6vectorINS4_14RangeValueRule5RangeESaISB_EEEE", !6, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload.base", [7 x i8] }
%"struct.std::_Optional_payload.base" = type { %"struct.std::_Optional_payload_base.base" }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<maliput::api::rules::RuleRegistry::QueryResult>::_Storage", i8 }>
%"union.std::_Optional_payload_base<maliput::api::rules::RuleRegistry::QueryResult>::_Storage" = type { %"struct.maliput::api::rules::RuleRegistry::QueryResult" }
%"struct.maliput::api::rules::RuleRegistry::QueryResult" = type { %"class.maliput::api::TypeSpecificIdentifier", %"class.std::variant" }
%"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::variant" = type { %"struct.std::__detail::__variant::_Variant_base.base", [7 x i8] }
%"struct.std::__detail::__variant::_Variant_base.base" = type { %"struct.std::__detail::__variant::_Move_assign_base.base" }
%"struct.std::__detail::__variant::_Move_assign_base.base" = type { %"struct.std::__detail::__variant::_Copy_assign_base.base" }
%"struct.std::__detail::__variant::_Copy_assign_base.base" = type { %"struct.std::__detail::__variant::_Move_ctor_base.base" }
%"struct.std::__detail::__variant::_Move_ctor_base.base" = type { %"struct.std::__detail::__variant::_Copy_ctor_base.base" }
%"struct.std::__detail::__variant::_Copy_ctor_base.base" = type { %"struct.std::__detail::__variant::_Variant_storage.base" }
%"struct.std::__detail::__variant::_Variant_storage.base" = type { %"union.std::__detail::__variant::_Variadic_union", i8 }
%"union.std::__detail::__variant::_Variadic_union" = type { %"struct.std::__detail::__variant::_Uninitialized" }
%"struct.std::__detail::__variant::_Uninitialized" = type { %"struct.__gnu_cxx::__aligned_membuf" }
%"struct.__gnu_cxx::__aligned_membuf" = type { [24 x i8] }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [53 x i8], align 1
@__func__._ZN7maliput3api5rules12RuleRegistry22RegisterRangeValueRuleERKNS0_22TypeSpecificIdentifierINS1_4Rule4TypeEEERKSt6vectorINS1_14RangeValueRule5RangeESaISB_EE = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [63 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7maliput3api5rules12RuleRegistry22RegisterRangeValueRuleERKNS0_22TypeSpecificIdentifierINS1_4Rule4TypeEEERKSt6vectorINS1_14RangeValueRule5RangeESaISB_EE(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #0 align 2 {
  %4 = alloca %"class.std::optional", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %4) #6
  call void @_ZNK7maliput3api5rules12RuleRegistry27GetPossibleStatesOfRuleTypeERKNS0_22TypeSpecificIdentifierINS1_4Rule4TypeEEE(ptr dead_on_unwind nonnull writable sret(%"class.std::optional") align 8 %4, ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(32) %1)
  %7 = call noundef zeroext i1 @_ZSteqIN7maliput3api5rules12RuleRegistry11QueryResultEEbRKSt8optionalIT_ESt9nullopt_t(ptr noundef nonnull align 8 dereferenceable(72) %4) #6
  call void @_ZNSt14_Optional_baseIN7maliput3api5rules12RuleRegistry11QueryResultELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %4) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %4) #6
  br i1 %7, label %9, label %8

8:                                                ; preds = %3
  call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN7maliput3api5rules12RuleRegistry22RegisterRangeValueRuleERKNS0_22TypeSpecificIdentifierINS1_4Rule4TypeEEERKSt6vectorINS1_14RangeValueRule5RangeESaISB_EE, ptr noundef nonnull @.str.1, i32 noundef 66) #7
  unreachable

9:                                                ; preds = %3
  %10 = call noundef zeroext i1 @_ZNKSt6vectorIN7maliput3api5rules14RangeValueRule5RangeESaIS4_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  br i1 %10, label %11, label %12

11:                                               ; preds = %9
  call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZN7maliput3api5rules12RuleRegistry22RegisterRangeValueRuleERKNS0_22TypeSpecificIdentifierINS1_4Rule4TypeEEERKSt6vectorINS1_14RangeValueRule5RangeESaISB_EE, ptr noundef nonnull @.str.1, i32 noundef 67) #7
  unreachable

12:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %13 = call ptr @_ZNKSt6vectorIN7maliput3api5rules14RangeValueRule5RangeESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  store ptr %13, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %14 = call ptr @_ZNKSt6vectorIN7maliput3api5rules14RangeValueRule5RangeESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  store ptr %14, ptr %6, align 8
  %15 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7maliput3api5rules14RangeValueRule5RangeESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %25, %12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  %17 = call { ptr, i8 } @_ZNSt3mapIN7maliput3api22TypeSpecificIdentifierINS1_5rules4Rule4TypeEEESt6vectorINS3_14RangeValueRule5RangeESaIS9_EESt4lessIS6_ESaISt4pairIKS6_SB_EEE7emplaceIJRSF_RKSB_EEESE_ISt17_Rb_tree_iteratorISG_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(48) %16, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.fca.1.extract = extractvalue { ptr, i8 } %17, 1
  %18 = trunc i8 %.fca.1.extract to i1
  br i1 %18, label %29, label %28

.lr.ph:                                           ; preds = %12, %25
  %19 = call noundef nonnull align 8 dereferenceable(152) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN7maliput3api5rules14RangeValueRule5RangeESt6vectorIS5_SaIS5_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %20 = call ptr @_ZNKSt6vectorIN7maliput3api5rules14RangeValueRule5RangeESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %21 = call ptr @_ZNKSt6vectorIN7maliput3api5rules14RangeValueRule5RangeESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %22 = call noundef i64 @_ZSt5countIN9__gnu_cxx17__normal_iteratorIPKN7maliput3api5rules14RangeValueRule5RangeESt6vectorIS6_SaIS6_EEEES6_ENSt15iterator_traitsIT_E15difference_typeESE_SE_RKT0_(ptr %20, ptr %21, ptr noundef nonnull align 8 dereferenceable(152) %19)
  %23 = icmp eq i64 %22, 1
  br i1 %23, label %25, label %24

24:                                               ; preds = %.lr.ph
  call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__._ZN7maliput3api5rules12RuleRegistry22RegisterRangeValueRuleERKNS0_22TypeSpecificIdentifierINS1_4Rule4TypeEEERKSt6vectorINS1_14RangeValueRule5RangeESaISB_EE, ptr noundef nonnull @.str.1, i32 noundef 69) #7
  unreachable

25:                                               ; preds = %.lr.ph
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN7maliput3api5rules14RangeValueRule5RangeESt6vectorIS5_SaIS5_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %27 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7maliput3api5rules14RangeValueRule5RangeESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %27, label %.lr.ph, label %._crit_edge

28:                                               ; preds = %._crit_edge
  call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef nonnull @.str.4, ptr noundef nonnull @__func__._ZN7maliput3api5rules12RuleRegistry22RegisterRangeValueRuleERKNS0_22TypeSpecificIdentifierINS1_4Rule4TypeEEERKSt6vectorINS1_14RangeValueRule5RangeESaISB_EE, ptr noundef nonnull @.str.1, i32 noundef 72) #7
  unreachable

29:                                               ; preds = %._crit_edge
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIN7maliput3api5rules12RuleRegistry11QueryResultEEbRKSt8optionalIT_ESt9nullopt_t(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1

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

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

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

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

; Function Attrs: noreturn
declare void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt5countIN9__gnu_cxx17__normal_iteratorIPKN7maliput3api5rules14RangeValueRule5RangeESt6vectorIS6_SaIS6_EEEES6_ENSt15iterator_traitsIT_E15difference_typeESE_SE_RKT0_(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(152)) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3mapIN7maliput3api22TypeSpecificIdentifierINS1_5rules4Rule4TypeEEESt6vectorINS3_14RangeValueRule5RangeESaIS9_EESt4lessIS6_ESaISt4pairIKS6_SB_EEE7emplaceIJRSF_RKSB_EEESE_ISt17_Rb_tree_iteratorISG_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 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 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { noreturn "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 }
attributes #7 = { noreturn }

!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,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass