; LLVM IR from maliput/maliput :: src/maliput/api (compare)

; 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::common::ComparisonResult.11" = type { %"class.std::optional" }
%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload.base", [7 x i8] }
%"struct.std::_Optional_payload.base" = type { %"struct.std::_Optional_payload_base.base" }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<std::__cxx11::basic_string<char>>::_Storage", i8 }>
%"union.std::_Optional_payload_base<std::__cxx11::basic_string<char>>::_Storage" = 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] }
%"struct.maliput::common::ComparisonResult.13" = type { %"class.std::optional" }
%"struct.maliput::common::ComparisonResult.15" = type { %"class.std::optional" }
%"class.maliput::common::ComparisonResultCollector" = type { i32, i32, %"class.std::__cxx11::basic_string" }

@.str.53 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [108 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [48 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: mustprogress uwtable
declare dso_local void @_ZN7maliput3api7IsEqualEPKcS2_mm(ptr dead_on_unwind noalias writable sret(%"struct.maliput::common::ComparisonResult.11") align 8, ptr noundef, ptr noundef, i64 noundef, i64 noundef) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7maliput6common25ComparisonResultCollector6resultB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::optional") align 8, ptr noundef nonnull align 8 dereferenceable(40)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maliput3api7IsEqualERKNS0_10LaneSRangeES3_(ptr dead_on_unwind noalias writable sret(%"struct.maliput::common::ComparisonResult.13") align 8, ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7maliput3api7IsEqualERKSt6vectorINS0_10LaneSRangeESaIS2_EES6_(ptr dead_on_unwind noalias writable sret(%"struct.maliput::common::ComparisonResult.15") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.maliput::common::ComparisonResultCollector", align 8
  %8 = alloca %"struct.maliput::common::ComparisonResult.11", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"struct.maliput::common::ComparisonResult.13", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %7) #4
  call void @_ZN7maliput6common25ComparisonResultCollectorC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #4
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = call noundef i64 @_ZNKSt6vectorIN7maliput3api10LaneSRangeESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #4
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = call noundef i64 @_ZNKSt6vectorIN7maliput3api10LaneSRangeESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #4
  invoke void @_ZN7maliput3api7IsEqualEPKcS2_mm(ptr dead_on_unwind writable sret(%"struct.maliput::common::ComparisonResult.11") align 8 %8, ptr noundef @.str.65, ptr noundef @.str.66, i64 noundef %17, i64 noundef %19)
          to label %20 unwind label %35

20:                                               ; preds = %3
  invoke void @_ZN7maliput6common25ComparisonResultCollector9AddResultImEEvPKciS4_NS0_16ComparisonResultIT_EE(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef @.str.53, i32 noundef 297, ptr noundef @.str.64, ptr noundef %8)
          to label %21 unwind label %39

21:                                               ; preds = %20
  call void @_ZN7maliput6common16ComparisonResultImED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = call noundef i64 @_ZNKSt6vectorIN7maliput3api10LaneSRangeESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #4
  store i64 %23, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = call noundef i64 @_ZNKSt6vectorIN7maliput3api10LaneSRangeESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #4
  store i64 %25, ptr %13, align 8, !tbaa !9
  %26 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %27 unwind label %43

27:                                               ; preds = %21
  %28 = load i64, ptr %26, align 8, !tbaa !9
  %29 = trunc i64 %28 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  store i32 %29, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !11
  br label %30

30:                                               ; preds = %58, %27
  %31 = load i32, ptr %14, align 4, !tbaa !11
  %32 = load i32, ptr %11, align 4, !tbaa !11
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %47, label %34

34:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %70

35:                                               ; preds = %3
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %9, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %10, align 4
  br label %78

39:                                               ; preds = %20
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %9, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %10, align 4
  call void @_ZN7maliput6common16ComparisonResultImED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #4
  br label %78

43:                                               ; preds = %21
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %9, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %77

47:                                               ; preds = %30
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = load i32, ptr %14, align 4, !tbaa !11
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN7maliput3api10LaneSRangeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %50) #4
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = load i32, ptr %14, align 4, !tbaa !11
  %54 = sext i32 %53 to i64
  %55 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN7maliput3api10LaneSRangeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %54) #4
  invoke void @_ZN7maliput3api7IsEqualERKNS0_10LaneSRangeES3_(ptr dead_on_unwind writable sret(%"struct.maliput::common::ComparisonResult.13") align 8 %15, ptr noundef nonnull align 8 dereferenceable(48) %51, ptr noundef nonnull align 8 dereferenceable(48) %55)
          to label %56 unwind label %61

56:                                               ; preds = %47
  invoke void @_ZN7maliput6common25ComparisonResultCollector9AddResultINS_3api10LaneSRangeEEEvPKciS6_NS0_16ComparisonResultIT_EE(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef @.str.53, i32 noundef 300, ptr noundef @.str.67, ptr noundef %15)
          to label %57 unwind label %65

57:                                               ; preds = %56
  call void @_ZN7maliput6common16ComparisonResultINS_3api10LaneSRangeEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #4
  br label %58

58:                                               ; preds = %57
  %59 = load i32, ptr %14, align 4, !tbaa !11
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %14, align 4, !tbaa !11
  br label %30, !llvm.loop !13

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

65:                                               ; preds = %56
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %9, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %10, align 4
  call void @_ZN7maliput6common16ComparisonResultINS_3api10LaneSRangeEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #4
  br label %69

69:                                               ; preds = %65, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %77

70:                                               ; preds = %34
  %71 = getelementptr inbounds %"struct.maliput::common::ComparisonResult.15", ptr %0, i32 0, i32 0
  invoke void @_ZNK7maliput6common25ComparisonResultCollector6resultB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::optional") align 8 %71, ptr noundef nonnull align 8 dereferenceable(40) %7)
          to label %72 unwind label %73

72:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @_ZN7maliput6common25ComparisonResultCollectorD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #4
  ret void

73:                                               ; preds = %70
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %9, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %10, align 4
  br label %77

77:                                               ; preds = %73, %69, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %78

78:                                               ; preds = %77, %39, %35
  call void @_ZN7maliput6common25ComparisonResultCollectorD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #4
  br label %79

79:                                               ; preds = %78
  %80 = load ptr, ptr %9, align 8
  %81 = load i32, ptr %10, align 4
  %82 = insertvalue { ptr, i32 } poison, ptr %80, 0
  %83 = insertvalue { ptr, i32 } %82, i32 %81, 1
  resume { ptr, i32 } %83
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

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

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


; 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::common::ComparisonResult.11" = type { %"class.std::optional" }
%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload.base", [7 x i8] }
%"struct.std::_Optional_payload.base" = type { %"struct.std::_Optional_payload_base.base" }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<std::__cxx11::basic_string<char>>::_Storage", i8 }>
%"union.std::_Optional_payload_base<std::__cxx11::basic_string<char>>::_Storage" = 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] }
%"struct.maliput::common::ComparisonResult.13" = type { %"class.std::optional" }
%"struct.maliput::common::ComparisonResult.15" = type { %"class.std::optional" }
%"class.maliput::common::ComparisonResultCollector" = type { i32, i32, %"class.std::__cxx11::basic_string" }

