; LLVM IR from jingweizhanghuai/Morn :: test/test_list_sort.ll (Z5test2v)

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

%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<MImageRect, std::allocator<MImageRect>>::_Vector_impl" }
%"struct.std::_Vector_base<MImageRect, std::allocator<MImageRect>>::_Vector_impl" = type { %"struct.std::_Vector_base<MImageRect, std::allocator<MImageRect>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MImageRect, std::allocator<MImageRect>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.MImageRect = type { i32, i32, i32, i32 }
%"class.__gnu_cxx::__normal_iterator.5" = type { ptr }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@__FUNCTION__._Z5test2v = external hidden unnamed_addr constant [6 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 ptr @ListCreate(i32 noundef, ptr noundef) #1

declare i32 @__gxx_personality_v0(...)

declare i32 @m_Rand(i32 noundef, i32 noundef) #1

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

declare ptr @mListWrite(ptr noundef, i32 noundef, ptr noundef, i32 noundef) #1

declare void @_mTimerBegin(ptr noundef) #1

declare float @_mTimerEnd(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

declare void @mListSort(ptr noundef, ptr noundef, ptr noundef) #1

declare void @mListRelease(ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z16stl_rect_compareRK10MImageRectS1_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z17morn_rect_comparePvS_S_(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5test2v() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector.0", align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %struct.MImageRect, align 4
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %1) #5
  call void @_ZNSt6vectorI10MImageRectSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  %9 = invoke ptr @ListCreate(i32 noundef -1, ptr noundef null)
          to label %10 unwind label %15

10:                                               ; preds = %0
  store ptr %9, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %11

11:                                               ; preds = %42, %10
  %12 = load i32, ptr %5, align 4, !tbaa !9
  %13 = icmp slt i32 %12, 100000
  br i1 %13, label %19, label %14

14:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %49

15:                                               ; preds = %66, %64, %62, %61, %59, %50, %49, %0
  %16 = landingpad { ptr, i32 }
          cleanup
  %17 = extractvalue { ptr, i32 } %16, 0
  store ptr %17, ptr %3, align 8
  %18 = extractvalue { ptr, i32 } %16, 1
  store i32 %18, ptr %4, align 4
  br label %69

19:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #5
  %20 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %21 unwind label %45

21:                                               ; preds = %19
  %22 = getelementptr inbounds %struct.MImageRect, ptr %6, i32 0, i32 0
  store i32 %20, ptr %22, align 4, !tbaa !11
  %23 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %24 unwind label %45

24:                                               ; preds = %21
  %25 = getelementptr inbounds %struct.MImageRect, ptr %6, i32 0, i32 2
  store i32 %23, ptr %25, align 4, !tbaa !13
  %26 = getelementptr inbounds %struct.MImageRect, ptr %6, i32 0, i32 0
  %27 = load i32, ptr %26, align 4, !tbaa !11
  %28 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %29 unwind label %45

29:                                               ; preds = %24
  %30 = add nsw i32 %27, %28
  %31 = getelementptr inbounds %struct.MImageRect, ptr %6, i32 0, i32 1
  store i32 %30, ptr %31, align 4, !tbaa !14
  %32 = getelementptr inbounds %struct.MImageRect, ptr %6, i32 0, i32 2
  %33 = load i32, ptr %32, align 4, !tbaa !13
  %34 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %35 unwind label %45

35:                                               ; preds = %29
  %36 = add nsw i32 %33, %34
  %37 = getelementptr inbounds %struct.MImageRect, ptr %6, i32 0, i32 3
  store i32 %36, ptr %37, align 4, !tbaa !15
  invoke void @_ZNSt6vectorI10MImageRectSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(16) %6)
          to label %38 unwind label %45

38:                                               ; preds = %35
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %40 = invoke ptr @mListWrite(ptr noundef %39, i32 noundef -1, ptr noundef %6, i32 noundef 16)
          to label %41 unwind label %45

41:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #5
  br label %42

42:                                               ; preds = %41
  %43 = load i32, ptr %5, align 4, !tbaa !9
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %5, align 4, !tbaa !9
  br label %11, !llvm.loop !16

45:                                               ; preds = %38, %35, %29, %24, %21, %19
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %3, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %69

49:                                               ; preds = %14
  invoke void @_mTimerBegin(ptr noundef @.str)
          to label %50 unwind label %15

50:                                               ; preds = %49
  %51 = call ptr @_ZNSt6vectorI10MImageRectSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %52 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %7, i32 0, i32 0
  store ptr %51, ptr %52, align 8
  %53 = call ptr @_ZNSt6vectorI10MImageRectSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %54 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %8, i32 0, i32 0
  store ptr %53, ptr %54, align 8
  %55 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %7, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8
  %57 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %8, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP10MImageRectSt6vectorIS2_SaIS2_EEEEPFbRKS2_S9_EEvT_SC_T0_(ptr %56, ptr %58, ptr noundef @_Z16stl_rect_compareRK10MImageRectS1_)
          to label %59 unwind label %15

59:                                               ; preds = %50
  %60 = invoke float @_mTimerEnd(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 86, ptr noundef @__FUNCTION__._Z5test2v)
          to label %61 unwind label %15

61:                                               ; preds = %59
  invoke void @_mTimerBegin(ptr noundef @.str.2)
          to label %62 unwind label %15

62:                                               ; preds = %61
  %63 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @mListSort(ptr noundef %63, ptr noundef @_Z17morn_rect_comparePvS_S_, ptr noundef null)
          to label %64 unwind label %15

64:                                               ; preds = %62
  %65 = invoke float @_mTimerEnd(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 90, ptr noundef @__FUNCTION__._Z5test2v)
          to label %66 unwind label %15

66:                                               ; preds = %64
  %67 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @mListRelease(ptr noundef %67)
          to label %68 unwind label %15

68:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  call void @_ZNSt6vectorI10MImageRectSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %1) #5
  ret void

69:                                               ; preds = %45, %15
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  call void @_ZNSt6vectorI10MImageRectSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %1) #5
  br label %70

70:                                               ; preds = %69
  %71 = load ptr, ptr %3, align 8
  %72 = load i32, ptr %4, align 4
  %73 = insertvalue { ptr, i32 } poison, ptr %71, 0
  %74 = insertvalue { ptr, i32 } %73, i32 %72, 1
  resume { ptr, i32 } %74
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI10MImageRectSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(16)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP10MImageRectSt6vectorIS2_SaIS2_EEEEPFbRKS2_S9_EEvT_SC_T0_(ptr, ptr, ptr noundef) #4

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

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

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

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

%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<MImageRect, std::allocator<MImageRect>>::_Vector_impl" }
%"struct.std::_Vector_base<MImageRect, std::allocator<MImageRect>>::_Vector_impl" = type { %"struct.std::_Vector_base<MImageRect, std::allocator<MImageRect>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MImageRect, std::allocator<MImageRect>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.MImageRect = type { i32, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@__FUNCTION__._Z5test2v = external hidden unnamed_addr constant [6 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 ptr @ListCreate(i32 noundef, ptr noundef) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

declare i32 @m_Rand(i32 noundef, i32 noundef) local_unnamed_addr #1

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

declare ptr @mListWrite(ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @_mTimerBegin(ptr noundef) local_unnamed_addr #1

declare float @_mTimerEnd(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare void @mListSort(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @mListRelease(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z16stl_rect_compareRK10MImageRectS1_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z17morn_rect_comparePvS_S_(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5test2v() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector.0", align 8
  %2 = alloca %struct.MImageRect, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #5
  call void @_ZNSt6vectorI10MImageRectSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %3 = invoke ptr @ListCreate(i32 noundef -1, ptr noundef null)
          to label %.preheader unwind label %8

.preheader:                                       ; preds = %0
  %4 = getelementptr inbounds i8, ptr %2, i64 8
  %5 = getelementptr inbounds i8, ptr %2, i64 4
  %6 = getelementptr inbounds i8, ptr %2, i64 12
  br label %10

7:                                                ; preds = %25
  invoke void @_mTimerBegin(ptr noundef nonnull @.str)
          to label %29 unwind label %8

8:                                                ; preds = %38, %36, %35, %34, %32, %29, %7, %0
  %9 = landingpad { ptr, i32 }
          cleanup
  br label %40

10:                                               ; preds = %.preheader, %25
  %.0810 = phi i32 [ 0, %.preheader ], [ %26, %25 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #5
  %11 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %12 unwind label %27

12:                                               ; preds = %10
  store i32 %11, ptr %2, align 4, !tbaa !5
  %13 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %14 unwind label %27

14:                                               ; preds = %12
  store i32 %13, ptr %4, align 4, !tbaa !10
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %17 unwind label %27

17:                                               ; preds = %14
  %18 = add nsw i32 %16, %15
  store i32 %18, ptr %5, align 4, !tbaa !11
  %19 = load i32, ptr %4, align 4, !tbaa !10
  %20 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %21 unwind label %27

21:                                               ; preds = %17
  %22 = add nsw i32 %20, %19
  store i32 %22, ptr %6, align 4, !tbaa !12
  invoke void @_ZNSt6vectorI10MImageRectSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(16) %2)
          to label %23 unwind label %27

23:                                               ; preds = %21
  %24 = invoke ptr @mListWrite(ptr noundef %3, i32 noundef -1, ptr noundef nonnull %2, i32 noundef 16)
          to label %25 unwind label %27

25:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #5
  %26 = add nuw nsw i32 %.0810, 1
  %exitcond.not = icmp eq i32 %26, 100000
  br i1 %exitcond.not, label %7, label %10, !llvm.loop !13

27:                                               ; preds = %23, %21, %17, %14, %12, %10
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #5
  br label %40

29:                                               ; preds = %7
  %30 = call ptr @_ZNSt6vectorI10MImageRectSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %31 = call ptr @_ZNSt6vectorI10MImageRectSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP10MImageRectSt6vectorIS2_SaIS2_EEEEPFbRKS2_S9_EEvT_SC_T0_(ptr %30, ptr %31, ptr noundef nonnull @_Z16stl_rect_compareRK10MImageRectS1_)
          to label %32 unwind label %8

32:                                               ; preds = %29
  %33 = invoke float @_mTimerEnd(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 86, ptr noundef nonnull @__FUNCTION__._Z5test2v)
          to label %34 unwind label %8

34:                                               ; preds = %32
  invoke void @_mTimerBegin(ptr noundef nonnull @.str.2)
          to label %35 unwind label %8

35:                                               ; preds = %34
  invoke void @mListSort(ptr noundef %3, ptr noundef nonnull @_Z17morn_rect_comparePvS_S_, ptr noundef null)
          to label %36 unwind label %8

36:                                               ; preds = %35
  %37 = invoke float @_mTimerEnd(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 90, ptr noundef nonnull @__FUNCTION__._Z5test2v)
          to label %38 unwind label %8

38:                                               ; preds = %36
  invoke void @mListRelease(ptr noundef %3)
          to label %39 unwind label %8

39:                                               ; preds = %38
  call void @_ZNSt6vectorI10MImageRectSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #5
  ret void

40:                                               ; preds = %27, %8
  %.pn = phi { ptr, i32 } [ %28, %27 ], [ %9, %8 ]
  call void @_ZNSt6vectorI10MImageRectSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI10MImageRectSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP10MImageRectSt6vectorIS2_SaIS2_EEEEPFbRKS2_S9_EEvT_SC_T0_(ptr, ptr, ptr noundef) local_unnamed_addr #4

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,LoopSimplifyPass,ReassociatePass,SROAPass,SimplifyCFGPass