; 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.79" = type { %"class.std::optional" }
%"struct.maliput::common::ComparisonResult.108" = type { %"class.std::optional" }
%"class.maliput::common::ComparisonResultCollector" = type { i32, i32, %"class.std::__cxx11::basic_string" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [82 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [131 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [5 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: mustprogress uwtable
declare dso_local void @_ZN7maliput6common25ComparisonResultCollector9AddResultIbEEvPKciS4_NS0_16ComparisonResultIT_EE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, i32 noundef, ptr noundef, ptr noundef) #2 align 2

declare void @_ZN7maliput3api7IsEqualEPKcS2_bb(ptr dead_on_unwind writable sret(%"struct.maliput::common::ComparisonResult.79") align 8, ptr noundef, ptr noundef, i1 noundef zeroext, i1 noundef zeroext) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7maliput3api5rules7IsEqualERKSt6vectorINS1_17DiscreteValueRule13DiscreteValueESaIS4_EES8_(ptr dead_on_unwind noalias writable sret(%"struct.maliput::common::ComparisonResult.108") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #2 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.2", 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.79", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", 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) #6
  call void @_ZN7maliput6common25ComparisonResultCollectorC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #6
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = call noundef i64 @_ZNKSt6vectorIN7maliput3api5rules17DiscreteValueRule13DiscreteValueESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = call noundef i64 @_ZNKSt6vectorIN7maliput3api5rules17DiscreteValueRule13DiscreteValueESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #6
  invoke void @_ZN7maliput3api7IsEqualEPKcS2_mm(ptr dead_on_unwind writable sret(%"struct.maliput::common::ComparisonResult.2") align 8 %8, ptr noundef @.str.2, ptr noundef @.str.3, i64 noundef %21, i64 noundef %23)
          to label %24 unwind label %39

24:                                               ; preds = %3
  invoke void @_ZN7maliput6common25ComparisonResultCollector9AddResultImEEvPKciS4_NS0_16ComparisonResultIT_EE(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef @.str, i32 noundef 147, ptr noundef @.str.1, ptr noundef %8)
          to label %25 unwind label %43

25:                                               ; preds = %24
  call void @_ZN7maliput6common16ComparisonResultImED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = call noundef i64 @_ZNKSt6vectorIN7maliput3api5rules17DiscreteValueRule13DiscreteValueESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #6
  store i64 %27, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = call noundef i64 @_ZNKSt6vectorIN7maliput3api5rules17DiscreteValueRule13DiscreteValueESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #6
  store i64 %29, ptr %13, align 8, !tbaa !9
  %30 = 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 %31 unwind label %47

31:                                               ; preds = %25
  %32 = load i64, ptr %30, align 8, !tbaa !9
  %33 = trunc i64 %32 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  store i32 %33, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !11
  br label %34

34:                                               ; preds = %76, %31
  %35 = load i32, ptr %14, align 4, !tbaa !11
  %36 = load i32, ptr %11, align 4, !tbaa !11
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %51, label %38

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

39:                                               ; preds = %3
  %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
  br label %101

43:                                               ; preds = %24
  %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 @_ZN7maliput6common16ComparisonResultImED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #6
  br label %101

47:                                               ; preds = %25
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %9, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %100

51:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = call ptr @_ZNKSt6vectorIN7maliput3api5rules17DiscreteValueRule13DiscreteValueESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %52) #6
  %54 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %53, ptr %54, align 8
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = call ptr @_ZNKSt6vectorIN7maliput3api5rules17DiscreteValueRule13DiscreteValueESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %55) #6
  %57 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %56, ptr %57, align 8
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = load i32, ptr %14, align 4, !tbaa !11
  %60 = sext i32 %59 to i64
  %61 = invoke noundef nonnull align 8 dereferenceable(136) ptr @_ZNKSt6vectorIN7maliput3api5rules17DiscreteValueRule13DiscreteValueESaIS4_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %60)
          to label %62 unwind label %79

62:                                               ; preds = %51
  %63 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8
  %65 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  %66 = load ptr, ptr %65, align 8
  %67 = invoke ptr @_ZSt4findIN9__gnu_cxx17__normal_iteratorIPKN7maliput3api5rules17DiscreteValueRule13DiscreteValueESt6vectorIS6_SaIS6_EEEES6_ET_SD_SD_RKT0_(ptr %64, ptr %66, ptr noundef nonnull align 8 dereferenceable(136) %61)
          to label %68 unwind label %79

68:                                               ; preds = %62
  %69 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %67, ptr %69, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = call ptr @_ZNKSt6vectorIN7maliput3api5rules17DiscreteValueRule13DiscreteValueESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %70) #6
  %72 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %71, ptr %72, align 8
  %73 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7maliput3api5rules17DiscreteValueRule13DiscreteValueESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  invoke void @_ZN7maliput3api7IsEqualEPKcS2_bb(ptr dead_on_unwind writable sret(%"struct.maliput::common::ComparisonResult.79") align 8 %15, ptr noundef @.str.32, ptr noundef @.str.33, i1 noundef zeroext %73, i1 noundef zeroext true)
          to label %74 unwind label %83

