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

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

%"class.std::map.77" = type { %"class.std::_Rb_tree.78" }
%"class.std::_Rb_tree.78" = type { %"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, maliput::api::rules::DiscreteValueRule>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, maliput::api::rules::DiscreteValueRule>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, maliput::api::rules::DiscreteValueRule>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, maliput::api::rules::DiscreteValueRule>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>>>::_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 }
%"struct.maliput::api::rules::RoadRulebook::QueryResults" = type { %"class.std::map.88", %"class.std::map.94", %"class.std::map.100", %"class.std::map.77", %"class.std::map.106" }
%"class.std::map.88" = type { %"class.std::_Rb_tree.89" }
%"class.std::_Rb_tree.89" = type { %"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule>, maliput::api::rules::RightOfWayRule>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule>, maliput::api::rules::RightOfWayRule>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule>, maliput::api::rules::RightOfWayRule>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule>, maliput::api::rules::RightOfWayRule>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.94" = type { %"class.std::_Rb_tree.95" }
%"class.std::_Rb_tree.95" = type { %"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::SpeedLimitRule>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::SpeedLimitRule>, maliput::api::rules::SpeedLimitRule>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::SpeedLimitRule>, maliput::api::rules::SpeedLimitRule>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::SpeedLimitRule>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::SpeedLimitRule>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::SpeedLimitRule>, maliput::api::rules::SpeedLimitRule>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::SpeedLimitRule>, maliput::api::rules::SpeedLimitRule>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::SpeedLimitRule>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.100" = type { %"class.std::_Rb_tree.101" }
%"class.std::_Rb_tree.101" = type { %"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::DirectionUsageRule>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::DirectionUsageRule>, maliput::api::rules::DirectionUsageRule>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::DirectionUsageRule>, maliput::api::rules::DirectionUsageRule>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::DirectionUsageRule>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::DirectionUsageRule>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::DirectionUsageRule>, maliput::api::rules::DirectionUsageRule>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::DirectionUsageRule>, maliput::api::rules::DirectionUsageRule>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::DirectionUsageRule>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.106" = type { %"class.std::_Rb_tree.107" }
%"class.std::_Rb_tree.107" = type { %"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, maliput::api::rules::RangeValueRule>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, maliput::api::rules::RangeValueRule>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, maliput::api::rules::RangeValueRule>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, maliput::api::rules::RangeValueRule>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon = type { ptr }
%class.anon.111 = type { ptr, double }
%"class.std::vector.112" = type { %"struct.std::_Vector_base.113" }
%"struct.std::_Vector_base.113" = type { %"struct.std::_Vector_base<std::function<bool (const maliput::api::rules::DiscreteValueRule &)>, std::allocator<std::function<bool (const maliput::api::rules::DiscreteValueRule &)>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::function<bool (const maliput::api::rules::DiscreteValueRule &)>, std::allocator<std::function<bool (const maliput::api::rules::DiscreteValueRule &)>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::function<bool (const maliput::api::rules::DiscreteValueRule &)>, std::allocator<std::function<bool (const maliput::api::rules::DiscreteValueRule &)>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::function<bool (const maliput::api::rules::DiscreteValueRule &)>, std::allocator<std::function<bool (const maliput::api::rules::DiscreteValueRule &)>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list.117" = type { ptr, i64 }
%"class.std::allocator.114" = type { i8 }
%"class.std::vector.118" = type { %"struct.std::_Vector_base.119" }
%"struct.std::_Vector_base.119" = type { %"struct.std::_Vector_base<std::function<bool (const maliput::api::rules::RangeValueRule &)>, std::allocator<std::function<bool (const maliput::api::rules::RangeValueRule &)>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::function<bool (const maliput::api::rules::RangeValueRule &)>, std::allocator<std::function<bool (const maliput::api::rules::RangeValueRule &)>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::function<bool (const maliput::api::rules::RangeValueRule &)>, std::allocator<std::function<bool (const maliput::api::rules::RangeValueRule &)>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::function<bool (const maliput::api::rules::RangeValueRule &)>, std::allocator<std::function<bool (const maliput::api::rules::RangeValueRule &)>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.maliput::ManualDiscreteValueRuleStateProvider" = type { %"class.maliput::api::rules::DiscreteValueRuleStateProvider", ptr, %"class.std::unordered_map" }
%"class.maliput::api::rules::DiscreteValueRuleStateProvider" = type { ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }

@.str.19 = external hidden unnamed_addr constant [111 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [16 x i8], align 1
@__func__._ZNK7maliput36ManualDiscreteValueRuleStateProvider29GetFilteredDiscreteValueRulesERKNS_3api12RoadPositionERKNS1_22TypeSpecificIdentifierINS1_5rules4Rule4TypeEEEd = external hidden unnamed_addr constant [30 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

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: noreturn
declare void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7maliput36ManualDiscreteValueRuleStateProvider29GetFilteredDiscreteValueRulesERKNS_3api12RoadPositionERKNS1_22TypeSpecificIdentifierINS1_5rules4Rule4TypeEEEd(ptr dead_on_unwind noalias writable sret(%"class.std::map.77") align 8 %0, ptr noundef nonnull align 8 dereferenceable(72) %1, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %3, double noundef %4) #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca double, align 8
  %11 = alloca %"struct.maliput::api::rules::RoadRulebook::QueryResults", align 8
  %12 = alloca %"class.std::function", align 8
  %13 = alloca %class.anon, align 8
  %14 = alloca %"class.std::function", align 8
  %15 = alloca %class.anon.111, align 8
  %16 = alloca %"struct.maliput::api::rules::RoadRulebook::QueryResults", align 8
  %17 = alloca %"class.std::vector.112", align 8
  %18 = alloca %"class.std::initializer_list.117", align 8
  %19 = alloca [2 x %"class.std::function"], align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca %"class.std::allocator.114", align 1
  %24 = alloca %"class.std::vector.118", align 8
  store ptr %0, ptr %6, align 8
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store double %4, ptr %10, align 8, !tbaa !9
  %25 = load ptr, ptr %7, align 8
  br label %26

26:                                               ; preds = %5
  %27 = load double, ptr %10, align 8, !tbaa !9
  %28 = fcmp oge double %27, 0.000000e+00
  br i1 %28, label %30, label %29

29:                                               ; preds = %26
  call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef @.str.30, ptr noundef @__func__._ZNK7maliput36ManualDiscreteValueRuleStateProvider29GetFilteredDiscreteValueRulesERKNS_3api12RoadPositionERKNS1_22TypeSpecificIdentifierINS1_5rules4Rule4TypeEEEd, ptr noundef @.str.19, i32 noundef 110) #7
  unreachable

30:                                               ; preds = %26
  br label %31

31:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 240, ptr %11) #8
  %32 = getelementptr inbounds %"class.maliput::ManualDiscreteValueRuleStateProvider", ptr %25, i32 0, i32 1
  %33 = load ptr, ptr %32, align 8, !tbaa !11
  call void @_ZNK7maliput3api5rules12RoadRulebook5RulesEv(ptr dead_on_unwind writable sret(%"struct.maliput::api::rules::RoadRulebook::QueryResults") align 8 %11, ptr noundef nonnull align 8 dereferenceable(8) %33)
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %34 = getelementptr inbounds %class.anon, ptr %13, i32 0, i32 0
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %35, ptr %34, align 8, !tbaa !5
  call void @"_ZNSt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEEC2IZNKS0_36ManualDiscreteValueRuleStateProvider29GetFilteredDiscreteValueRulesERKNS1_12RoadPositionERKNS1_22TypeSpecificIdentifierINS2_4Rule4TypeEEEdE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #8
  %36 = getelementptr inbounds %class.anon.111, ptr %15, i32 0, i32 0
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %37, ptr %36, align 8, !tbaa !5
  %38 = getelementptr inbounds %class.anon.111, ptr %15, i32 0, i32 1
  %39 = load double, ptr %10, align 8, !tbaa !9
  store double %39, ptr %38, align 8, !tbaa !20
  call void @"_ZNSt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEEC2IZNKS0_36ManualDiscreteValueRuleStateProvider29GetFilteredDiscreteValueRulesERKNS1_12RoadPositionERKNS1_22TypeSpecificIdentifierINS2_4Rule4TypeEEEdE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(16) %15) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 240, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr %19) #8
  store ptr %19, ptr %20, align 8
  invoke void @_ZNSt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEEC2ERKS7_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %40 unwind label %60

40:                                               ; preds = %31
  %41 = getelementptr inbounds %"class.std::function", ptr %19, i64 1
  store ptr %41, ptr %20, align 8
  invoke void @_ZNSt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEEC2ERKS7_(ptr noundef nonnull align 8 dereferenceable(32) %41, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %42 unwind label %60

42:                                               ; preds = %40
  %43 = getelementptr inbounds %"class.std::initializer_list.117", ptr %18, i32 0, i32 0
  store ptr %19, ptr %43, align 8, !tbaa !22
  %44 = getelementptr inbounds %"class.std::initializer_list.117", ptr %18, i32 0, i32 1
  store i64 2, ptr %44, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #8
  call void @_ZNSaISt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #8
  %45 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 0
  %46 = load ptr, ptr %45, align 8
  %47 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 1
  %48 = load i64, ptr %47, align 8
  invoke void @_ZNSt6vectorISt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEESaIS8_EEC2ESt16initializer_listIS8_ERKS9_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr %46, i64 %48, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %49 unwind label %71

49:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #8
  call void @llvm.memset.p0.i64(ptr align 8 %24, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt8functionIFbRKN7maliput3api5rules14RangeValueRuleEEESaIS8_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  invoke void @_ZN7maliput11FilterRulesERKNS_3api5rules12RoadRulebook12QueryResultsERKSt6vectorISt8functionIFbRKNS1_17DiscreteValueRuleEEESaISC_EERKS6_IS7_IFbRKNS1_14RangeValueRuleEEESaISL_EE(ptr dead_on_unwind writable sret(%"struct.maliput::api::rules::RoadRulebook::QueryResults") align 8 %16, ptr noundef nonnull align 8 dereferenceable(240) %11, ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %24)
          to label %50 unwind label %75

50:                                               ; preds = %49
  call void @_ZNSt6vectorISt8functionIFbRKN7maliput3api5rules14RangeValueRuleEEESaIS8_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #8
  call void @_ZNSt6vectorISt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEESaIS8_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  call void @_ZNSt15__new_allocatorISt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #8
  %51 = getelementptr inbounds [2 x %"class.std::function"], ptr %19, i32 0, i32 0
  %52 = getelementptr inbounds %"class.std::function", ptr %51, i64 2
  br label %53

53:                                               ; preds = %53, %50
  %54 = phi ptr [ %52, %50 ], [ %55, %53 ]
  %55 = getelementptr inbounds %"class.std::function", ptr %54, i64 -1
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %55) #8
  %56 = icmp eq ptr %55, %51
  br i1 %56, label %57, label %53

57:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #8
  %58 = getelementptr inbounds %"struct.maliput::api::rules::RoadRulebook::QueryResults", ptr %16, i32 0, i32 3
  invoke void @_ZNSt3mapIN7maliput3api22TypeSpecificIdentifierINS1_5rules4RuleEEENS3_17DiscreteValueRuleESt4lessIS5_ESaISt4pairIKS5_S6_EEEC2ERKSD_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %58)
          to label %59 unwind label %88

59:                                               ; preds = %57
  call void @_ZN7maliput3api5rules12RoadRulebook12QueryResultsD2Ev(ptr noundef nonnull align 8 dereferenceable(240) %16) #8
  call void @llvm.lifetime.end.p0(i64 240, ptr %16) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  call void @_ZN7maliput3api5rules12RoadRulebook12QueryResultsD2Ev(ptr noundef nonnull align 8 dereferenceable(240) %11) #8
  call void @llvm.lifetime.end.p0(i64 240, ptr %11) #8
  ret void

60:                                               ; preds = %40, %31
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %21, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %22, align 4
  %64 = load ptr, ptr %20, align 8
  %65 = icmp eq ptr %19, %64
  br i1 %65, label %70, label %66

66:                                               ; preds = %66, %60
  %67 = phi ptr [ %64, %60 ], [ %68, %66 ]
  %68 = getelementptr inbounds %"class.std::function", ptr %67, i64 -1
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %68) #8
  %69 = icmp eq ptr %68, %19
  br i1 %69, label %70, label %66

70:                                               ; preds = %66, %60
  br label %87

71:                                               ; preds = %42
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %21, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %22, align 4
  br label %79

75:                                               ; preds = %49
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %21, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %22, align 4
  call void @_ZNSt6vectorISt8functionIFbRKN7maliput3api5rules14RangeValueRuleEEESaIS8_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #8
  call void @_ZNSt6vectorISt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEESaIS8_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  br label %79

79:                                               ; preds = %75, %71
  call void @_ZNSt15__new_allocatorISt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #8
  %80 = getelementptr inbounds [2 x %"class.std::function"], ptr %19, i32 0, i32 0
  %81 = getelementptr inbounds %"class.std::function", ptr %80, i64 2
  br label %82

82:                                               ; preds = %82, %79
  %83 = phi ptr [ %81, %79 ], [ %84, %82 ]
  %84 = getelementptr inbounds %"class.std::function", ptr %83, i64 -1
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %84) #8
  %85 = icmp eq ptr %84, %80
  br i1 %85, label %86, label %82

86:                                               ; preds = %82
  br label %87

87:                                               ; preds = %86, %70
  call void @llvm.lifetime.end.p0(i64 64, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #8
  br label %92

88:                                               ; preds = %57
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %21, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %22, align 4
  call void @_ZN7maliput3api5rules12RoadRulebook12QueryResultsD2Ev(ptr noundef nonnull align 8 dereferenceable(240) %16) #8
  br label %92

92:                                               ; preds = %88, %87
  call void @llvm.lifetime.end.p0(i64 240, ptr %16) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  call void @_ZN7maliput3api5rules12RoadRulebook12QueryResultsD2Ev(ptr noundef nonnull align 8 dereferenceable(240) %11) #8
  call void @llvm.lifetime.end.p0(i64 240, ptr %11) #8
  br label %93

93:                                               ; preds = %92
  %94 = load ptr, ptr %21, align 8
  %95 = load i32, ptr %22, align 4
  %96 = insertvalue { ptr, i32 } poison, ptr %94, 0
  %97 = insertvalue { ptr, i32 } %96, i32 %95, 1
  resume { ptr, i32 } %97
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7maliput3api5rules12RoadRulebook5RulesEv(ptr dead_on_unwind noalias writable sret(%"struct.maliput::api::rules::RoadRulebook::QueryResults") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEEC2IZNKS0_36ManualDiscreteValueRuleStateProvider29GetFilteredDiscreteValueRulesERKNS1_12RoadPositionERKNS1_22TypeSpecificIdentifierINS2_4Rule4TypeEEEdE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEEC2IZNKS0_36ManualDiscreteValueRuleStateProvider29GetFilteredDiscreteValueRulesERKNS1_12RoadPositionERKNS1_22TypeSpecificIdentifierINS2_4Rule4TypeEEEdE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

declare void @_ZN7maliput11FilterRulesERKNS_3api5rules12RoadRulebook12QueryResultsERKSt6vectorISt8functionIFbRKNS1_17DiscreteValueRuleEEESaISC_EERKS6_IS7_IFbRKNS1_14RangeValueRuleEEESaISL_EE(ptr dead_on_unwind writable sret(%"struct.maliput::api::rules::RoadRulebook::QueryResults") align 8, ptr noundef nonnull align 8 dereferenceable(240), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #4

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7maliput3api5rules12RoadRulebook12QueryResultsD2Ev(ptr noundef nonnull align 8 dereferenceable(240)) unnamed_addr #6 align 2

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTSN7maliput36ManualDiscreteValueRuleStateProviderE", !13, i64 0, !6, i64 8, !14, i64 16}
!13 = !{!"_ZTSN7maliput3api5rules30DiscreteValueRuleStateProviderE"}
!14 = !{!"_ZTSSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS1_5rules4RuleEEENS3_19StateProviderResultINS3_17DiscreteValueRule13DiscreteValueEEESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S9_EEE", !15, i64 0}
!15 = !{!"_ZTSSt10_HashtableIN7maliput3api22TypeSpecificIdentifierINS1_5rules4RuleEEESt4pairIKS5_NS3_19StateProviderResultINS3_17DiscreteValueRule13DiscreteValueEEEESaISC_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSE_18_Mod_range_hashingENSE_20_Default_ranged_hashENSE_20_Prime_rehash_policyENSE_17_Hashtable_traitsILb0ELb0ELb1EEEE", !6, i64 0, !16, i64 8, !17, i64 16, !16, i64 24, !18, i64 32, !6, i64 48}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!18 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !19, i64 0, !16, i64 8}
!19 = !{!"float", !7, i64 0}
!20 = !{!21, !10, i64 8}
!21 = !{!"_ZTSZNK7maliput36ManualDiscreteValueRuleStateProvider29GetFilteredDiscreteValueRulesERKNS_3api12RoadPositionERKNS1_22TypeSpecificIdentifierINS1_5rules4Rule4TypeEEEdE3$_1", !6, i64 0, !10, i64 8}
!22 = !{!23, !6, i64 0}
!23 = !{!"_ZTSSt16initializer_listISt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEEE", !6, i64 0, !16, i64 8}
!24 = !{!23, !16, 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.std::map.77" = type { %"class.std::_Rb_tree.78" }
%"class.std::_Rb_tree.78" = type { %"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, maliput::api::rules::DiscreteValueRule>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, maliput::api::rules::DiscreteValueRule>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, maliput::api::rules::DiscreteValueRule>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, maliput::api::rules::DiscreteValueRule>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>>>::_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 }
%"struct.maliput::api::rules::RoadRulebook::QueryResults" = type { %"class.std::map.88", %"class.std::map.94", %"class.std::map.100", %"class.std::map.77", %"class.std::map.106" }
%"class.std::map.88" = type { %"class.std::_Rb_tree.89" }
%"class.std::_Rb_tree.89" = type { %"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule>, maliput::api::rules::RightOfWayRule>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule>, maliput::api::rules::RightOfWayRule>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule>, maliput::api::rules::RightOfWayRule>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule>, maliput::api::rules::RightOfWayRule>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::RightOfWayRule>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.94" = type { %"class.std::_Rb_tree.95" }
%"class.std::_Rb_tree.95" = type { %"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::SpeedLimitRule>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::SpeedLimitRule>, maliput::api::rules::SpeedLimitRule>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::SpeedLimitRule>, maliput::api::rules::SpeedLimitRule>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::SpeedLimitRule>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::SpeedLimitRule>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::SpeedLimitRule>, maliput::api::rules::SpeedLimitRule>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::SpeedLimitRule>, maliput::api::rules::SpeedLimitRule>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::SpeedLimitRule>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.100" = type { %"class.std::_Rb_tree.101" }
%"class.std::_Rb_tree.101" = type { %"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::DirectionUsageRule>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::DirectionUsageRule>, maliput::api::rules::DirectionUsageRule>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::DirectionUsageRule>, maliput::api::rules::DirectionUsageRule>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::DirectionUsageRule>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::DirectionUsageRule>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::DirectionUsageRule>, maliput::api::rules::DirectionUsageRule>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::DirectionUsageRule>, maliput::api::rules::DirectionUsageRule>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::DirectionUsageRule>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.106" = type { %"class.std::_Rb_tree.107" }
%"class.std::_Rb_tree.107" = type { %"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, maliput::api::rules::RangeValueRule>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, maliput::api::rules::RangeValueRule>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, maliput::api::rules::RangeValueRule>, std::_Select1st<std::pair<const maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>, maliput::api::rules::RangeValueRule>>, std::less<maliput::api::TypeSpecificIdentifier<maliput::api::rules::Rule>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon = type { ptr }
%class.anon.111 = type { ptr, double }
%"class.std::vector.112" = type { %"struct.std::_Vector_base.113" }
%"struct.std::_Vector_base.113" = type { %"struct.std::_Vector_base<std::function<bool (const maliput::api::rules::DiscreteValueRule &)>, std::allocator<std::function<bool (const maliput::api::rules::DiscreteValueRule &)>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::function<bool (const maliput::api::rules::DiscreteValueRule &)>, std::allocator<std::function<bool (const maliput::api::rules::DiscreteValueRule &)>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::function<bool (const maliput::api::rules::DiscreteValueRule &)>, std::allocator<std::function<bool (const maliput::api::rules::DiscreteValueRule &)>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::function<bool (const maliput::api::rules::DiscreteValueRule &)>, std::allocator<std::function<bool (const maliput::api::rules::DiscreteValueRule &)>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.114" = type { i8 }
%"class.std::vector.118" = type { %"struct.std::_Vector_base.119" }
%"struct.std::_Vector_base.119" = type { %"struct.std::_Vector_base<std::function<bool (const maliput::api::rules::RangeValueRule &)>, std::allocator<std::function<bool (const maliput::api::rules::RangeValueRule &)>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::function<bool (const maliput::api::rules::RangeValueRule &)>, std::allocator<std::function<bool (const maliput::api::rules::RangeValueRule &)>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::function<bool (const maliput::api::rules::RangeValueRule &)>, std::allocator<std::function<bool (const maliput::api::rules::RangeValueRule &)>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::function<bool (const maliput::api::rules::RangeValueRule &)>, std::allocator<std::function<bool (const maliput::api::rules::RangeValueRule &)>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.19 = external hidden unnamed_addr constant [111 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [16 x i8], align 1
@__func__._ZNK7maliput36ManualDiscreteValueRuleStateProvider29GetFilteredDiscreteValueRulesERKNS_3api12RoadPositionERKNS1_22TypeSpecificIdentifierINS1_5rules4Rule4TypeEEEd = external hidden unnamed_addr constant [30 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

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: noreturn
declare void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7maliput36ManualDiscreteValueRuleStateProvider29GetFilteredDiscreteValueRulesERKNS_3api12RoadPositionERKNS1_22TypeSpecificIdentifierINS1_5rules4Rule4TypeEEEd(ptr dead_on_unwind noalias writable sret(%"class.std::map.77") align 8 %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(72) %1, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %3, double noundef %4) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"struct.maliput::api::rules::RoadRulebook::QueryResults", align 8
  %7 = alloca %"class.std::function", align 8
  %8 = alloca %class.anon, align 8
  %9 = alloca %"class.std::function", align 8
  %10 = alloca %class.anon.111, align 8
  %11 = alloca %"struct.maliput::api::rules::RoadRulebook::QueryResults", align 8
  %12 = alloca %"class.std::vector.112", align 8
  %13 = alloca [2 x %"class.std::function"], align 8
  %14 = alloca %"class.std::allocator.114", align 1
  %15 = alloca %"class.std::vector.118", align 8
  %16 = fcmp ult double %4, 0.000000e+00
  br i1 %16, label %17, label %18

17:                                               ; preds = %5
  tail call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef nonnull @.str.30, ptr noundef nonnull @__func__._ZNK7maliput36ManualDiscreteValueRuleStateProvider29GetFilteredDiscreteValueRulesERKNS_3api12RoadPositionERKNS1_22TypeSpecificIdentifierINS1_5rules4Rule4TypeEEEd, ptr noundef nonnull @.str.19, i32 noundef 110) #7
  unreachable

18:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 240, ptr nonnull %6) #8
  %19 = getelementptr inbounds i8, ptr %1, i64 8
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZNK7maliput3api5rules12RoadRulebook5RulesEv(ptr dead_on_unwind nonnull writable sret(%"struct.maliput::api::rules::RoadRulebook::QueryResults") align 8 %6, ptr noundef nonnull align 8 dereferenceable(8) %20)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  store ptr %3, ptr %8, align 8, !tbaa !17
  call void @"_ZNSt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEEC2IZNKS0_36ManualDiscreteValueRuleStateProvider29GetFilteredDiscreteValueRulesERKNS1_12RoadPositionERKNS1_22TypeSpecificIdentifierINS2_4Rule4TypeEEEdE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #8
  store ptr %2, ptr %10, align 8, !tbaa !17
  %21 = getelementptr inbounds i8, ptr %10, i64 8
  store double %4, ptr %21, align 8, !tbaa !18
  call void @"_ZNSt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEEC2IZNKS0_36ManualDiscreteValueRuleStateProvider29GetFilteredDiscreteValueRulesERKNS1_12RoadPositionERKNS1_22TypeSpecificIdentifierINS2_4Rule4TypeEEEdE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(16) %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 240, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %13) #8
  invoke void @_ZNSt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEEC2ERKS7_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %23 unwind label %.thread

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

23:                                               ; preds = %18
  %24 = getelementptr inbounds i8, ptr %13, i64 32
  invoke void @_ZNSt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEEC2ERKS7_(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %25 unwind label %.loopexit.loopexit19

25:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #8
  call void @_ZNSaISt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  invoke void @_ZNSt6vectorISt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEESaIS8_EEC2ESt16initializer_listIS8_ERKS9_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr nonnull %13, i64 2, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %26 unwind label %32

26:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %15, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt8functionIFbRKN7maliput3api5rules14RangeValueRuleEEESaIS8_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  invoke void @_ZN7maliput11FilterRulesERKNS_3api5rules12RoadRulebook12QueryResultsERKSt6vectorISt8functionIFbRKNS1_17DiscreteValueRuleEEESaISC_EERKS6_IS7_IFbRKNS1_14RangeValueRuleEEESaISL_EE(ptr dead_on_unwind nonnull writable sret(%"struct.maliput::api::rules::RoadRulebook::QueryResults") align 8 %11, ptr noundef nonnull align 8 dereferenceable(240) %6, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %27 unwind label %34

27:                                               ; preds = %26
  call void @_ZNSt6vectorISt8functionIFbRKN7maliput3api5rules14RangeValueRuleEEESaIS8_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #8
  call void @_ZNSt6vectorISt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEESaIS8_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  call void @_ZNSt15__new_allocatorISt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #8
  %28 = getelementptr inbounds i8, ptr %13, i64 32
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  %29 = getelementptr inbounds i8, ptr %11, i64 144
  invoke void @_ZNSt3mapIN7maliput3api22TypeSpecificIdentifierINS1_5rules4RuleEEENS3_17DiscreteValueRuleESt4lessIS5_ESaISt4pairIKS5_S6_EEEC2ERKSD_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %29)
          to label %30 unwind label %37

30:                                               ; preds = %27
  call void @_ZN7maliput3api5rules12RoadRulebook12QueryResultsD2Ev(ptr noundef nonnull align 8 dereferenceable(240) %11) #8
  call void @llvm.lifetime.end.p0(i64 240, ptr nonnull %11) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #8
  call void @_ZN7maliput3api5rules12RoadRulebook12QueryResultsD2Ev(ptr noundef nonnull align 8 dereferenceable(240) %6) #8
  call void @llvm.lifetime.end.p0(i64 240, ptr nonnull %6) #8
  ret void

.loopexit.loopexit19:                             ; preds = %23
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  br label %.loopexit

32:                                               ; preds = %25
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.loopexit

34:                                               ; preds = %26
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorISt8functionIFbRKN7maliput3api5rules14RangeValueRuleEEESaIS8_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #8
  call void @_ZNSt6vectorISt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEESaIS8_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  br label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %34, %32
  %.pn = phi { ptr, i32 } [ %35, %34 ], [ %33, %32 ]
  call void @_ZNSt15__new_allocatorISt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #8
  %36 = getelementptr inbounds i8, ptr %13, i64 32
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit19, %.loopexit.loopexit, %.thread
  %.pn.pn = phi { ptr, i32 } [ %22, %.thread ], [ %.pn, %.loopexit.loopexit ], [ %31, %.loopexit.loopexit19 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  br label %39

37:                                               ; preds = %27
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7maliput3api5rules12RoadRulebook12QueryResultsD2Ev(ptr noundef nonnull align 8 dereferenceable(240) %11) #8
  br label %39

39:                                               ; preds = %37, %.loopexit
  %.pn15 = phi { ptr, i32 } [ %38, %37 ], [ %.pn.pn, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 240, ptr nonnull %11) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #8
  call void @_ZN7maliput3api5rules12RoadRulebook12QueryResultsD2Ev(ptr noundef nonnull align 8 dereferenceable(240) %6) #8
  call void @llvm.lifetime.end.p0(i64 240, ptr nonnull %6) #8
  resume { ptr, i32 } %.pn15
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7maliput3api5rules12RoadRulebook5RulesEv(ptr dead_on_unwind noalias writable sret(%"struct.maliput::api::rules::RoadRulebook::QueryResults") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEEC2IZNKS0_36ManualDiscreteValueRuleStateProvider29GetFilteredDiscreteValueRulesERKNS1_12RoadPositionERKNS1_22TypeSpecificIdentifierINS2_4Rule4TypeEEEdE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFbRKN7maliput3api5rules17DiscreteValueRuleEEEC2IZNKS0_36ManualDiscreteValueRuleStateProvider29GetFilteredDiscreteValueRulesERKNS1_12RoadPositionERKNS1_22TypeSpecificIdentifierINS2_4Rule4TypeEEEdE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

declare void @_ZN7maliput11FilterRulesERKNS_3api5rules12RoadRulebook12QueryResultsERKSt6vectorISt8functionIFbRKNS1_17DiscreteValueRuleEEESaISC_EERKS6_IS7_IFbRKNS1_14RangeValueRuleEEESaISL_EE(ptr dead_on_unwind writable sret(%"struct.maliput::api::rules::RoadRulebook::QueryResults") align 8, ptr noundef nonnull align 8 dereferenceable(240), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4

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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7maliput3api5rules12RoadRulebook12QueryResultsD2Ev(ptr noundef nonnull align 8 dereferenceable(240)) unnamed_addr #6 align 2

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !8, i64 8}
!6 = !{!"_ZTSN7maliput36ManualDiscreteValueRuleStateProviderE", !7, i64 0, !8, i64 8, !11, i64 16}
!7 = !{!"_ZTSN7maliput3api5rules30DiscreteValueRuleStateProviderE"}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSSt13unordered_mapIN7maliput3api22TypeSpecificIdentifierINS1_5rules4RuleEEENS3_19StateProviderResultINS3_17DiscreteValueRule13DiscreteValueEEESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S9_EEE", !12, i64 0}
!12 = !{!"_ZTSSt10_HashtableIN7maliput3api22TypeSpecificIdentifierINS1_5rules4RuleEEESt4pairIKS5_NS3_19StateProviderResultINS3_17DiscreteValueRule13DiscreteValueEEEESaISC_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSE_18_Mod_range_hashingENSE_20_Default_ranged_hashENSE_20_Prime_rehash_policyENSE_17_Hashtable_traitsILb0ELb0ELb1EEEE", !8, i64 0, !13, i64 8, !14, i64 16, !13, i64 24, !15, i64 32, !8, i64 48}
!13 = !{!"long", !9, i64 0}
!14 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !8, i64 0}
!15 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !16, i64 0, !13, i64 8}
!16 = !{!"float", !9, i64 0}
!17 = !{!8, !8, i64 0}
!18 = !{!19, !20, i64 8}
!19 = !{!"_ZTSZNK7maliput36ManualDiscreteValueRuleStateProvider29GetFilteredDiscreteValueRulesERKNS_3api12RoadPositionERKNS1_22TypeSpecificIdentifierINS1_5rules4Rule4TypeEEEdE3$_1", !8, i64 0, !20, i64 8}
!20 = !{!"double", !9, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass