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

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

%"class.std::unordered_set" = 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::unordered_set<const maliput::api::Segment *>, std::allocator<std::unordered_set<const maliput::api::Segment *>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unordered_set<const maliput::api::Segment *>, std::allocator<std::unordered_set<const maliput::api::Segment *>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unordered_set<const maliput::api::Segment *>, std::allocator<std::unordered_set<const maliput::api::Segment *>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unordered_set<const maliput::api::Segment *>, std::allocator<std::unordered_set<const maliput::api::Segment *>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maliput7utility21FindConfluentSegmentsEPKNS_3api7SegmentE(ptr dead_on_unwind noalias writable sret(%"class.std::unordered_set") align 8, ptr noundef) #0

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7maliput7utility24AnalyzeConfluentSegmentsEPKNS_3api12RoadGeometryE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i1, align 1
  %6 = alloca %"class.std::unordered_set", align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %"class.std::unordered_set", align 8
  %15 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %16 = alloca %"struct.std::__detail::_Node_iterator", align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  store i1 false, ptr %5, align 1
  call void @_ZNSt6vectorISt13unordered_setIPKN7maliput3api7SegmentESt4hashIS5_ESt8equal_toIS5_ESaIS5_EESaISB_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  call void @llvm.lifetime.start.p0(i64 56, ptr %6) #4
  call void @_ZNSt13unordered_setIPKN7maliput3api7SegmentESt4hashIS4_ESt8equal_toIS4_ESaIS4_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %17

17:                                               ; preds = %106, %2
  %18 = load i32, ptr %7, align 4, !tbaa !9
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = invoke noundef i32 @_ZNK7maliput3api12RoadGeometry13num_junctionsEv(ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %21 unwind label %24

21:                                               ; preds = %17
  %22 = icmp slt i32 %18, %20
  br i1 %22, label %28, label %23

23:                                               ; preds = %21
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %111

24:                                               ; preds = %17
  %25 = landingpad { ptr, i32 }
          cleanup
  %26 = extractvalue { ptr, i32 } %25, 0
  store ptr %26, ptr %8, align 8
  %27 = extractvalue { ptr, i32 } %25, 1
  store i32 %27, ptr %9, align 4
  br label %110

28:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = load i32, ptr %7, align 4, !tbaa !9
  %31 = invoke noundef ptr @_ZNK7maliput3api12RoadGeometry8junctionEi(ptr noundef nonnull align 8 dereferenceable(8) %29, i32 noundef %30)
          to label %32 unwind label %36

32:                                               ; preds = %28
  store ptr %31, ptr %11, align 8, !tbaa !5
  %33 = load ptr, ptr %11, align 8, !tbaa !5
  %34 = icmp ne ptr %33, null
  br i1 %34, label %40, label %35

35:                                               ; preds = %32
  store i32 4, ptr %10, align 4
  br label %103

36:                                               ; preds = %28
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %8, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %9, align 4
  br label %109

40:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %88, %40
  %42 = load i32, ptr %12, align 4, !tbaa !9
  %43 = load ptr, ptr %11, align 8, !tbaa !5
  %44 = invoke noundef i32 @_ZNK7maliput3api8Junction12num_segmentsEv(ptr noundef nonnull align 8 dereferenceable(8) %43)
          to label %45 unwind label %48

45:                                               ; preds = %41
  %46 = icmp slt i32 %42, %44
  br i1 %46, label %52, label %47

47:                                               ; preds = %45
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %102

48:                                               ; preds = %41
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %8, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %9, align 4
  br label %101

52:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  %54 = load i32, ptr %12, align 4, !tbaa !9
  %55 = invoke noundef ptr @_ZNK7maliput3api8Junction7segmentEi(ptr noundef nonnull align 8 dereferenceable(8) %53, i32 noundef %54)
          to label %56 unwind label %61

56:                                               ; preds = %52
  store ptr %55, ptr %13, align 8, !tbaa !5
  %57 = invoke noundef i64 @_ZNKSt13unordered_setIPKN7maliput3api7SegmentESt4hashIS4_ESt8equal_toIS4_ESaIS4_EE5countERKS4_(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %58 unwind label %61

58:                                               ; preds = %56
  %59 = icmp ugt i64 %57, 0
  br i1 %59, label %60, label %65

60:                                               ; preds = %58
  store i32 7, ptr %10, align 4
  br label %85

61:                                               ; preds = %69, %56, %52
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %8, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %9, align 4
  br label %100

65:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 56, ptr %14) #4
  %66 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZN7maliput7utility21FindConfluentSegmentsEPKNS_3api7SegmentE(ptr dead_on_unwind writable sret(%"class.std::unordered_set") align 8 %14, ptr noundef %66)
          to label %67 unwind label %91

67:                                               ; preds = %65
  %68 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_setIPKN7maliput3api7SegmentESt4hashIS5_ESt8equal_toIS5_ESaIS5_EESaISB_EE12emplace_backIJSB_EEERSB_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(56) %14)
          to label %69 unwind label %95

69:                                               ; preds = %67
  call void @_ZNSt13unordered_setIPKN7maliput3api7SegmentESt4hashIS4_ESt8equal_toIS4_ESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr %14) #4
  %70 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_setIPKN7maliput3api7SegmentESt4hashIS5_ESt8equal_toIS5_ESaIS5_EESaISB_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %71 = call ptr @_ZNSt13unordered_setIPKN7maliput3api7SegmentESt4hashIS4_ESt8equal_toIS4_ESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %70) #4
  %72 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %15, i32 0, i32 0
  %73 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %72, i32 0, i32 0
  store ptr %71, ptr %73, align 8
  %74 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_setIPKN7maliput3api7SegmentESt4hashIS5_ESt8equal_toIS5_ESaIS5_EESaISB_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %75 = call ptr @_ZNSt13unordered_setIPKN7maliput3api7SegmentESt4hashIS4_ESt8equal_toIS4_ESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %74) #4
  %76 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %16, i32 0, i32 0
  %77 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %76, i32 0, i32 0
  store ptr %75, ptr %77, align 8
  %78 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %15, i32 0, i32 0
  %79 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %78, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8
  %81 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %16, i32 0, i32 0
  %82 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8
  invoke void @_ZNSt13unordered_setIPKN7maliput3api7SegmentESt4hashIS4_ESt8equal_toIS4_ESaIS4_EE6insertINSt8__detail14_Node_iteratorIS4_Lb1ELb0EEEEEvT_SF_(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr %80, ptr %83)
          to label %84 unwind label %61

84:                                               ; preds = %69
  store i32 0, ptr %10, align 4
  br label %85

85:                                               ; preds = %84, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  %86 = load i32, ptr %10, align 4
  switch i32 %86, label %120 [
    i32 0, label %87
    i32 7, label %88
  ]

87:                                               ; preds = %85
  br label %88

88:                                               ; preds = %87, %85
  %89 = load i32, ptr %12, align 4, !tbaa !9
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %12, align 4, !tbaa !9
  br label %41, !llvm.loop !11

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

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

99:                                               ; preds = %95, %91
  call void @llvm.lifetime.end.p0(i64 56, ptr %14) #4
  br label %100

100:                                              ; preds = %99, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %101

101:                                              ; preds = %100, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %109

102:                                              ; preds = %47
  store i32 0, ptr %10, align 4
  br label %103

103:                                              ; preds = %102, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  %104 = load i32, ptr %10, align 4
  switch i32 %104, label %120 [
    i32 0, label %105
    i32 4, label %106
  ]

105:                                              ; preds = %103
  br label %106

106:                                              ; preds = %105, %103
  %107 = load i32, ptr %7, align 4, !tbaa !9
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %7, align 4, !tbaa !9
  br label %17, !llvm.loop !13

109:                                              ; preds = %101, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %110

110:                                              ; preds = %109, %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @_ZNSt13unordered_setIPKN7maliput3api7SegmentESt4hashIS4_ESt8equal_toIS4_ESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr %6) #4
  call void @_ZNSt6vectorISt13unordered_setIPKN7maliput3api7SegmentESt4hashIS5_ESt8equal_toIS5_ESaIS5_EESaISB_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  br label %115