@.str.53 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [108 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [48 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: mustprogress uwtable
declare dso_local void @_ZN7maliput3api7IsEqualEPKcS2_mm(ptr dead_on_unwind noalias writable sret(%"struct.maliput::common::ComparisonResult.11") align 8, ptr noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7maliput6common25ComparisonResultCollector6resultB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::optional") align 8, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maliput3api7IsEqualERKNS0_10LaneSRangeES3_(ptr dead_on_unwind noalias writable sret(%"struct.maliput::common::ComparisonResult.13") align 8, ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7maliput3api7IsEqualERKSt6vectorINS0_10LaneSRangeESaIS2_EES6_(ptr dead_on_unwind noalias writable sret(%"struct.maliput::common::ComparisonResult.15") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.maliput::common::ComparisonResultCollector", align 8
  %5 = alloca %"struct.maliput::common::ComparisonResult.11", align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %"struct.maliput::common::ComparisonResult.13", align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #4
  call void @_ZN7maliput6common25ComparisonResultCollectorC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #4
  %9 = call noundef i64 @_ZNKSt6vectorIN7maliput3api10LaneSRangeESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %10 = call noundef i64 @_ZNKSt6vectorIN7maliput3api10LaneSRangeESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  invoke void @_ZN7maliput3api7IsEqualEPKcS2_mm(ptr dead_on_unwind nonnull writable sret(%"struct.maliput::common::ComparisonResult.11") align 8 %5, ptr noundef nonnull @.str.65, ptr noundef nonnull @.str.66, i64 noundef %9, i64 noundef %10)
          to label %11 unwind label %19

11:                                               ; preds = %3
  invoke void @_ZN7maliput6common25ComparisonResultCollector9AddResultImEEvPKciS4_NS0_16ComparisonResultIT_EE(ptr noundef nonnull align 8 dereferenceable(40) %4, ptr noundef nonnull @.str.53, i32 noundef 297, ptr noundef nonnull @.str.64, ptr noundef nonnull %5)
          to label %12 unwind label %21

12:                                               ; preds = %11
  call void @_ZN7maliput6common16ComparisonResultImED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %13 = call noundef i64 @_ZNKSt6vectorIN7maliput3api10LaneSRangeESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  store i64 %13, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %14 = call noundef i64 @_ZNKSt6vectorIN7maliput3api10LaneSRangeESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  store i64 %14, ptr %7, align 8, !tbaa !5
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %16 = load i64, ptr %15, align 8, !tbaa !5
  %17 = trunc i64 %16 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %12
  %wide.trip.count = and i64 %16, 2147483647
  br label %.lr.ph

._crit_edge:                                      ; preds = %26, %12
  invoke void @_ZNK7maliput6common25ComparisonResultCollector6resultB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::optional") align 8 %0, ptr noundef nonnull align 8 dereferenceable(40) %4)
          to label %31 unwind label %32

19:                                               ; preds = %3
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %34

21:                                               ; preds = %11
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7maliput6common16ComparisonResultImED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #4
  br label %34

.lr.ph:                                           ; preds = %.lr.ph.preheader, %26
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %26 ]
  %23 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN7maliput3api10LaneSRangeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #4
  %24 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN7maliput3api10LaneSRangeESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv) #4
  invoke void @_ZN7maliput3api7IsEqualERKNS0_10LaneSRangeES3_(ptr dead_on_unwind nonnull writable sret(%"struct.maliput::common::ComparisonResult.13") align 8 %8, ptr noundef nonnull align 8 dereferenceable(48) %23, ptr noundef nonnull align 8 dereferenceable(48) %24)
          to label %25 unwind label %27

25:                                               ; preds = %.lr.ph
  invoke void @_ZN7maliput6common25ComparisonResultCollector9AddResultINS_3api10LaneSRangeEEEvPKciS6_NS0_16ComparisonResultIT_EE(ptr noundef nonnull align 8 dereferenceable(40) %4, ptr noundef nonnull @.str.53, i32 noundef 300, ptr noundef nonnull @.str.67, ptr noundef nonnull %8)
          to label %26 unwind label %29

26:                                               ; preds = %25
  call void @_ZN7maliput6common16ComparisonResultINS_3api10LaneSRangeEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

27:                                               ; preds = %.lr.ph
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %34

29:                                               ; preds = %25
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7maliput6common16ComparisonResultINS_3api10LaneSRangeEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #4
  br label %34

31:                                               ; preds = %._crit_edge
  call void @_ZN7maliput6common25ComparisonResultCollectorD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #4
  ret void

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

34:                                               ; preds = %32, %29, %27, %21, %19
  %.pn.pn.pn = phi { ptr, i32 } [ %22, %21 ], [ %20, %19 ], [ %33, %32 ], [ %30, %29 ], [ %28, %27 ]
  call void @_ZN7maliput6common25ComparisonResultCollectorD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn.pn.pn
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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