74:                                               ; preds = %68
  invoke void @_ZN7maliput6common25ComparisonResultCollector9AddResultIbEEvPKciS4_NS0_16ComparisonResultIT_EE(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef @.str, i32 noundef 151, ptr noundef @.str.31, ptr noundef %15)
          to label %75 unwind label %87

75:                                               ; preds = %74
  call void @_ZN7maliput6common16ComparisonResultIbED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %14, align 4, !tbaa !11
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %14, align 4, !tbaa !11
  br label %34, !llvm.loop !13

79:                                               ; preds = %62, %51
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %9, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %10, align 4
  br label %92

83:                                               ; preds = %68
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %9, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %10, align 4
  br label %91

87:                                               ; preds = %74
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %9, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %10, align 4
  call void @_ZN7maliput6common16ComparisonResultIbED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #6
  br label %91

91:                                               ; preds = %87, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %92

92:                                               ; preds = %91, %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %100

93:                                               ; preds = %38
  %94 = getelementptr inbounds %"struct.maliput::common::ComparisonResult.108", ptr %0, i32 0, i32 0
  invoke void @_ZNK7maliput6common25ComparisonResultCollector6resultB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::optional") align 8 %94, ptr noundef nonnull align 8 dereferenceable(40) %7)
          to label %95 unwind label %96

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

96:                                               ; preds = %93
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %9, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %10, align 4
  br label %100

100:                                              ; preds = %96, %92, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %101

101:                                              ; preds = %100, %43, %39
  call void @_ZN7maliput6common25ComparisonResultCollectorD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #6
  br label %102

