; LLVM IR from maliput/maliput :: src/maliput/utility (generate_obj)

; 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::utility::Material" = type { %"class.std::__cxx11::basic_string", %"class.maliput::math::Vector3", %"class.maliput::math::Vector3", %"class.maliput::math::Vector3", double, double }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.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::utility::mesh::GeoMesh" = type { %"class.maliput::utility::mesh::UniqueIndexer", %"class.maliput::utility::mesh::UniqueIndexer.37", %"class.std::vector.58" }
%"class.maliput::utility::mesh::UniqueIndexer" = type { %"class.std::unordered_map", %"class.std::vector.32" }
%"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 }
%"class.std::vector.32" = type { %"struct.std::_Vector_base.33" }
%"struct.std::_Vector_base.33" = type { %"struct.std::_Vector_base<const maliput::utility::mesh::GeoVertex *, std::allocator<const maliput::utility::mesh::GeoVertex *>>::_Vector_impl" }
%"struct.std::_Vector_base<const maliput::utility::mesh::GeoVertex *, std::allocator<const maliput::utility::mesh::GeoVertex *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const maliput::utility::mesh::GeoVertex *, std::allocator<const maliput::utility::mesh::GeoVertex *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const maliput::utility::mesh::GeoVertex *, std::allocator<const maliput::utility::mesh::GeoVertex *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.maliput::utility::mesh::UniqueIndexer.37" = type { %"class.std::unordered_map.38", %"class.std::vector.53" }
%"class.std::unordered_map.38" = type { %"class.std::_Hashtable.39" }
%"class.std::_Hashtable.39" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::vector.53" = type { %"struct.std::_Vector_base.54" }
%"struct.std::_Vector_base.54" = type { %"struct.std::_Vector_base<const maliput::utility::mesh::GeoNormal *, std::allocator<const maliput::utility::mesh::GeoNormal *>>::_Vector_impl" }
%"struct.std::_Vector_base<const maliput::utility::mesh::GeoNormal *, std::allocator<const maliput::utility::mesh::GeoNormal *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const maliput::utility::mesh::GeoNormal *, std::allocator<const maliput::utility::mesh::GeoNormal *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const maliput::utility::mesh::GeoNormal *, std::allocator<const maliput::utility::mesh::GeoNormal *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.58" = type { %"struct.std::_Vector_base.59" }
%"struct.std::_Vector_base.59" = type { %"struct.std::_Vector_base<maliput::utility::mesh::IndexFace, std::allocator<maliput::utility::mesh::IndexFace>>::_Vector_impl" }
%"struct.std::_Vector_base<maliput::utility::mesh::IndexFace, std::allocator<maliput::utility::mesh::IndexFace>>::_Vector_impl" = type { %"struct.std::_Vector_base<maliput::utility::mesh::IndexFace, std::allocator<maliput::utility::mesh::IndexFace>>::_Vector_impl_data" }
%"struct.std::_Vector_base<maliput::utility::mesh::IndexFace, std::allocator<maliput::utility::mesh::IndexFace>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.25" = type { %"class.maliput::utility::mesh::GeoMesh", %"struct.maliput::utility::Material" }
%"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.74 = type { i8 }
%"struct.maliput::utility::ObjFeatures" = type { double, double, i8, i8, i8, i8, i8, i8, double, double, double, double, double, double, double, %"class.maliput::api::InertialPosition", %"class.std::vector.63" }
%"class.maliput::api::InertialPosition" = type { %"class.maliput::math::Vector3" }
%"class.std::vector.63" = type { %"struct.std::_Vector_base.64" }
%"struct.std::_Vector_base.64" = type { %"struct.std::_Vector_base<maliput::api::TypeSpecificIdentifier<maliput::api::Segment>, std::allocator<maliput::api::TypeSpecificIdentifier<maliput::api::Segment>>>::_Vector_impl" }
%"struct.std::_Vector_base<maliput::api::TypeSpecificIdentifier<maliput::api::Segment>, std::allocator<maliput::api::TypeSpecificIdentifier<maliput::api::Segment>>>::_Vector_impl" = type { %"struct.std::_Vector_base<maliput::api::TypeSpecificIdentifier<maliput::api::Segment>, std::allocator<maliput::api::TypeSpecificIdentifier<maliput::api::Segment>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<maliput::api::TypeSpecificIdentifier<maliput::api::Segment>, std::allocator<maliput::api::TypeSpecificIdentifier<maliput::api::Segment>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.63 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [14 x i8], align 1
@__func__._ZN7maliput7utility9BuildMeshEPKNS_3api12RoadGeometryERKNS0_11ObjFeaturesERKNS1_22TypeSpecificIdentifierINS1_4LaneEEERKNS0_12MaterialTypeE = external hidden unnamed_addr constant [10 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [87 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7maliput7utility8MaterialD2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maliput7utility19GetMaterialFromMeshENS0_12MaterialTypeE(ptr dead_on_unwind noalias writable sret(%"struct.maliput::utility::Material") align 8, i32 noundef) #2

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef double @_ZN7maliput7utility12_GLOBAL__N_112PickGridUnitEPKNS_3api4LaneEddd(ptr noundef, double noundef, double noundef, double noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7maliput7utility12_GLOBAL__N_118CoverLaneWithQuadsEPNS0_4mesh7GeoMeshEPKNS_3api4LaneEdbRKSt8functionIFdddEEb(ptr noundef, ptr noundef, double noundef, i1 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) #2

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7maliput7utility12_GLOBAL__N_112SimplifyMeshERKNS0_4mesh7GeoMeshERKNS0_11ObjFeaturesE(ptr dead_on_unwind noalias writable sret(%"class.maliput::utility::mesh::GeoMesh") align 8, ptr noundef nonnull align 8 dereferenceable(184), ptr noundef nonnull align 8 dereferenceable(128)) #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7maliput7utility9BuildMeshEPKNS_3api12RoadGeometryERKNS0_11ObjFeaturesERKNS1_22TypeSpecificIdentifierINS1_7SegmentEEERKNS0_12MaterialTypeE(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.25") align 8 %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(128) %2, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 4 dereferenceable(4) %4) #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 ptr, align 8
  %11 = alloca %"class.maliput::utility::mesh::GeoMesh", align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca %"class.maliput::utility::mesh::GeoMesh", align 8
  %19 = alloca %"class.std::function", align 8
  %20 = alloca %class.anon.74, align 1
  %21 = alloca %"class.maliput::utility::mesh::GeoMesh", align 8
  %22 = alloca %"struct.maliput::utility::Material", 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 ptr %4, ptr %10, align 8, !tbaa !5
  br label %23

23:                                               ; preds = %5
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %27, label %26

26:                                               ; preds = %23
  call void @_ZN7maliput6common8internal5AbortEPKcS3_S3_i(ptr noundef @.str.65, ptr noundef @__func__._ZN7maliput7utility9BuildMeshEPKNS_3api12RoadGeometryERKNS0_11ObjFeaturesERKNS1_22TypeSpecificIdentifierINS1_4LaneEEERKNS0_12MaterialTypeE, ptr noundef @.str.63, i32 noundef 896) #6
  unreachable

27:                                               ; preds = %23
  br label %28

28:                                               ; preds = %27
  br label %29

29:                                               ; preds = %28
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  %31 = load i32, ptr %30, align 4, !tbaa !9
  %32 = icmp eq i32 %31, 0
  br i1 %32, label %38, label %33

33:                                               ; preds = %29
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = load i32, ptr %34, align 4, !tbaa !9
  %36 = icmp eq i32 %35, 5
  br i1 %36, label %38, label %37

37:                                               ; preds = %33
  call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef @.str.72, ptr noundef @__func__._ZN7maliput7utility9BuildMeshEPKNS_3api12RoadGeometryERKNS0_11ObjFeaturesERKNS1_22TypeSpecificIdentifierINS1_4LaneEEERKNS0_12MaterialTypeE, ptr noundef @.str.63, i32 noundef 897) #6
  unreachable

38:                                               ; preds = %33, %29
  br label %39

39:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 184, ptr %11) #7
  call void @_ZN7maliput7utility4mesh7GeoMeshC2Ev(ptr noundef nonnull align 8 dereferenceable(184) %11)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7maliput3api12RoadGeometry4ByIdEv(ptr noundef nonnull align 8 dereferenceable(8) %40)
          to label %42 unwind label %92

42:                                               ; preds = %39
  store ptr %41, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  %45 = invoke noundef ptr @_ZNK7maliput3api12RoadGeometry7IdIndex10GetSegmentERKNS0_22TypeSpecificIdentifierINS0_7SegmentEEE(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull align 8 dereferenceable(32) %44)
          to label %46 unwind label %96

46:                                               ; preds = %42
  store ptr %45, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %47 = load ptr, ptr %15, align 8, !tbaa !5
  %48 = invoke noundef ptr @_ZNK7maliput3api7Segment8junctionEv(ptr noundef nonnull align 8 dereferenceable(8) %47)
          to label %49 unwind label %100

49:                                               ; preds = %46
  %50 = invoke noundef ptr @_ZNK7maliput3api8Junction13road_geometryEv(ptr noundef nonnull align 8 dereferenceable(8) %48)
          to label %51 unwind label %100

51:                                               ; preds = %49
  %52 = invoke noundef double @_ZNK7maliput3api12RoadGeometry16linear_toleranceEv(ptr noundef nonnull align 8 dereferenceable(8) %50)
          to label %53 unwind label %100

53:                                               ; preds = %51
  store double %52, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.maliput::utility::ObjFeatures", ptr %54, i32 0, i32 7
  %56 = load i8, ptr %55, align 1, !tbaa !13, !range !24, !noundef !25
  %57 = trunc i8 %56 to i1
  br i1 %57, label %58, label %60

58:                                               ; preds = %53
  %59 = load double, ptr %16, align 8, !tbaa !11
  br label %73

60:                                               ; preds = %53
  %61 = load ptr, ptr %15, align 8, !tbaa !5
  %62 = invoke noundef ptr @_ZNK7maliput3api7Segment4laneEi(ptr noundef nonnull align 8 dereferenceable(8) %61, i32 noundef 0)
          to label %63 unwind label %104

63:                                               ; preds = %60
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.maliput::utility::ObjFeatures", ptr %64, i32 0, i32 0
  %66 = load double, ptr %65, align 8, !tbaa !26
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.maliput::utility::ObjFeatures", ptr %67, i32 0, i32 1
  %69 = load double, ptr %68, align 8, !tbaa !27
  %70 = load double, ptr %16, align 8, !tbaa !11
  %71 = invoke noundef double @_ZN7maliput7utility12_GLOBAL__N_112PickGridUnitEPKNS_3api4LaneEddd(ptr noundef %62, double noundef %66, double noundef %69, double noundef %70)
          to label %72 unwind label %104

72:                                               ; preds = %63
  br label %73

73:                                               ; preds = %72, %58
  %74 = phi double [ %59, %58 ], [ %71, %72 ]
  store double %74, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 184, ptr %18) #7
  invoke void @_ZN7maliput7utility4mesh7GeoMeshC2Ev(ptr noundef nonnull align 8 dereferenceable(184) %18)
          to label %75 unwind label %108

75:                                               ; preds = %73
  %76 = load ptr, ptr %15, align 8, !tbaa !5
  %77 = invoke noundef ptr @_ZNK7maliput3api7Segment4laneEi(ptr noundef nonnull align 8 dereferenceable(8) %76, i32 noundef 0)
          to label %78 unwind label %112

78:                                               ; preds = %75
  %79 = load double, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #7
  call void @"_ZNSt8functionIFdddEEC2IZN7maliput7utility9BuildMeshEPKNS3_3api12RoadGeometryERKNS4_11ObjFeaturesERKNS5_22TypeSpecificIdentifierINS5_7SegmentEEERKNS4_12MaterialTypeEE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 1 dereferenceable(1) %20) #7
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.maliput::utility::ObjFeatures", ptr %80, i32 0, i32 7
  %82 = load i8, ptr %81, align 1, !tbaa !13, !range !24, !noundef !25
  %83 = trunc i8 %82 to i1
  invoke void @_ZN7maliput7utility12_GLOBAL__N_118CoverLaneWithQuadsEPNS0_4mesh7GeoMeshEPKNS_3api4LaneEdbRKSt8functionIFdddEEb(ptr noundef %18, ptr noundef %77, double noundef %79, i1 noundef zeroext true, ptr noundef nonnull align 8 dereferenceable(32) %19, i1 noundef zeroext %83)
          to label %84 unwind label %116

84:                                               ; preds = %78
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 184, ptr %21) #7
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN7maliput7utility12_GLOBAL__N_112SimplifyMeshERKNS0_4mesh7GeoMeshERKNS0_11ObjFeaturesE(ptr dead_on_unwind writable sret(%"class.maliput::utility::mesh::GeoMesh") align 8 %21, ptr noundef nonnull align 8 dereferenceable(184) %18, ptr noundef nonnull align 8 dereferenceable(128) %85)
          to label %86 unwind label %120