111:                                              ; preds = %23
  store i1 true, ptr %5, align 1
  store i32 1, ptr %10, align 4
  call void @_ZNSt13unordered_setIPKN7maliput3api7SegmentESt4hashIS4_ESt8equal_toIS4_ESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr %6) #4
  %112 = load i1, ptr %5, align 1
  br i1 %112, label %114, label %113

113:                                              ; preds = %111
  call void @_ZNSt6vectorISt13unordered_setIPKN7maliput3api7SegmentESt4hashIS5_ESt8equal_toIS5_ESaIS5_EESaISB_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  br label %114

114:                                              ; preds = %113, %111
  ret void

115:                                              ; preds = %110
  %116 = load ptr, ptr %8, align 8
  %117 = load i32, ptr %9, align 4
  %118 = insertvalue { ptr, i32 } poison, ptr %116, 0
  %119 = insertvalue { ptr, i32 } %118, i32 %117, 1
  resume { ptr, i32 } %119

120:                                              ; preds = %103, %85
  unreachable
}

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt13unordered_setIPKN7maliput3api7SegmentESt4hashIS5_ESt8equal_toIS5_ESaIS5_EESaISB_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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


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

%"class.std::unordered_set" = 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::unordered_set<const maliput::api::Segment *>, std::allocator<std::unordered_set<const maliput::api::Segment *>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unordered_set<const maliput::api::Segment *>, std::allocator<std::unordered_set<const maliput::api::Segment *>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unordered_set<const maliput::api::Segment *>, std::allocator<std::unordered_set<const maliput::api::Segment *>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unordered_set<const maliput::api::Segment *>, std::allocator<std::unordered_set<const maliput::api::Segment *>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maliput7utility21FindConfluentSegmentsEPKNS_3api7SegmentE(ptr dead_on_unwind noalias writable sret(%"class.std::unordered_set") align 8, ptr noundef) local_unnamed_addr #0

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt13unordered_setIPKN7maliput3api7SegmentESt4hashIS4_ESt8equal_toIS4_ESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(56)) local_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) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7maliput7utility24AnalyzeConfluentSegmentsEPKNS_3api12RoadGeometryE(ptr dead_on_unwind noalias nonnull writable sret(%"class.std::vector") align 8 %0, ptr noundef %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::unordered_set", align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::unordered_set", align 8
  tail call void @_ZNSt6vectorISt13unordered_setIPKN7maliput3api7SegmentESt4hashIS5_ESt8equal_toIS5_ESaIS5_EESaISB_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %3) #4
  call void @_ZNSt13unordered_setIPKN7maliput3api7SegmentESt4hashIS4_ESt8equal_toIS4_ESaIS4_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #4
  br label %6

6:                                                ; preds = %.loopexit, %2
  %.0 = phi i32 [ 0, %2 ], [ %47, %.loopexit ]
  %7 = invoke noundef i32 @_ZNK7maliput3api12RoadGeometry13num_junctionsEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %8 unwind label %11

8:                                                ; preds = %6
  %9 = icmp slt i32 %.0, %7
  br i1 %9, label %13, label %10

10:                                               ; preds = %8
  call void @_ZNSt13unordered_setIPKN7maliput3api7SegmentESt4hashIS4_ESt8equal_toIS4_ESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #4
  ret void

11:                                               ; preds = %6
  %12 = landingpad { ptr, i32 }
          cleanup
  br label %48

13:                                               ; preds = %8
  %14 = invoke noundef ptr @_ZNK7maliput3api12RoadGeometry8junctionEi(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %.0)
          to label %15 unwind label %16

15:                                               ; preds = %13
  %.not = icmp eq ptr %14, null
  br i1 %.not, label %.loopexit, label %.preheader

16:                                               ; preds = %13
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %48

.preheader:                                       ; preds = %15, %39
  %.014 = phi i32 [ %40, %39 ], [ 0, %15 ]
  %18 = invoke noundef i32 @_ZNK7maliput3api8Junction12num_segmentsEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %19 unwind label %21

19:                                               ; preds = %.preheader
  %20 = icmp slt i32 %.014, %18
  br i1 %20, label %23, label %.loopexit

21:                                               ; preds = %.preheader
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %48

23:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %24 = invoke noundef ptr @_ZNK7maliput3api8Junction7segmentEi(ptr noundef nonnull align 8 dereferenceable(8) %14, i32 noundef %.014)
          to label %25 unwind label %28

25:                                               ; preds = %23
  store ptr %24, ptr %4, align 8, !tbaa !5
  %26 = invoke noundef i64 @_ZNKSt13unordered_setIPKN7maliput3api7SegmentESt4hashIS4_ESt8equal_toIS4_ESaIS4_EE5countERKS4_(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %27 unwind label %28

27:                                               ; preds = %25
  %.not22 = icmp eq i64 %26, 0
  br i1 %.not22, label %30, label %39

28:                                               ; preds = %34, %25, %23
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %46

30:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %5) #4
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN7maliput7utility21FindConfluentSegmentsEPKNS_3api7SegmentE(ptr dead_on_unwind nonnull writable sret(%"class.std::unordered_set") align 8 %5, ptr noundef %31)
          to label %32 unwind label %41

32:                                               ; preds = %30
  %33 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_setIPKN7maliput3api7SegmentESt4hashIS5_ESt8equal_toIS5_ESaIS5_EESaISB_EE12emplace_backIJSB_EEERSB_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(56) %5)
          to label %34 unwind label %43

34:                                               ; preds = %32
  call void @_ZNSt13unordered_setIPKN7maliput3api7SegmentESt4hashIS4_ESt8equal_toIS4_ESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #4
  %35 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_setIPKN7maliput3api7SegmentESt4hashIS5_ESt8equal_toIS5_ESaIS5_EESaISB_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %36 = call ptr @_ZNSt13unordered_setIPKN7maliput3api7SegmentESt4hashIS4_ESt8equal_toIS4_ESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %35) #4
  %37 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorISt13unordered_setIPKN7maliput3api7SegmentESt4hashIS5_ESt8equal_toIS5_ESaIS5_EESaISB_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %38 = call ptr @_ZNSt13unordered_setIPKN7maliput3api7SegmentESt4hashIS4_ESt8equal_toIS4_ESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %37) #4
  invoke void @_ZNSt13unordered_setIPKN7maliput3api7SegmentESt4hashIS4_ESt8equal_toIS4_ESaIS4_EE6insertINSt8__detail14_Node_iteratorIS4_Lb1ELb0EEEEEvT_SF_(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr %36, ptr %38)
          to label %39 unwind label %28

39:                                               ; preds = %34, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %40 = add nuw nsw i32 %.014, 1
  br label %.preheader, !llvm.loop !9

41:                                               ; preds = %30
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %45

43:                                               ; preds = %32
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt13unordered_setIPKN7maliput3api7SegmentESt4hashIS4_ESt8equal_toIS4_ESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #4
  br label %45

45:                                               ; preds = %43, %41
  %.pn = phi { ptr, i32 } [ %44, %43 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #4
  br label %46

46:                                               ; preds = %45, %28
  %.pn24 = phi { ptr, i32 } [ %29, %28 ], [ %.pn, %45 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %48

.loopexit:                                        ; preds = %19, %15
  %47 = add nuw nsw i32 %.0, 1
  br label %6, !llvm.loop !11

48:                                               ; preds = %16, %46, %21, %11
  %.pn24.pn.pn.pn = phi { ptr, i32 } [ %12, %11 ], [ %17, %16 ], [ %.pn24, %46 ], [ %22, %21 ]
  call void @_ZNSt13unordered_setIPKN7maliput3api7SegmentESt4hashIS4_ESt8equal_toIS4_ESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #4
  call void @_ZNSt6vectorISt13unordered_setIPKN7maliput3api7SegmentESt4hashIS5_ESt8equal_toIS5_ESaIS5_EESaISB_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  resume { ptr, i32 } %.pn24.pn.pn.pn
}

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt13unordered_setIPKN7maliput3api7SegmentESt4hashIS5_ESt8equal_toIS5_ESaIS5_EESaISB_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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


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