; LLVM IR from maliput/maliput :: src/maliput/geometry_base (brute_force_strategy)

; 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"

%"struct.maliput::api::RoadPositionResult" = type { %"struct.maliput::api::RoadPosition", %"class.maliput::api::InertialPosition", double }
%"struct.maliput::api::RoadPosition" = type { ptr, %"class.maliput::api::LanePosition" }
%"class.maliput::api::LanePosition" = type { %"class.maliput::math::Vector3" }
%"class.maliput::math::Vector3" = type { %"class.maliput::math::VectorBase" }
%"class.maliput::math::VectorBase" = type { %"struct.std::array" }
%"struct.std::array" = type { [3 x double] }
%"class.maliput::api::InertialPosition" = type { %"class.maliput::math::Vector3" }
%"struct.maliput::api::LanePositionResult" = type { %"class.maliput::api::LanePosition", %"class.maliput::api::InertialPosition", double }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<maliput::api::RoadPositionResult, std::allocator<maliput::api::RoadPositionResult>>::_Vector_impl" }
%"struct.std::_Vector_base<maliput::api::RoadPositionResult, std::allocator<maliput::api::RoadPositionResult>>::_Vector_impl" = type { %"struct.std::_Vector_base<maliput::api::RoadPositionResult, std::allocator<maliput::api::RoadPositionResult>>::_Vector_impl_data" }
%"struct.std::_Vector_base<maliput::api::RoadPositionResult, std::allocator<maliput::api::RoadPositionResult>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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 { double }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [22 x i8], align 1
@__func__._ZNK7maliput13geometry_base18BruteForceStrategy16DoToRoadPositionERKNS_3api16InertialPositionERKSt8optionalINS2_12RoadPositionEE = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [99 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7maliput13geometry_base18BruteForceStrategy16DoToRoadPositionERKNS_3api16InertialPositionERKSt8optionalINS2_12RoadPositionEE(ptr dead_on_unwind noalias writable sret(%"struct.maliput::api::RoadPositionResult") align 8 %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(40) %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"struct.maliput::api::LanePositionResult", align 8
  %9 = alloca %"struct.maliput::api::RoadPositionResult", align 8
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::vector", align 8
  %14 = alloca %"class.std::function", align 8
  %15 = alloca %class.anon, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca ptr, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  store ptr %3, ptr %7, align 8, !tbaa !5
  %21 = load ptr, ptr %5, align 8
  call void @_ZN7maliput3api18RoadPositionResultC2Ev(ptr noundef nonnull align 8 dereferenceable(64) %0)
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = call noundef zeroext i1 @_ZNKSt8optionalIN7maliput3api12RoadPositionEE9has_valueEv(ptr noundef nonnull align 8 dereferenceable(40) %22) #8
  br i1 %23, label %24, label %51

24:                                               ; preds = %4
  br label %25

25:                                               ; preds = %24
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = call noundef ptr @_ZNKSt8optionalIN7maliput3api12RoadPositionEEptEv(ptr noundef nonnull align 8 dereferenceable(40) %26) #8
  %28 = getelementptr inbounds %"struct.maliput::api::RoadPosition", ptr %27, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = icmp ne ptr %29, null
  br i1 %30, label %32, label %31

31:                                               ; preds = %25
  call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef @.str, ptr noundef @__func__._ZNK7maliput13geometry_base18BruteForceStrategy16DoToRoadPositionERKNS_3api16InertialPositionERKSt8optionalINS2_12RoadPositionEE, ptr noundef @.str.1, i32 noundef 49) #9
  unreachable

32:                                               ; preds = %25
  br label %33

33:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 56, ptr %8) #8
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = call noundef ptr @_ZNKSt8optionalIN7maliput3api12RoadPositionEEptEv(ptr noundef nonnull align 8 dereferenceable(40) %34) #8
  %36 = getelementptr inbounds %"struct.maliput::api::RoadPosition", ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZNK7maliput3api4Lane14ToLanePositionERKNS0_16InertialPositionE(ptr dead_on_unwind writable sret(%"struct.maliput::api::LanePositionResult") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(24) %38)
  call void @llvm.lifetime.start.p0(i64 64, ptr %9) #8
  %39 = getelementptr inbounds %"struct.maliput::api::RoadPositionResult", ptr %9, i32 0, i32 0
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = call noundef ptr @_ZNKSt8optionalIN7maliput3api12RoadPositionEEptEv(ptr noundef nonnull align 8 dereferenceable(40) %40) #8
  %42 = getelementptr inbounds %"struct.maliput::api::RoadPosition", ptr %41, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8, !tbaa !9
  %44 = getelementptr inbounds %"struct.maliput::api::LanePositionResult", ptr %8, i32 0, i32 0
  call void @_ZN7maliput3api12RoadPositionC2EPKNS0_4LaneERKNS0_12LanePositionE(ptr noundef nonnull align 8 dereferenceable(32) %39, ptr noundef %43, ptr noundef nonnull align 8 dereferenceable(24) %44)
  %45 = getelementptr inbounds %"struct.maliput::api::RoadPositionResult", ptr %9, i32 0, i32 1
  %46 = getelementptr inbounds %"struct.maliput::api::LanePositionResult", ptr %8, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %45, ptr align 8 %46, i64 24, i1 false)
  %47 = getelementptr inbounds %"struct.maliput::api::RoadPositionResult", ptr %9, i32 0, i32 2
  %48 = getelementptr inbounds %"struct.maliput::api::LanePositionResult", ptr %8, i32 0, i32 2
  %49 = load double, ptr %48, align 8, !tbaa !15
  store double %49, ptr %47, align 8, !tbaa !19
  %50 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZN7maliput3api18RoadPositionResultaSEOS1_(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(64) %9)
  call void @llvm.lifetime.end.p0(i64 64, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %8) #8
  br label %124

51:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #8
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = call noundef double @_ZNSt14numeric_limitsIdE8infinityEv() #8
  call void @_ZNK7maliput13geometry_base18BruteForceStrategy19DoFindRoadPositionsERKNS_3api16InertialPositionEd(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %10, ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(24) %52, double noundef %53)
  br label %54

54:                                               ; preds = %51
  %55 = call noundef i64 @_ZNKSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  %56 = icmp ne i64 %55, 0
  br i1 %56, label %63, label %57

57:                                               ; preds = %54
  invoke void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef @.str.2, ptr noundef @__func__._ZNK7maliput13geometry_base18BruteForceStrategy16DoToRoadPositionERKNS_3api16InertialPositionERKSt8optionalINS2_12RoadPositionEE, ptr noundef @.str.1, i32 noundef 56) #9
          to label %58 unwind label %59

58:                                               ; preds = %57
  unreachable

59:                                               ; preds = %57
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %11, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %12, align 4
  br label %123

63:                                               ; preds = %54
  br label %64

64:                                               ; preds = %63
  br label %65

65:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %66 = getelementptr inbounds %class.anon, ptr %15, i32 0, i32 0
  %67 = invoke noundef ptr @_ZNK7maliput13geometry_base12StrategyBase17get_road_geometryEv(ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %68 unwind label %91

68:                                               ; preds = %65
  %69 = invoke noundef double @_ZNK7maliput3api12RoadGeometry16linear_toleranceEv(ptr noundef nonnull align 8 dereferenceable(8) %67)
          to label %70 unwind label %91

70:                                               ; preds = %68
  store double %69, ptr %66, align 8, !tbaa !21
  call void @"_ZNSt8functionIFbRKN7maliput3api18RoadPositionResultEEEC2IZNKS0_13geometry_base18BruteForceStrategy16DoToRoadPositionERKNS1_16InertialPositionERKSt8optionalINS1_12RoadPositionEEE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  invoke void @_ZN7maliput13geometry_base25FilterRoadPositionResultsERKSt6vectorINS_3api18RoadPositionResultESaIS3_EERKSt8functionIFbRKS3_EE(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %71 unwind label %95

71:                                               ; preds = %70
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %72 = call noundef zeroext i1 @_ZNKSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  br i1 %72, label %73, label %74

73:                                               ; preds = %71
  br label %75

74:                                               ; preds = %71
  br label %75

75:                                               ; preds = %74, %73
  %76 = phi ptr [ %10, %73 ], [ %13, %74 ]
  store ptr %76, ptr %16, align 8, !tbaa !5
  %77 = load ptr, ptr %16, align 8, !tbaa !5
  %78 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNKSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %77, i64 noundef 0) #8
  %79 = invoke noundef nonnull align 8 dereferenceable(64) ptr @_ZN7maliput3api18RoadPositionResultaSERKS1_(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(64) %78)
          to label %80 unwind label %100

80:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %81 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %81, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %82 = load ptr, ptr %17, align 8, !tbaa !5
  %83 = call ptr @_ZNKSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %82) #8
  %84 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %83, ptr %84, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %85 = load ptr, ptr %17, align 8, !tbaa !5
  %86 = call ptr @_ZNKSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %85) #8
  %87 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %86, ptr %87, align 8
  br label %88

88:                                               ; preds = %118, %80
  %89 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7maliput3api18RoadPositionResultESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  br i1 %89, label %104, label %90

90:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %120

91:                                               ; preds = %68, %65
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %11, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %12, align 4
  br label %99

95:                                               ; preds = %70
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %11, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %12, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #8
  br label %99

99:                                               ; preds = %95, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #8
  br label %122

100:                                              ; preds = %75
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %11, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %12, align 4
  br label %121

104:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %105 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN7maliput3api18RoadPositionResultESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  store ptr %105, ptr %20, align 8, !tbaa !5
  %106 = load ptr, ptr %20, align 8, !tbaa !5
  %107 = invoke noundef zeroext i1 @_ZN7maliput13geometry_base29IsNewRoadPositionResultCloserERKNS_3api18RoadPositionResultES4_(ptr noundef nonnull align 8 dereferenceable(64) %106, ptr noundef nonnull align 8 dereferenceable(64) %0)
          to label %108 unwind label %113

108:                                              ; preds = %104
  br i1 %107, label %109, label %117

109:                                              ; preds = %108
  %110 = load ptr, ptr %20, align 8, !tbaa !5
  %111 = invoke noundef nonnull align 8 dereferenceable(64) ptr @_ZN7maliput3api18RoadPositionResultaSERKS1_(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(64) %110)
          to label %112 unwind label %113

112:                                              ; preds = %109
  br label %117

113:                                              ; preds = %109, %104
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %11, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %121

117:                                              ; preds = %112, %108
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %118

118:                                              ; preds = %117
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN7maliput3api18RoadPositionResultESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  br label %88

120:                                              ; preds = %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @_ZNSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #8
  call void @_ZNSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #8
  br label %124

121:                                              ; preds = %113, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @_ZNSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  br label %122

122:                                              ; preds = %121, %99
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #8
  br label %123

123:                                              ; preds = %122, %59
  call void @_ZNSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #8
  br label %125

124:                                              ; preds = %120, %33
  ret void

125:                                              ; preds = %123
  %126 = load ptr, ptr %11, align 8
  %127 = load i32, ptr %12, align 4
  %128 = insertvalue { ptr, i32 } poison, ptr %126, 0
  %129 = insertvalue { ptr, i32 } %128, i32 %127, 1
  resume { ptr, i32 } %129
}

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

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

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

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

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