86:                                               ; preds = %84
  invoke void @_ZN7maliput7utility4mesh7GeoMesh12AddFacesFromERKS2_(ptr noundef nonnull align 8 dereferenceable(184) %11, ptr noundef nonnull align 8 dereferenceable(184) %21)
          to label %87 unwind label %124

87:                                               ; preds = %86
  call void @_ZN7maliput7utility4mesh7GeoMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %21) #7
  call void @llvm.lifetime.end.p0(i64 184, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 120, ptr %22) #7
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = load i32, ptr %88, align 4, !tbaa !9
  invoke void @_ZN7maliput7utility19GetMaterialFromMeshENS0_12MaterialTypeE(ptr dead_on_unwind writable sret(%"struct.maliput::utility::Material") align 8 %22, i32 noundef %89)
          to label %90 unwind label %129

90:                                               ; preds = %87
  invoke void @_ZSt9make_pairIN7maliput7utility4mesh7GeoMeshERNS1_8MaterialEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr dead_on_unwind writable sret(%"struct.std::pair.25") align 8 %0, ptr noundef nonnull align 8 dereferenceable(184) %11, ptr noundef nonnull align 8 dereferenceable(120) %22)
          to label %91 unwind label %133

91:                                               ; preds = %90
  call void @_ZN7maliput7utility8MaterialD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %22) #7
  call void @llvm.lifetime.end.p0(i64 120, ptr %22) #7
  call void @_ZN7maliput7utility4mesh7GeoMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %18) #7
  call void @llvm.lifetime.end.p0(i64 184, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @_ZN7maliput7utility4mesh7GeoMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %11) #7
  call void @llvm.lifetime.end.p0(i64 184, ptr %11) #7
  ret void

