; LLVM IR from maliput/maliput :: src/maliput/api/rules (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.2" = 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.290" = type { %"class.std::optional" }
%"struct.maliput::common::ComparisonResult.299" = type { %"class.std::optional" }
%"class.maliput::common::ComparisonResultCollector" = type { i32, i32, %"class.std::__cxx11::basic_string" }

@.str = external hidden unnamed_addr constant [82 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.111 = external hidden unnamed_addr constant [61 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

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

; 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) #2 align 2

declare void @_ZN7maliput3api7IsEqualEPKcS2_mm(ptr dead_on_unwind writable sret(%"struct.maliput::common::ComparisonResult.2") align 8, ptr noundef, ptr noundef, i64 noundef, i64 noundef) #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7maliput6common16ComparisonResultImED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 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)) #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maliput3api5rules7IsEqualEPKNS1_4BulbES4_(ptr dead_on_unwind noalias writable sret(%"struct.maliput::common::ComparisonResult.290") align 8, ptr noundef, ptr noundef) #2

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

26:                                               ; preds = %5
  invoke void @_ZN7maliput6common25ComparisonResultCollector9AddResultImEEvPKciS4_NS0_16ComparisonResultIT_EE(ptr noundef nonnull align 8 dereferenceable(40) %11, ptr noundef @.str, i32 noundef 432, ptr noundef @.str.111, ptr noundef %12)
          to label %27 unwind label %45

27:                                               ; preds = %26
  call void @_ZN7maliput6common16ComparisonResultImED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  %29 = call noundef i64 @_ZNKSt6vectorIPKN7maliput3api5rules4BulbESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #5
  store i64 %29, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  %31 = call noundef i64 @_ZNKSt6vectorIPKN7maliput3api5rules4BulbESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  store i64 %31, ptr %17, align 8, !tbaa !9
  %32 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %33 unwind label %49

33:                                               ; preds = %27
  %34 = load i64, ptr %32, align 8, !tbaa !9
  %35 = trunc i64 %34 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  store i32 %35, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !11
  br label %36

36:                                               ; preds = %68, %33
  %37 = load i32, ptr %18, align 4, !tbaa !11
  %38 = load i32, ptr %15, align 4, !tbaa !11
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %53, label %40

40:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %80

41:                                               ; preds = %5
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %13, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %14, align 4
  br label %88

45:                                               ; preds = %26
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %13, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %14, align 4
  call void @_ZN7maliput6common16ComparisonResultImED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %12) #5
  br label %88

49:                                               ; preds = %27
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %13, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %87

53:                                               ; preds = %36
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = load i32, ptr %18, align 4, !tbaa !11
  %56 = sext i32 %55 to i64
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPKN7maliput3api5rules4BulbESaIS5_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef %56)
          to label %58 unwind label %71

58:                                               ; preds = %53
  %59 = load ptr, ptr %57, align 8, !tbaa !5
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  %61 = load i32, ptr %18, align 4, !tbaa !11
  %62 = sext i32 %61 to i64
  %63 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPKN7maliput3api5rules4BulbESaIS5_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %62)
          to label %64 unwind label %71

64:                                               ; preds = %58
  %65 = load ptr, ptr %63, align 8, !tbaa !5
  invoke void @_ZN7maliput3api5rules7IsEqualEPKNS1_4BulbES4_(ptr dead_on_unwind writable sret(%"struct.maliput::common::ComparisonResult.290") align 8 %19, ptr noundef %59, ptr noundef %65)
          to label %66 unwind label %71

66:                                               ; preds = %64
  invoke void @_ZN7maliput6common25ComparisonResultCollector9AddResultINS_3api5rules4BulbEEEvPKciS7_NS0_16ComparisonResultIT_EE(ptr noundef nonnull align 8 dereferenceable(40) %11, ptr noundef @.str, i32 noundef 435, ptr noundef @.str.25, ptr noundef %19)
          to label %67 unwind label %75

67:                                               ; preds = %66
  call void @_ZN7maliput6common16ComparisonResultINS_3api5rules4BulbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %19) #5
  br label %68

68:                                               ; preds = %67
  %69 = load i32, ptr %18, align 4, !tbaa !11
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %18, align 4, !tbaa !11
  br label %36, !llvm.loop !13

71:                                               ; preds = %64, %58, %53
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %13, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %14, align 4
  br label %79

75:                                               ; preds = %66
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %13, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %14, align 4
  call void @_ZN7maliput6common16ComparisonResultINS_3api5rules4BulbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %19) #5
  br label %79

79:                                               ; preds = %75, %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %87

80:                                               ; preds = %40
  %81 = getelementptr inbounds %"struct.maliput::common::ComparisonResult.299", ptr %0, i32 0, i32 0
  invoke void @_ZNK7maliput6common25ComparisonResultCollector6resultB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::optional") align 8 %81, ptr noundef nonnull align 8 dereferenceable(40) %11)
          to label %82 unwind label %83

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

83:                                               ; preds = %80
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %13, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %14, align 4
  br label %87

87:                                               ; preds = %83, %79, %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %88

88:                                               ; preds = %87, %45, %41
  call void @_ZN7maliput6common25ComparisonResultCollectorD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #5
  br label %89

89:                                               ; preds = %88
  %90 = load ptr, ptr %13, align 8
  %91 = load i32, ptr %14, align 4
  %92 = insertvalue { ptr, i32 } poison, ptr %90, 0
  %93 = insertvalue { ptr, i32 } %92, i32 %91, 1
  resume { ptr, i32 } %93
}

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = { 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 = { 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.2" = 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.290" = type { %"class.std::optional" }
%"struct.maliput::common::ComparisonResult.299" = type { %"class.std::optional" }
%"class.maliput::common::ComparisonResultCollector" = type { i32, i32, %"class.std::__cxx11::basic_string" }

@.str = external hidden unnamed_addr constant [82 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.111 = external hidden unnamed_addr constant [61 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

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

; 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 #2 align 2

declare void @_ZN7maliput3api7IsEqualEPKcS2_mm(ptr dead_on_unwind writable sret(%"struct.maliput::common::ComparisonResult.2") align 8, ptr noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7maliput6common16ComparisonResultImED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 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 #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local 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 #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7maliput3api5rules7IsEqualEPKNS1_4BulbES4_(ptr dead_on_unwind noalias writable sret(%"struct.maliput::common::ComparisonResult.290") align 8, ptr noundef, ptr noundef) local_unnamed_addr #2

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

13:                                               ; preds = %5
  invoke void @_ZN7maliput6common25ComparisonResultCollector9AddResultImEEvPKciS4_NS0_16ComparisonResultIT_EE(ptr noundef nonnull align 8 dereferenceable(40) %6, ptr noundef nonnull @.str, i32 noundef 432, ptr noundef nonnull @.str.111, ptr noundef nonnull %7)
          to label %14 unwind label %23

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

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

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

21:                                               ; preds = %5
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %40

23:                                               ; preds = %13
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7maliput6common16ComparisonResultImED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #5
  br label %40

.lr.ph:                                           ; preds = %.lr.ph.preheader, %32
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %32 ]
  %25 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPKN7maliput3api5rules4BulbESaIS5_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv)
          to label %26 unwind label %33

26:                                               ; preds = %.lr.ph
  %27 = load ptr, ptr %25, align 8, !tbaa !9
  %28 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPKN7maliput3api5rules4BulbESaIS5_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv)
          to label %29 unwind label %33

29:                                               ; preds = %26
  %30 = load ptr, ptr %28, align 8, !tbaa !9
  invoke void @_ZN7maliput3api5rules7IsEqualEPKNS1_4BulbES4_(ptr dead_on_unwind nonnull writable sret(%"struct.maliput::common::ComparisonResult.290") align 8 %10, ptr noundef %27, ptr noundef %30)
          to label %31 unwind label %33

31:                                               ; preds = %29
  invoke void @_ZN7maliput6common25ComparisonResultCollector9AddResultINS_3api5rules4BulbEEEvPKciS7_NS0_16ComparisonResultIT_EE(ptr noundef nonnull align 8 dereferenceable(40) %6, ptr noundef nonnull @.str, i32 noundef 435, ptr noundef nonnull @.str.25, ptr noundef nonnull %10)
          to label %32 unwind label %35

32:                                               ; preds = %31
  call void @_ZN7maliput6common16ComparisonResultINS_3api5rules4BulbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #5
  %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 !11

33:                                               ; preds = %29, %26, %.lr.ph
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %40

35:                                               ; preds = %31
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7maliput6common16ComparisonResultINS_3api5rules4BulbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #5
  br label %40

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

38:                                               ; preds = %._crit_edge
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %40

40:                                               ; preds = %38, %35, %33, %23, %21
  %.pn.pn.pn = phi { ptr, i32 } [ %24, %23 ], [ %22, %21 ], [ %39, %38 ], [ %36, %35 ], [ %34, %33 ]
  call void @_ZN7maliput6common25ComparisonResultCollectorD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #5
  resume { ptr, i32 } %.pn.pn.pn
}

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

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

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

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


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