declare void @_ZNK7maliput3api4Lane14ToLanePositionERKNS0_16InertialPositionE(ptr dead_on_unwind writable sret(%"struct.maliput::api::LanePositionResult") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24)) #5

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZN7maliput3api18RoadPositionResultaSEOS1_(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(64)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7maliput13geometry_base18BruteForceStrategy19DoFindRoadPositionsERKNS_3api16InertialPositionEd(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), double noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNSt14numeric_limitsIdE8infinityEv() #2 align 2

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

declare i32 @__gxx_personality_v0(...)

declare void @_ZN7maliput13geometry_base25FilterRoadPositionResultsERKSt6vectorINS_3api18RoadPositionResultESaIS3_EERKSt8functionIFbRKS3_EE(ptr dead_on_unwind writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) #5

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK7maliput3api12RoadGeometry16linear_toleranceEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZNKSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZN7maliput3api18RoadPositionResultaSERKS1_(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(64)) #1 align 2

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

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

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

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

declare noundef zeroext i1 @_ZN7maliput13geometry_base29IsNewRoadPositionResultCloserERKNS_3api18RoadPositionResultES4_(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(64)) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 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 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { "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 = { 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 #8 = { nounwind }
attributes #9 = { 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, !6, i64 0}
!10 = !{!"_ZTSN7maliput3api12RoadPositionE", !6, i64 0, !11, i64 8}
!11 = !{!"_ZTSN7maliput3api12LanePositionE", !12, i64 0}
!12 = !{!"_ZTSN7maliput4math7Vector3E", !13, i64 0}
!13 = !{!"_ZTSN7maliput4math10VectorBaseILm3ENS0_7Vector3EEE", !14, i64 0}
!14 = !{!"_ZTSSt5arrayIdLm3EE", !7, i64 0}
!15 = !{!16, !18, i64 48}
!16 = !{!"_ZTSN7maliput3api18LanePositionResultE", !11, i64 0, !17, i64 24, !18, i64 48}
!17 = !{!"_ZTSN7maliput3api16InertialPositionE", !12, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = !{!20, !18, i64 56}
!20 = !{!"_ZTSN7maliput3api18RoadPositionResultE", !10, i64 0, !17, i64 32, !18, i64 56}
!21 = !{!22, !18, i64 0}
!22 = !{!"_ZTSZNK7maliput13geometry_base18BruteForceStrategy16DoToRoadPositionERKNS_3api16InertialPositionERKSt8optionalINS2_12RoadPositionEEE3$_0", !18, i64 0}


; 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"

%"struct.maliput::api::RoadPositionResult" = type { %"struct.maliput::api::RoadPosition", %"class.maliput::api::InertialPosition", double }
%"struct.maliput::api::RoadPosition" = type { ptr, %"class.maliput::api::LanePosition" }
%"class.maliput::api::LanePosition" = type { %"class.maliput::math::Vector3" }
%"class.maliput::math::Vector3" = type { %"class.maliput::math::VectorBase" }
%"class.maliput::math::VectorBase" = type { %"struct.std::array" }
%"struct.std::array" = type { [3 x double] }
%"class.maliput::api::InertialPosition" = type { %"class.maliput::math::Vector3" }
%"struct.maliput::api::LanePositionResult" = type { %"class.maliput::api::LanePosition", %"class.maliput::api::InertialPosition", double }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<maliput::api::RoadPositionResult, std::allocator<maliput::api::RoadPositionResult>>::_Vector_impl" }
%"struct.std::_Vector_base<maliput::api::RoadPositionResult, std::allocator<maliput::api::RoadPositionResult>>::_Vector_impl" = type { %"struct.std::_Vector_base<maliput::api::RoadPositionResult, std::allocator<maliput::api::RoadPositionResult>>::_Vector_impl_data" }
%"struct.std::_Vector_base<maliput::api::RoadPositionResult, std::allocator<maliput::api::RoadPositionResult>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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 { double }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [22 x i8], align 1
@__func__._ZNK7maliput13geometry_base18BruteForceStrategy16DoToRoadPositionERKNS_3api16InertialPositionERKSt8optionalINS2_12RoadPositionEE = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [99 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7maliput13geometry_base18BruteForceStrategy16DoToRoadPositionERKNS_3api16InertialPositionERKSt8optionalINS2_12RoadPositionEE(ptr dead_on_unwind noalias nonnull writable sret(%"struct.maliput::api::RoadPositionResult") align 8 %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(40) %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.maliput::api::LanePositionResult", align 8
  %6 = alloca %"struct.maliput::api::RoadPositionResult", align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca %"class.std::function", align 8
  %10 = alloca %class.anon, align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  tail call void @_ZN7maliput3api18RoadPositionResultC2Ev(ptr noundef nonnull align 8 dereferenceable(64) %0)
  %13 = tail call noundef zeroext i1 @_ZNKSt8optionalIN7maliput3api12RoadPositionEE9has_valueEv(ptr noundef nonnull align 8 dereferenceable(40) %3) #8
  br i1 %13, label %14, label %29

14:                                               ; preds = %4
  %15 = tail call noundef ptr @_ZNKSt8optionalIN7maliput3api12RoadPositionEEptEv(ptr noundef nonnull align 8 dereferenceable(40) %3) #8
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  %.not23 = icmp eq ptr %16, null
  br i1 %.not23, label %17, label %18

17:                                               ; preds = %14
  tail call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZNK7maliput13geometry_base18BruteForceStrategy16DoToRoadPositionERKNS_3api16InertialPositionERKSt8optionalINS2_12RoadPositionEE, ptr noundef nonnull @.str.1, i32 noundef 49) #9
  unreachable

18:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %5) #8
  %19 = tail call noundef ptr @_ZNKSt8optionalIN7maliput3api12RoadPositionEEptEv(ptr noundef nonnull align 8 dereferenceable(40) %3) #8
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  call void @_ZNK7maliput3api4Lane14ToLanePositionERKNS0_16InertialPositionE(ptr dead_on_unwind nonnull writable sret(%"struct.maliput::api::LanePositionResult") align 8 %5, ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(24) %2)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #8
  %21 = call noundef ptr @_ZNKSt8optionalIN7maliput3api12RoadPositionEEptEv(ptr noundef nonnull align 8 dereferenceable(40) %3) #8
  %22 = load ptr, ptr %21, align 8, !tbaa !5
  call void @_ZN7maliput3api12RoadPositionC2EPKNS0_4LaneERKNS0_12LanePositionE(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef %22, ptr noundef nonnull align 8 dereferenceable(24) %5)
  %23 = getelementptr inbounds i8, ptr %6, i64 32
  %24 = getelementptr inbounds i8, ptr %5, i64 24
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %24, i64 24, i1 false)
  %25 = getelementptr inbounds i8, ptr %6, i64 56
  %26 = getelementptr inbounds i8, ptr %5, i64 48
  %27 = load double, ptr %26, align 8, !tbaa !14
  store double %27, ptr %25, align 8, !tbaa !18
  %28 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZN7maliput3api18RoadPositionResultaSEOS1_(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(64) %6)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #8
  br label %68

29:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #8
  %30 = tail call noundef double @_ZNSt14numeric_limitsIdE8infinityEv() #8
  call void @_ZNK7maliput13geometry_base18BruteForceStrategy19DoFindRoadPositionsERKNS_3api16InertialPositionEd(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, double noundef %30)
  %31 = call noundef i64 @_ZNKSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  %.not = icmp eq i64 %31, 0
  br i1 %.not, label %32, label %36

32:                                               ; preds = %29
  invoke void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZNK7maliput13geometry_base18BruteForceStrategy16DoToRoadPositionERKNS_3api16InertialPositionERKSt8optionalINS2_12RoadPositionEE, ptr noundef nonnull @.str.1, i32 noundef 56) #9
          to label %33 unwind label %34

33:                                               ; preds = %32
  unreachable

34:                                               ; preds = %32
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %67

36:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %37 = call noundef ptr @_ZNK7maliput13geometry_base12StrategyBase17get_road_geometryEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %38 = invoke noundef double @_ZNK7maliput3api12RoadGeometry16linear_toleranceEv(ptr noundef nonnull align 8 dereferenceable(8) %37)
          to label %39 unwind label %48

39:                                               ; preds = %36
  store double %38, ptr %10, align 8, !tbaa !20
  call void @"_ZNSt8functionIFbRKN7maliput3api18RoadPositionResultEEEC2IZNKS0_13geometry_base18BruteForceStrategy16DoToRoadPositionERKNS1_16InertialPositionERKSt8optionalINS1_12RoadPositionEEE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  invoke void @_ZN7maliput13geometry_base25FilterRoadPositionResultsERKSt6vectorINS_3api18RoadPositionResultESaIS3_EERKSt8functionIFbRKS3_EE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %40 unwind label %50

40:                                               ; preds = %39
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  %41 = call noundef zeroext i1 @_ZNKSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  %. = select i1 %41, ptr %7, ptr %8
  %42 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNKSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %., i64 noundef 0) #8
  %43 = invoke noundef nonnull align 8 dereferenceable(64) ptr @_ZN7maliput3api18RoadPositionResultaSERKS1_(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(64) %42)
          to label %44 unwind label %53

44:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  %45 = call ptr @_ZNKSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %.) #8
  store ptr %45, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %46 = call ptr @_ZNKSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %.) #8
  store ptr %46, ptr %12, align 8
  %47 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7maliput3api18RoadPositionResultESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  br i1 %47, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %62, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @_ZNSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #8
  call void @_ZNSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  br label %68

48:                                               ; preds = %36
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %52

50:                                               ; preds = %39
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  br label %52

52:                                               ; preds = %50, %48
  %.pn = phi { ptr, i32 } [ %51, %50 ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  br label %66

53:                                               ; preds = %40
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %65

.lr.ph:                                           ; preds = %44, %62
  %55 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN7maliput3api18RoadPositionResultESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %56 = invoke noundef zeroext i1 @_ZN7maliput13geometry_base29IsNewRoadPositionResultCloserERKNS_3api18RoadPositionResultES4_(ptr noundef nonnull align 8 dereferenceable(64) %55, ptr noundef nonnull align 8 dereferenceable(64) %0)
          to label %57 unwind label %60

57:                                               ; preds = %.lr.ph
  br i1 %56, label %58, label %62

58:                                               ; preds = %57
  %59 = invoke noundef nonnull align 8 dereferenceable(64) ptr @_ZN7maliput3api18RoadPositionResultaSERKS1_(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(64) %55)
          to label %62 unwind label %60

60:                                               ; preds = %58, %.lr.ph
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %65

62:                                               ; preds = %58, %57
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN7maliput3api18RoadPositionResultESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %64 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7maliput3api18RoadPositionResultESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  br i1 %64, label %.lr.ph, label %._crit_edge

65:                                               ; preds = %60, %53
  %.pn19 = phi { ptr, i32 } [ %61, %60 ], [ %54, %53 ]
  call void @_ZNSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  br label %66

66:                                               ; preds = %65, %52
  %.pn19.pn = phi { ptr, i32 } [ %.pn19, %65 ], [ %.pn, %52 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #8
  br label %67

67:                                               ; preds = %66, %34
  %.pn19.pn.pn = phi { ptr, i32 } [ %.pn19.pn, %66 ], [ %35, %34 ]
  call void @_ZNSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  resume { ptr, i32 } %.pn19.pn.pn

68:                                               ; preds = %._crit_edge, %18
  ret void
}

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

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

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

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

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

declare void @_ZNK7maliput3api4Lane14ToLanePositionERKNS0_16InertialPositionE(ptr dead_on_unwind writable sret(%"struct.maliput::api::LanePositionResult") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZN7maliput3api18RoadPositionResultaSEOS1_(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7maliput13geometry_base18BruteForceStrategy19DoFindRoadPositionsERKNS_3api16InertialPositionEd(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), double noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNSt14numeric_limitsIdE8infinityEv() local_unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

declare void @_ZN7maliput13geometry_base25FilterRoadPositionResultsERKSt6vectorINS_3api18RoadPositionResultESaIS3_EERKSt8functionIFbRKS3_EE(ptr dead_on_unwind writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK7maliput3api12RoadGeometry16linear_toleranceEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZNKSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZN7maliput3api18RoadPositionResultaSERKS1_(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #1 align 2

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

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

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

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

declare noundef zeroext i1 @_ZN7maliput13geometry_base29IsNewRoadPositionResultCloserERKNS_3api18RoadPositionResultES4_(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN7maliput3api18RoadPositionResultESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 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 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #8 = { nounwind }
attributes #9 = { 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, !7, i64 0}
!6 = !{!"_ZTSN7maliput3api12RoadPositionE", !7, i64 0, !10, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN7maliput3api12LanePositionE", !11, i64 0}
!11 = !{!"_ZTSN7maliput4math7Vector3E", !12, i64 0}
!12 = !{!"_ZTSN7maliput4math10VectorBaseILm3ENS0_7Vector3EEE", !13, i64 0}
!13 = !{!"_ZTSSt5arrayIdLm3EE", !8, i64 0}
!14 = !{!15, !17, i64 48}
!15 = !{!"_ZTSN7maliput3api18LanePositionResultE", !10, i64 0, !16, i64 24, !17, i64 48}
!16 = !{!"_ZTSN7maliput3api16InertialPositionE", !11, i64 0}
!17 = !{!"double", !8, i64 0}
!18 = !{!19, !17, i64 56}
!19 = !{!"_ZTSN7maliput3api18RoadPositionResultE", !6, i64 0, !16, i64 32, !17, i64 56}
!20 = !{!21, !17, i64 0}
!21 = !{!"_ZTSZNK7maliput13geometry_base18BruteForceStrategy16DoToRoadPositionERKNS_3api16InertialPositionERKSt8optionalINS2_12RoadPositionEEE3$_0", !17, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass