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

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

%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.maliput::common::Passkey.14" = type { i8 }
%"class.maliput::geometry_base::Junction" = type { %"class.maliput::api::Junction", %"class.maliput::api::TypeSpecificIdentifier", ptr, %"class.std::function", %"class.std::function.0", %"class.std::vector" }
%"class.maliput::api::Junction" = type { ptr }
%"class.maliput::api::TypeSpecificIdentifier" = type { %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::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.std::function.0" = type { %"class.std::_Function_base", ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::unique_ptr<maliput::geometry_base::Segment>, std::allocator<std::unique_ptr<maliput::geometry_base::Segment>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<maliput::geometry_base::Segment>, std::allocator<std::unique_ptr<maliput::geometry_base::Segment>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<maliput::geometry_base::Segment>, std::allocator<std::unique_ptr<maliput::geometry_base::Segment>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<maliput::geometry_base::Segment>, std::allocator<std::unique_ptr<maliput::geometry_base::Segment>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [25 x i8], align 1
@__func__._ZN7maliput13geometry_base8Junction20AttachToRoadGeometryENS_6common7PasskeyINS0_12RoadGeometryEEEPKNS_3api12RoadGeometryERKSt8functionIFvPKNS6_7SegmentEEERKSA_IFvPKNS6_4LaneEEE = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7maliput13geometry_base8Junction20AttachToRoadGeometryENS_6common7PasskeyINS0_12RoadGeometryEEEPKNS_3api12RoadGeometryERKSt8functionIFvPKNS6_7SegmentEEERKSA_IFvPKNS6_4LaneEEE(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %4) #0 align 2 {
  %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 ptr, align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"class.maliput::common::Passkey.14", align 1
  store ptr %0, ptr %6, align 8, !tbaa !5
  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
  %16 = load ptr, ptr %6, align 8
  br label %17

17:                                               ; preds = %5
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = icmp ne ptr %18, null
  br i1 %19, label %21, label %20

20:                                               ; preds = %17
  call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef @.str, ptr noundef @__func__._ZN7maliput13geometry_base8Junction20AttachToRoadGeometryENS_6common7PasskeyINS0_12RoadGeometryEEEPKNS_3api12RoadGeometryERKSt8functionIFvPKNS6_7SegmentEEERKSA_IFvPKNS6_4LaneEEE, ptr noundef @.str.1, i32 noundef 41) #6
  unreachable

21:                                               ; preds = %17
  br label %22

22:                                               ; preds = %21
  br label %23

23:                                               ; preds = %22
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = call noundef zeroext i1 @_ZNKSt8functionIFvPKN7maliput3api7SegmentEEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %24) #7
  br i1 %25, label %27, label %26

26:                                               ; preds = %23
  call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef @.str.2, ptr noundef @__func__._ZN7maliput13geometry_base8Junction20AttachToRoadGeometryENS_6common7PasskeyINS0_12RoadGeometryEEEPKNS_3api12RoadGeometryERKSt8functionIFvPKNS6_7SegmentEEERKSA_IFvPKNS6_4LaneEEE, ptr noundef @.str.1, i32 noundef 42) #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 = call noundef zeroext i1 @_ZNKSt8functionIFvPKN7maliput3api4LaneEEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %30) #7
  br i1 %31, label %33, label %32

32:                                               ; preds = %29
  call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef @.str.3, ptr noundef @__func__._ZN7maliput13geometry_base8Junction20AttachToRoadGeometryENS_6common7PasskeyINS0_12RoadGeometryEEEPKNS_3api12RoadGeometryERKSt8functionIFvPKNS6_7SegmentEEERKSA_IFvPKNS6_4LaneEEE, ptr noundef @.str.1, i32 noundef 43) #6
  unreachable

33:                                               ; preds = %29
  br label %34

34:                                               ; preds = %33
  br label %35

35:                                               ; preds = %34
  %36 = getelementptr inbounds %"class.maliput::geometry_base::Junction", ptr %16, i32 0, i32 2
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  %38 = icmp eq ptr %37, null
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef @.str.4, ptr noundef @__func__._ZN7maliput13geometry_base8Junction20AttachToRoadGeometryENS_6common7PasskeyINS0_12RoadGeometryEEEPKNS_3api12RoadGeometryERKSt8functionIFvPKNS6_7SegmentEEERKSA_IFvPKNS6_4LaneEEE, ptr noundef @.str.1, i32 noundef 45) #6
  unreachable

40:                                               ; preds = %35
  br label %41

41:                                               ; preds = %40
  br label %42

42:                                               ; preds = %41
  %43 = getelementptr inbounds %"class.maliput::geometry_base::Junction", ptr %16, i32 0, i32 3
  %44 = call noundef zeroext i1 @_ZNKSt8functionIFvPKN7maliput3api7SegmentEEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %43) #7
  br i1 %44, label %45, label %46

45:                                               ; preds = %42
  call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef @.str.5, ptr noundef @__func__._ZN7maliput13geometry_base8Junction20AttachToRoadGeometryENS_6common7PasskeyINS0_12RoadGeometryEEEPKNS_3api12RoadGeometryERKSt8functionIFvPKNS6_7SegmentEEERKSA_IFvPKNS6_4LaneEEE, ptr noundef @.str.1, i32 noundef 46) #6
  unreachable

46:                                               ; preds = %42
  br label %47

47:                                               ; preds = %46
  br label %48

48:                                               ; preds = %47
  %49 = getelementptr inbounds %"class.maliput::geometry_base::Junction", ptr %16, i32 0, i32 4
  %50 = call noundef zeroext i1 @_ZNKSt8functionIFvPKN7maliput3api4LaneEEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %49) #7
  br i1 %50, label %51, label %52

51:                                               ; preds = %48
  call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef @.str.6, ptr noundef @__func__._ZN7maliput13geometry_base8Junction20AttachToRoadGeometryENS_6common7PasskeyINS0_12RoadGeometryEEEPKNS_3api12RoadGeometryERKSt8functionIFvPKNS6_7SegmentEEERKSA_IFvPKNS6_4LaneEEE, ptr noundef @.str.1, i32 noundef 47) #6
  unreachable

52:                                               ; preds = %48
  br label %53

53:                                               ; preds = %52
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = getelementptr inbounds %"class.maliput::geometry_base::Junction", ptr %16, i32 0, i32 2
  store ptr %54, ptr %55, align 8, !tbaa !9
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds %"class.maliput::geometry_base::Junction", ptr %16, i32 0, i32 3
  %58 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt8functionIFvPKN7maliput3api7SegmentEEEaSERKS6_(ptr noundef nonnull align 8 dereferenceable(32) %57, ptr noundef nonnull align 8 dereferenceable(32) %56)
  %59 = load ptr, ptr %10, align 8, !tbaa !5
  %60 = getelementptr inbounds %"class.maliput::geometry_base::Junction", ptr %16, i32 0, i32 4
  %61 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt8functionIFvPKN7maliput3api4LaneEEEaSERKS6_(ptr noundef nonnull align 8 dereferenceable(32) %60, ptr noundef nonnull align 8 dereferenceable(32) %59)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %62 = getelementptr inbounds %"class.maliput::geometry_base::Junction", ptr %16, i32 0, i32 5
  store ptr %62, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %63 = load ptr, ptr %11, align 8, !tbaa !5
  %64 = call ptr @_ZNSt6vectorISt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS3_EESaIS6_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %63) #7
  %65 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %64, ptr %65, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = call ptr @_ZNSt6vectorISt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS3_EESaIS6_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %66) #7
  %68 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %67, ptr %68, align 8
  br label %69

69:                                               ; preds = %80, %53
  %70 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS4_EESt6vectorIS7_SaIS7_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br i1 %70, label %72, label %71

71:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %82

72:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS4_EESt6vectorIS7_SaIS7_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  store ptr %73, ptr %14, align 8, !tbaa !5
  %74 = getelementptr inbounds %"class.maliput::geometry_base::Junction", ptr %16, i32 0, i32 3
  %75 = load ptr, ptr %14, align 8, !tbaa !5
  %76 = call noundef ptr @_ZNKSt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS2_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %75) #7
  call void @_ZNKSt8functionIFvPKN7maliput3api7SegmentEEEclES4_(ptr noundef nonnull align 8 dereferenceable(32) %74, ptr noundef %76)
  %77 = load ptr, ptr %14, align 8, !tbaa !5
  %78 = call noundef ptr @_ZNKSt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %77) #7
  call void @_ZN7maliput6common7PasskeyINS_13geometry_base8JunctionEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15)
  %79 = getelementptr inbounds %"class.maliput::geometry_base::Junction", ptr %16, i32 0, i32 4
  call void @_ZN7maliput13geometry_base7Segment23SetLaneIndexingCallbackENS_6common7PasskeyINS0_8JunctionEEERKSt8functionIFvPKNS_3api4LaneEEE(ptr noundef nonnull align 8 dereferenceable(104) %78, ptr noundef %15, ptr noundef nonnull align 8 dereferenceable(32) %79)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %80

80:                                               ; preds = %72
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS4_EESt6vectorIS7_SaIS7_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  br label %69

82:                                               ; preds = %71
  ret void
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS3_EESaIS6_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_cxxneIPSt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS4_EESt6vectorIS7_SaIS7_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

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

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

declare void @_ZN7maliput13geometry_base7Segment23SetLaneIndexingCallbackENS_6common7PasskeyINS0_8JunctionEEERKSt8functionIFvPKNS_3api4LaneEEE(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS4_EESt6vectorIS7_SaIS7_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #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 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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, !6, i64 40}
!10 = !{!"_ZTSN7maliput13geometry_base8JunctionE", !11, i64 0, !12, i64 8, !6, i64 40, !16, i64 48, !18, i64 80, !19, i64 112}
!11 = !{!"_ZTSN7maliput3api8JunctionE"}
!12 = !{!"_ZTSN7maliput3api22TypeSpecificIdentifierINS0_8JunctionEEE", !13, i64 0}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSSt8functionIFvPKN7maliput3api7SegmentEEE", !17, i64 0, !6, i64 24}
!17 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!18 = !{!"_ZTSSt8functionIFvPKN7maliput3api4LaneEEE", !17, i64 0, !6, i64 24}
!19 = !{!"_ZTSSt6vectorISt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS3_EESaIS6_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseISt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS3_EESaIS6_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS3_EESaIS6_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS3_EESaIS6_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}


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

%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.maliput::common::Passkey.14" = type { i8 }

@.str = external hidden unnamed_addr constant [25 x i8], align 1
@__func__._ZN7maliput13geometry_base8Junction20AttachToRoadGeometryENS_6common7PasskeyINS0_12RoadGeometryEEEPKNS_3api12RoadGeometryERKSt8functionIFvPKNS6_7SegmentEEERKSA_IFvPKNS6_4LaneEEE = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7maliput13geometry_base8Junction20AttachToRoadGeometryENS_6common7PasskeyINS0_12RoadGeometryEEEPKNS_3api12RoadGeometryERKSt8functionIFvPKNS6_7SegmentEEERKSA_IFvPKNS6_4LaneEEE(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr nocapture noundef readnone %1, ptr noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %4) local_unnamed_addr #0 align 2 {
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.maliput::common::Passkey.14", align 1
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %9, label %10

9:                                                ; preds = %5
  tail call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZN7maliput13geometry_base8Junction20AttachToRoadGeometryENS_6common7PasskeyINS0_12RoadGeometryEEEPKNS_3api12RoadGeometryERKSt8functionIFvPKNS6_7SegmentEEERKSA_IFvPKNS6_4LaneEEE, ptr noundef nonnull @.str.1, i32 noundef 41) #6
  unreachable

10:                                               ; preds = %5
  %11 = tail call noundef zeroext i1 @_ZNKSt8functionIFvPKN7maliput3api7SegmentEEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  br i1 %11, label %13, label %12

12:                                               ; preds = %10
  tail call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZN7maliput13geometry_base8Junction20AttachToRoadGeometryENS_6common7PasskeyINS0_12RoadGeometryEEEPKNS_3api12RoadGeometryERKSt8functionIFvPKNS6_7SegmentEEERKSA_IFvPKNS6_4LaneEEE, ptr noundef nonnull @.str.1, i32 noundef 42) #6
  unreachable

13:                                               ; preds = %10
  %14 = tail call noundef zeroext i1 @_ZNKSt8functionIFvPKN7maliput3api4LaneEEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  br i1 %14, label %16, label %15

15:                                               ; preds = %13
  tail call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__._ZN7maliput13geometry_base8Junction20AttachToRoadGeometryENS_6common7PasskeyINS0_12RoadGeometryEEEPKNS_3api12RoadGeometryERKSt8functionIFvPKNS6_7SegmentEEERKSA_IFvPKNS6_4LaneEEE, ptr noundef nonnull @.str.1, i32 noundef 43) #6
  unreachable

16:                                               ; preds = %13
  %17 = getelementptr inbounds i8, ptr %0, i64 40
  %18 = load ptr, ptr %17, align 8, !tbaa !5
  %19 = icmp eq ptr %18, null
  br i1 %19, label %21, label %20

20:                                               ; preds = %16
  tail call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef nonnull @.str.4, ptr noundef nonnull @__func__._ZN7maliput13geometry_base8Junction20AttachToRoadGeometryENS_6common7PasskeyINS0_12RoadGeometryEEEPKNS_3api12RoadGeometryERKSt8functionIFvPKNS6_7SegmentEEERKSA_IFvPKNS6_4LaneEEE, ptr noundef nonnull @.str.1, i32 noundef 45) #6
  unreachable

21:                                               ; preds = %16
  %22 = getelementptr inbounds i8, ptr %0, i64 48
  %23 = tail call noundef zeroext i1 @_ZNKSt8functionIFvPKN7maliput3api7SegmentEEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  br i1 %23, label %24, label %25

24:                                               ; preds = %21
  tail call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef nonnull @.str.5, ptr noundef nonnull @__func__._ZN7maliput13geometry_base8Junction20AttachToRoadGeometryENS_6common7PasskeyINS0_12RoadGeometryEEEPKNS_3api12RoadGeometryERKSt8functionIFvPKNS6_7SegmentEEERKSA_IFvPKNS6_4LaneEEE, ptr noundef nonnull @.str.1, i32 noundef 46) #6
  unreachable

25:                                               ; preds = %21
  %26 = getelementptr inbounds i8, ptr %0, i64 80
  %27 = tail call noundef zeroext i1 @_ZNKSt8functionIFvPKN7maliput3api4LaneEEEcvbEv(ptr noundef nonnull align 8 dereferenceable(32) %26) #7
  br i1 %27, label %28, label %29

28:                                               ; preds = %25
  tail call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef nonnull @.str.6, ptr noundef nonnull @__func__._ZN7maliput13geometry_base8Junction20AttachToRoadGeometryENS_6common7PasskeyINS0_12RoadGeometryEEEPKNS_3api12RoadGeometryERKSt8functionIFvPKNS6_7SegmentEEERKSA_IFvPKNS6_4LaneEEE, ptr noundef nonnull @.str.1, i32 noundef 47) #6
  unreachable

29:                                               ; preds = %25
  store ptr %2, ptr %17, align 8, !tbaa !5
  %30 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt8functionIFvPKN7maliput3api7SegmentEEEaSERKS6_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(32) %3)
  %31 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt8functionIFvPKN7maliput3api4LaneEEEaSERKS6_(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef nonnull align 8 dereferenceable(32) %4)
  %32 = getelementptr inbounds i8, ptr %0, i64 112
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %33 = tail call ptr @_ZNSt6vectorISt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS3_EESaIS6_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #7
  store ptr %33, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %34 = tail call ptr @_ZNSt6vectorISt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS3_EESaIS6_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #7
  store ptr %34, ptr %7, align 8
  %35 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS4_EESt6vectorIS7_SaIS7_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %35, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  ret void

.lr.ph:                                           ; preds = %29, %.lr.ph
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS4_EESt6vectorIS7_SaIS7_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %37 = call noundef ptr @_ZNKSt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS2_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #7
  call void @_ZNKSt8functionIFvPKN7maliput3api7SegmentEEEclES4_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef %37)
  %38 = call noundef ptr @_ZNKSt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %36) #7
  call void @_ZN7maliput6common7PasskeyINS_13geometry_base8JunctionEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8)
  call void @_ZN7maliput13geometry_base7Segment23SetLaneIndexingCallbackENS_6common7PasskeyINS0_8JunctionEEERKSt8functionIFvPKNS_3api4LaneEEE(ptr noundef nonnull align 8 dereferenceable(104) %38, ptr noundef nonnull %8, ptr noundef nonnull align 8 dereferenceable(32) %26)
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS4_EESt6vectorIS7_SaIS7_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %40 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS4_EESt6vectorIS7_SaIS7_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %40, label %.lr.ph, label %._crit_edge
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS3_EESaIS6_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_cxxneIPSt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS4_EESt6vectorIS7_SaIS7_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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

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

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

declare void @_ZN7maliput13geometry_base7Segment23SetLaneIndexingCallbackENS_6common7PasskeyINS0_8JunctionEEERKSt8functionIFvPKNS_3api4LaneEEE(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS4_EESt6vectorIS7_SaIS7_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_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 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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, !11, i64 40}
!6 = !{!"_ZTSN7maliput13geometry_base8JunctionE", !7, i64 0, !8, i64 8, !11, i64 40, !15, i64 48, !17, i64 80, !18, i64 112}
!7 = !{!"_ZTSN7maliput3api8JunctionE"}
!8 = !{!"_ZTSN7maliput3api22TypeSpecificIdentifierINS0_8JunctionEEE", !9, i64 0}
!9 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !10, i64 0, !14, i64 8, !12, i64 16}
!10 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !11, i64 0}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"long", !12, i64 0}
!15 = !{!"_ZTSSt8functionIFvPKN7maliput3api7SegmentEEE", !16, i64 0, !11, i64 24}
!16 = !{!"_ZTSSt14_Function_base", !12, i64 0, !11, i64 16}
!17 = !{!"_ZTSSt8functionIFvPKN7maliput3api4LaneEEE", !16, i64 0, !11, i64 24}
!18 = !{!"_ZTSSt6vectorISt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS3_EESaIS6_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseISt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS3_EESaIS6_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS3_EESaIS6_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN7maliput13geometry_base7SegmentESt14default_deleteIS3_EESaIS6_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}


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