92:                                               ; preds = %39
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %13, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %14, align 4
  br label %143

96:                                               ; preds = %42
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %13, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %14, align 4
  br label %142

100:                                              ; preds = %51, %49, %46
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %13, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %14, align 4
  br label %141

104:                                              ; preds = %63, %60
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %13, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %14, align 4
  br label %140

108:                                              ; preds = %73
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %13, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %14, align 4
  br label %139

112:                                              ; preds = %75
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %13, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %14, align 4
  br label %138

116:                                              ; preds = %78
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %13, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %14, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  br label %138

120:                                              ; preds = %84
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %13, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %14, align 4
  br label %128

124:                                              ; preds = %86
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %13, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %14, align 4
  call void @_ZN7maliput7utility4mesh7GeoMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %21) #7
  br label %128

128:                                              ; preds = %124, %120
  call void @llvm.lifetime.end.p0(i64 184, ptr %21) #7
  br label %138

129:                                              ; preds = %87
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %13, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %14, align 4
  br label %137

133:                                              ; preds = %90
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %13, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %14, align 4
  call void @_ZN7maliput7utility8MaterialD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %22) #7
  br label %137

137:                                              ; preds = %133, %129
  call void @llvm.lifetime.end.p0(i64 120, ptr %22) #7
  br label %138

138:                                              ; preds = %137, %128, %116, %112
  call void @_ZN7maliput7utility4mesh7GeoMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %18) #7
  br label %139

139:                                              ; preds = %138, %108
  call void @llvm.lifetime.end.p0(i64 184, ptr %18) #7
  br label %140

140:                                              ; preds = %139, %104
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %141

141:                                              ; preds = %140, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %142

142:                                              ; preds = %141, %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %143

143:                                              ; preds = %142, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @_ZN7maliput7utility4mesh7GeoMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %11) #7
  call void @llvm.lifetime.end.p0(i64 184, ptr %11) #7
  br label %144

144:                                              ; preds = %143
  %145 = load ptr, ptr %13, align 8
  %146 = load i32, ptr %14, align 4
  %147 = insertvalue { ptr, i32 } poison, ptr %145, 0
  %148 = insertvalue { ptr, i32 } %147, i32 %146, 1
  resume { ptr, i32 } %148
}

declare noundef ptr @_ZNK7maliput3api12RoadGeometry7IdIndex10GetSegmentERKNS0_22TypeSpecificIdentifierINS0_7SegmentEEE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7maliput3api7Segment4laneEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIN7maliput7utility4mesh7GeoMeshERNS1_8MaterialEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.25") align 8, ptr noundef nonnull align 8 dereferenceable(184), ptr noundef nonnull align 8 dereferenceable(120)) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 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 #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 = { noreturn }
attributes #7 = { 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 = !{!"_ZTSN7maliput7utility12MaterialTypeE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !15, i64 21}
!14 = !{!"_ZTSN7maliput7utility11ObjFeaturesE", !12, i64 0, !12, i64 8, !15, i64 16, !15, i64 17, !15, i64 18, !15, i64 19, !15, i64 20, !15, i64 21, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !16, i64 80, !20, i64 104}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN7maliput3api16InertialPositionE", !17, i64 0}
!17 = !{!"_ZTSN7maliput4math7Vector3E", !18, i64 0}
!18 = !{!"_ZTSN7maliput4math10VectorBaseILm3ENS0_7Vector3EEE", !19, i64 0}
!19 = !{!"_ZTSSt5arrayIdLm3EE", !7, i64 0}
!20 = !{!"_ZTSSt6vectorIN7maliput3api22TypeSpecificIdentifierINS1_7SegmentEEESaIS4_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIN7maliput3api22TypeSpecificIdentifierINS1_7SegmentEEESaIS4_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN7maliput3api22TypeSpecificIdentifierINS1_7SegmentEEESaIS4_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN7maliput3api22TypeSpecificIdentifierINS1_7SegmentEEESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!14, !12, i64 0}
!27 = !{!14, !12, 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"

%"struct.maliput::utility::Material" = type { %"class.std::__cxx11::basic_string", %"class.maliput::math::Vector3", %"class.maliput::math::Vector3", %"class.maliput::math::Vector3", double, double }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.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::utility::mesh::GeoMesh" = type { %"class.maliput::utility::mesh::UniqueIndexer", %"class.maliput::utility::mesh::UniqueIndexer.37", %"class.std::vector.58" }
%"class.maliput::utility::mesh::UniqueIndexer" = type { %"class.std::unordered_map", %"class.std::vector.32" }
%"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 }
%"class.std::vector.32" = type { %"struct.std::_Vector_base.33" }
%"struct.std::_Vector_base.33" = type { %"struct.std::_Vector_base<const maliput::utility::mesh::GeoVertex *, std::allocator<const maliput::utility::mesh::GeoVertex *>>::_Vector_impl" }
%"struct.std::_Vector_base<const maliput::utility::mesh::GeoVertex *, std::allocator<const maliput::utility::mesh::GeoVertex *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const maliput::utility::mesh::GeoVertex *, std::allocator<const maliput::utility::mesh::GeoVertex *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const maliput::utility::mesh::GeoVertex *, std::allocator<const maliput::utility::mesh::GeoVertex *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.maliput::utility::mesh::UniqueIndexer.37" = type { %"class.std::unordered_map.38", %"class.std::vector.53" }
%"class.std::unordered_map.38" = type { %"class.std::_Hashtable.39" }
%"class.std::_Hashtable.39" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::vector.53" = type { %"struct.std::_Vector_base.54" }
%"struct.std::_Vector_base.54" = type { %"struct.std::_Vector_base<const maliput::utility::mesh::GeoNormal *, std::allocator<const maliput::utility::mesh::GeoNormal *>>::_Vector_impl" }
%"struct.std::_Vector_base<const maliput::utility::mesh::GeoNormal *, std::allocator<const maliput::utility::mesh::GeoNormal *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const maliput::utility::mesh::GeoNormal *, std::allocator<const maliput::utility::mesh::GeoNormal *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const maliput::utility::mesh::GeoNormal *, std::allocator<const maliput::utility::mesh::GeoNormal *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.58" = type { %"struct.std::_Vector_base.59" }
%"struct.std::_Vector_base.59" = type { %"struct.std::_Vector_base<maliput::utility::mesh::IndexFace, std::allocator<maliput::utility::mesh::IndexFace>>::_Vector_impl" }
%"struct.std::_Vector_base<maliput::utility::mesh::IndexFace, std::allocator<maliput::utility::mesh::IndexFace>>::_Vector_impl" = type { %"struct.std::_Vector_base<maliput::utility::mesh::IndexFace, std::allocator<maliput::utility::mesh::IndexFace>>::_Vector_impl_data" }
%"struct.std::_Vector_base<maliput::utility::mesh::IndexFace, std::allocator<maliput::utility::mesh::IndexFace>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.25" = type { %"class.maliput::utility::mesh::GeoMesh", %"struct.maliput::utility::Material" }
%"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.74 = type { i8 }

@.str.63 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [14 x i8], align 1
@__func__._ZN7maliput7utility9BuildMeshEPKNS_3api12RoadGeometryERKNS0_11ObjFeaturesERKNS1_22TypeSpecificIdentifierINS1_4LaneEEERKNS0_12MaterialTypeE = external hidden unnamed_addr constant [10 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [87 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7maliput7utility8MaterialD2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maliput7utility19GetMaterialFromMeshENS0_12MaterialTypeE(ptr dead_on_unwind noalias writable sret(%"struct.maliput::utility::Material") align 8, i32 noundef) local_unnamed_addr #2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7maliput3api8Junction13road_geometryEv(ptr noundef nonnull align 8 dereferenceable(8)) 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 #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef double @_ZN7maliput7utility12_GLOBAL__N_112PickGridUnitEPKNS_3api4LaneEddd(ptr noundef, double noundef, double noundef, double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7maliput7utility12_GLOBAL__N_118CoverLaneWithQuadsEPNS0_4mesh7GeoMeshEPKNS_3api4LaneEdbRKSt8functionIFdddEEb(ptr noundef, ptr noundef, double noundef, i1 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maliput7utility4mesh7GeoMesh12AddFacesFromERKS2_(ptr noundef nonnull align 8 dereferenceable(184), ptr noundef nonnull align 8 dereferenceable(184)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7maliput7utility12_GLOBAL__N_112SimplifyMeshERKNS0_4mesh7GeoMeshERKNS0_11ObjFeaturesE(ptr dead_on_unwind noalias writable sret(%"class.maliput::utility::mesh::GeoMesh") align 8, ptr noundef nonnull align 8 dereferenceable(184), ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7maliput7utility9BuildMeshEPKNS_3api12RoadGeometryERKNS0_11ObjFeaturesERKNS1_22TypeSpecificIdentifierINS1_7SegmentEEERKNS0_12MaterialTypeE(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.25") align 8 %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(128) %2, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr nocapture noundef nonnull readonly align 4 dereferenceable(4) %4) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.maliput::utility::mesh::GeoMesh", align 8
  %7 = alloca %"class.maliput::utility::mesh::GeoMesh", align 8
  %8 = alloca %"class.std::function", align 8
  %9 = alloca %class.anon.74, align 1
  %10 = alloca %"class.maliput::utility::mesh::GeoMesh", align 8
  %11 = alloca %"struct.maliput::utility::Material", align 8
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %12, label %13

12:                                               ; preds = %5
  tail call void @_ZN7maliput6common8internal5AbortEPKcS3_S3_i(ptr noundef nonnull @.str.65, ptr noundef nonnull @__func__._ZN7maliput7utility9BuildMeshEPKNS_3api12RoadGeometryERKNS0_11ObjFeaturesERKNS1_22TypeSpecificIdentifierINS1_4LaneEEERKNS0_12MaterialTypeE, ptr noundef nonnull @.str.63, i32 noundef 896) #6
  unreachable

13:                                               ; preds = %5
  %14 = load i32, ptr %4, align 4, !tbaa !5
  switch i32 %14, label %15 [
    i32 0, label %16
    i32 5, label %16
  ]

15:                                               ; preds = %13
  tail call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef nonnull @.str.72, ptr noundef nonnull @__func__._ZN7maliput7utility9BuildMeshEPKNS_3api12RoadGeometryERKNS0_11ObjFeaturesERKNS1_22TypeSpecificIdentifierINS1_4LaneEEERKNS0_12MaterialTypeE, ptr noundef nonnull @.str.63, i32 noundef 897) #6
  unreachable

16:                                               ; preds = %13, %13
  call void @llvm.lifetime.start.p0(i64 184, ptr nonnull %6) #7
  call void @_ZN7maliput7utility4mesh7GeoMeshC2Ev(ptr noundef nonnull align 8 dereferenceable(184) %6)
  %17 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7maliput3api12RoadGeometry4ByIdEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %18 unwind label %49

18:                                               ; preds = %16
  %19 = invoke noundef ptr @_ZNK7maliput3api12RoadGeometry7IdIndex10GetSegmentERKNS0_22TypeSpecificIdentifierINS0_7SegmentEEE(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %20 unwind label %51

20:                                               ; preds = %18
  %21 = invoke noundef ptr @_ZNK7maliput3api7Segment8junctionEv(ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %22 unwind label %53

22:                                               ; preds = %20
  %23 = invoke noundef ptr @_ZNK7maliput3api8Junction13road_geometryEv(ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %24 unwind label %53

24:                                               ; preds = %22
  %25 = invoke noundef double @_ZNK7maliput3api12RoadGeometry16linear_toleranceEv(ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %26 unwind label %53

26:                                               ; preds = %24
  %27 = getelementptr inbounds i8, ptr %2, i64 21
  %28 = load i8, ptr %27, align 1, !tbaa !9, !range !22, !noundef !23
  %29 = trunc nuw i8 %28 to i1
  br i1 %29, label %37, label %30

30:                                               ; preds = %26
  %31 = invoke noundef ptr @_ZNK7maliput3api7Segment4laneEi(ptr noundef nonnull align 8 dereferenceable(8) %19, i32 noundef 0)
          to label %32 unwind label %55

32:                                               ; preds = %30
  %33 = load double, ptr %2, align 8, !tbaa !24
  %34 = getelementptr inbounds i8, ptr %2, i64 8
  %35 = load double, ptr %34, align 8, !tbaa !25
  %36 = invoke noundef double @_ZN7maliput7utility12_GLOBAL__N_112PickGridUnitEPKNS_3api4LaneEddd(ptr noundef %31, double noundef %33, double noundef %35, double noundef %25)
          to label %37 unwind label %55

37:                                               ; preds = %26, %32
  %38 = phi double [ %36, %32 ], [ %25, %26 ]
  call void @llvm.lifetime.start.p0(i64 184, ptr nonnull %7) #7
  call void @_ZN7maliput7utility4mesh7GeoMeshC2Ev(ptr noundef nonnull align 8 dereferenceable(184) %7)
  %39 = invoke noundef ptr @_ZNK7maliput3api7Segment4laneEi(ptr noundef nonnull align 8 dereferenceable(8) %19, i32 noundef 0)
          to label %40 unwind label %57

40:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #7
  call void @"_ZNSt8functionIFdddEEC2IZN7maliput7utility9BuildMeshEPKNS3_3api12RoadGeometryERKNS4_11ObjFeaturesERKNS5_22TypeSpecificIdentifierINS5_7SegmentEEERKNS4_12MaterialTypeEE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  %41 = load i8, ptr %27, align 1, !tbaa !9, !range !22, !noundef !23
  %42 = trunc nuw i8 %41 to i1
  invoke void @_ZN7maliput7utility12_GLOBAL__N_118CoverLaneWithQuadsEPNS0_4mesh7GeoMeshEPKNS_3api4LaneEdbRKSt8functionIFdddEEb(ptr noundef nonnull %7, ptr noundef %39, double noundef %38, i1 noundef zeroext true, ptr noundef nonnull align 8 dereferenceable(32) %8, i1 noundef zeroext %42)
          to label %43 unwind label %59

43:                                               ; preds = %40
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 184, ptr nonnull %10) #7
  invoke void @_ZN7maliput7utility12_GLOBAL__N_112SimplifyMeshERKNS0_4mesh7GeoMeshERKNS0_11ObjFeaturesE(ptr dead_on_unwind nonnull writable sret(%"class.maliput::utility::mesh::GeoMesh") align 8 %10, ptr noundef nonnull align 8 dereferenceable(184) %7, ptr noundef nonnull align 8 dereferenceable(128) %2)
          to label %44 unwind label %61

44:                                               ; preds = %43
  invoke void @_ZN7maliput7utility4mesh7GeoMesh12AddFacesFromERKS2_(ptr noundef nonnull align 8 dereferenceable(184) %6, ptr noundef nonnull align 8 dereferenceable(184) %10)
          to label %45 unwind label %63

45:                                               ; preds = %44
  call void @_ZN7maliput7utility4mesh7GeoMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %10) #7
  call void @llvm.lifetime.end.p0(i64 184, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %11) #7
  %46 = load i32, ptr %4, align 4, !tbaa !5
  invoke void @_ZN7maliput7utility19GetMaterialFromMeshENS0_12MaterialTypeE(ptr dead_on_unwind nonnull writable sret(%"struct.maliput::utility::Material") align 8 %11, i32 noundef %46)
          to label %47 unwind label %66

47:                                               ; preds = %45
  invoke void @_ZSt9make_pairIN7maliput7utility4mesh7GeoMeshERNS1_8MaterialEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr dead_on_unwind writable sret(%"struct.std::pair.25") align 8 %0, ptr noundef nonnull align 8 dereferenceable(184) %6, ptr noundef nonnull align 8 dereferenceable(120) %11)
          to label %48 unwind label %68

48:                                               ; preds = %47
  call void @_ZN7maliput7utility8MaterialD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %11) #7
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %11) #7
  call void @_ZN7maliput7utility4mesh7GeoMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %7) #7
  call void @llvm.lifetime.end.p0(i64 184, ptr nonnull %7) #7
  call void @_ZN7maliput7utility4mesh7GeoMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %6) #7
  call void @llvm.lifetime.end.p0(i64 184, ptr nonnull %6) #7
  ret void

49:                                               ; preds = %16
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %72

51:                                               ; preds = %18
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %72

53:                                               ; preds = %24, %22, %20
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %72

55:                                               ; preds = %32, %30
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %72

57:                                               ; preds = %37
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %71

59:                                               ; preds = %40
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br label %71

61:                                               ; preds = %43
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %65

63:                                               ; preds = %44
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7maliput7utility4mesh7GeoMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %10) #7
  br label %65

65:                                               ; preds = %63, %61
  %.pn = phi { ptr, i32 } [ %64, %63 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 184, ptr nonnull %10) #7
  br label %71

66:                                               ; preds = %45
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %70

68:                                               ; preds = %47
  %69 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7maliput7utility8MaterialD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %11) #7
  br label %70

70:                                               ; preds = %68, %66
  %.pn29 = phi { ptr, i32 } [ %69, %68 ], [ %67, %66 ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %11) #7
  br label %71

71:                                               ; preds = %70, %65, %59, %57
  %.pn29.pn = phi { ptr, i32 } [ %.pn29, %70 ], [ %.pn, %65 ], [ %60, %59 ], [ %58, %57 ]
  call void @_ZN7maliput7utility4mesh7GeoMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %7) #7
  call void @llvm.lifetime.end.p0(i64 184, ptr nonnull %7) #7
  br label %72