102:                                              ; preds = %101
  %103 = load ptr, ptr %9, align 8
  %104 = load i32, ptr %10, align 4
  %105 = insertvalue { ptr, i32 } poison, ptr %103, 0
  %106 = insertvalue { ptr, i32 } %105, i32 %104, 1
  resume { ptr, i32 } %106
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt4findIN9__gnu_cxx17__normal_iteratorIPKN7maliput3api5rules17DiscreteValueRule13DiscreteValueESt6vectorIS6_SaIS6_EEEES6_ET_SD_SD_RKT0_(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(136)) #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(136) ptr @_ZNKSt6vectorIN7maliput3api5rules17DiscreteValueRule13DiscreteValueESaIS4_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 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 = { inlinehint 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 #6 = { 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.79" = type { %"class.std::optional" }
%"struct.maliput::common::ComparisonResult.108" = type { %"class.std::optional" }
%"class.maliput::common::ComparisonResultCollector" = type { i32, i32, %"class.std::__cxx11::basic_string" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [82 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [131 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [5 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: mustprogress uwtable
declare dso_local void @_ZN7maliput6common25ComparisonResultCollector9AddResultIbEEvPKciS4_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_bb(ptr dead_on_unwind writable sret(%"struct.maliput::common::ComparisonResult.79") align 8, ptr noundef, ptr noundef, i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #3

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

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

13:                                               ; preds = %3
  invoke void @_ZN7maliput6common25ComparisonResultCollector9AddResultImEEvPKciS4_NS0_16ComparisonResultIT_EE(ptr noundef nonnull align 8 dereferenceable(40) %4, ptr noundef nonnull @.str, i32 noundef 147, ptr noundef nonnull @.str.1, ptr noundef nonnull %5)
          to label %14 unwind label %23

14:                                               ; preds = %13
  call void @_ZN7maliput6common16ComparisonResultImED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %15 = call noundef i64 @_ZNKSt6vectorIN7maliput3api5rules17DiscreteValueRule13DiscreteValueESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  store i64 %15, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %16 = call noundef i64 @_ZNKSt6vectorIN7maliput3api5rules17DiscreteValueRule13DiscreteValueESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  store i64 %16, ptr %7, align 8, !tbaa !5
  %17 = 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)
  %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 %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %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 = %34, %14
  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 %43 unwind label %44

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

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

.lr.ph:                                           ; preds = %.lr.ph.preheader, %34
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %34 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %25 = call ptr @_ZNKSt6vectorIN7maliput3api5rules17DiscreteValueRule13DiscreteValueESaIS4_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %26 = call ptr @_ZNKSt6vectorIN7maliput3api5rules17DiscreteValueRule13DiscreteValueESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %27 = invoke noundef nonnull align 8 dereferenceable(136) ptr @_ZNKSt6vectorIN7maliput3api5rules17DiscreteValueRule13DiscreteValueESaIS4_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv)
          to label %28 unwind label %35

28:                                               ; preds = %.lr.ph
  %29 = invoke ptr @_ZSt4findIN9__gnu_cxx17__normal_iteratorIPKN7maliput3api5rules17DiscreteValueRule13DiscreteValueESt6vectorIS6_SaIS6_EEEES6_ET_SD_SD_RKT0_(ptr %25, ptr %26, ptr noundef nonnull align 8 dereferenceable(136) %27)
          to label %30 unwind label %35

30:                                               ; preds = %28
  store ptr %29, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %31 = call ptr @_ZNKSt6vectorIN7maliput3api5rules17DiscreteValueRule13DiscreteValueESaIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  store ptr %31, ptr %10, align 8
  %32 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN7maliput3api5rules17DiscreteValueRule13DiscreteValueESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  invoke void @_ZN7maliput3api7IsEqualEPKcS2_bb(ptr dead_on_unwind nonnull writable sret(%"struct.maliput::common::ComparisonResult.79") align 8 %8, ptr noundef nonnull @.str.32, ptr noundef nonnull @.str.33, i1 noundef zeroext %32, i1 noundef zeroext true)
          to label %33 unwind label %37

33:                                               ; preds = %30
  invoke void @_ZN7maliput6common25ComparisonResultCollector9AddResultIbEEvPKciS4_NS0_16ComparisonResultIT_EE(ptr noundef nonnull align 8 dereferenceable(40) %4, ptr noundef nonnull @.str, i32 noundef 151, ptr noundef nonnull @.str.31, ptr noundef nonnull %8)
          to label %34 unwind label %39

34:                                               ; preds = %33
  call void @_ZN7maliput6common16ComparisonResultIbED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  %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

35:                                               ; preds = %28, %.lr.ph
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %42

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

39:                                               ; preds = %33
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7maliput6common16ComparisonResultIbED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #6
  br label %41

41:                                               ; preds = %39, %37
  %.pn = phi { ptr, i32 } [ %40, %39 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br label %42

42:                                               ; preds = %41, %35
  %.pn.pn = phi { ptr, i32 } [ %.pn, %41 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %46

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

44:                                               ; preds = %._crit_edge
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %46

46:                                               ; preds = %42, %44, %23, %21
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %24, %23 ], [ %22, %21 ], [ %.pn.pn, %42 ], [ %45, %44 ]
  call void @_ZN7maliput6common25ComparisonResultCollectorD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn.pn.pn.pn
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt4findIN9__gnu_cxx17__normal_iteratorIPKN7maliput3api5rules17DiscreteValueRule13DiscreteValueESt6vectorIS6_SaIS6_EEEES6_ET_SD_SD_RKT0_(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(136) ptr @_ZNKSt6vectorIN7maliput3api5rules17DiscreteValueRule13DiscreteValueESaIS4_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 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 = { inlinehint 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 #6 = { 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