72:                                               ; preds = %51, %55, %71, %53, %49
  %.pn29.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %50, %49 ], [ %52, %51 ], [ %54, %53 ], [ %.pn29.pn, %71 ], [ %56, %55 ]
  call void @_ZN7maliput7utility4mesh7GeoMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %6) #7
  call void @llvm.lifetime.end.p0(i64 184, ptr nonnull %6) #7
  resume { ptr, i32 } %.pn29.pn.pn.pn.pn.pn
}

declare noundef ptr @_ZNK7maliput3api12RoadGeometry7IdIndex10GetSegmentERKNS0_22TypeSpecificIdentifierINS0_7SegmentEEE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIN7maliput7utility4mesh7GeoMeshERNS1_8MaterialEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS7_INS8_IT0_E4typeEE6__typeEEOS9_OSE_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.25") align 8, ptr noundef nonnull align 8 dereferenceable(184), ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 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 #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 = { noreturn }
attributes #7 = { 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 = !{!"_ZTSN7maliput7utility12MaterialTypeE", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 21}
!10 = !{!"_ZTSN7maliput7utility11ObjFeaturesE", !11, i64 0, !11, i64 8, !12, i64 16, !12, i64 17, !12, i64 18, !12, i64 19, !12, i64 20, !12, i64 21, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !13, i64 80, !17, i64 104}
!11 = !{!"double", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"_ZTSN7maliput3api16InertialPositionE", !14, i64 0}
!14 = !{!"_ZTSN7maliput4math7Vector3E", !15, i64 0}
!15 = !{!"_ZTSN7maliput4math10VectorBaseILm3ENS0_7Vector3EEE", !16, i64 0}
!16 = !{!"_ZTSSt5arrayIdLm3EE", !7, i64 0}
!17 = !{!"_ZTSSt6vectorIN7maliput3api22TypeSpecificIdentifierINS1_7SegmentEEESaIS4_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIN7maliput3api22TypeSpecificIdentifierINS1_7SegmentEEESaIS4_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIN7maliput3api22TypeSpecificIdentifierINS1_7SegmentEEESaIS4_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN7maliput3api22TypeSpecificIdentifierINS1_7SegmentEEESaIS4_EE17_Vector_impl_dataE", !21, i64 0, !21, i64 8, !21, i64 16}
!21 = !{!"any pointer", !7, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!10, !11, i64 0}
!25 = !{!10, !11, i64 8}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass