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

; 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Student, std::allocator<Student>>::_Vector_impl" }
%"struct.std::_Vector_base<Student, std::allocator<Student>>::_Vector_impl" = type { %"struct.std::_Vector_base<Student, std::allocator<Student>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Student, std::allocator<Student>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Student = type { [64 x i8], i32, i32, i32, i32, [16 x i32], i32 }
%"class.__gnu_cxx::__normal_iterator" = 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
@__FUNCTION__._Z5test1v = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z19stl_student_compareRK7StudentS1_(ptr noundef nonnull align 4 dereferenceable(148), ptr noundef nonnull align 4 dereferenceable(148)) #0

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5test1v() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector", align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %struct.Student, align 4
  %8 = alloca i32, align 4
  %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 24, ptr %1) #5
  call void @_ZNSt6vectorI7StudentSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  %11 = invoke ptr @ListCreate(i32 noundef -1, ptr noundef null)
          to label %12 unwind label %17

12:                                               ; preds = %0
  store ptr %11, 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 %13

13:                                               ; preds = %58, %12
  %14 = load i32, ptr %5, align 4, !tbaa !9
  %15 = icmp slt i32 %14, 100000
  br i1 %15, label %21, label %16

16:                                               ; preds = %13
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %66

17:                                               ; preds = %83, %81, %79, %78, %76, %67, %66, %0
  %18 = landingpad { ptr, i32 }
          cleanup
  %19 = extractvalue { ptr, i32 } %18, 0
  store ptr %19, ptr %3, align 8
  %20 = extractvalue { ptr, i32 } %18, 1
  store i32 %20, ptr %4, align 4
  br label %86

21:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 148, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %41, %21
  %23 = load i32, ptr %8, align 4, !tbaa !9
  %24 = icmp slt i32 %23, 16
  br i1 %24, label %26, label %25

25:                                               ; preds = %22
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %48

26:                                               ; preds = %22
  %27 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %28 unwind label %44

28:                                               ; preds = %26
  %29 = getelementptr inbounds %struct.Student, ptr %7, i32 0, i32 5
  %30 = load i32, ptr %8, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [16 x i32], ptr %29, i64 0, i64 %31
  store i32 %27, ptr %32, align 4, !tbaa !9
  %33 = getelementptr inbounds %struct.Student, ptr %7, i32 0, i32 5
  %34 = load i32, ptr %8, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [16 x i32], ptr %33, i64 0, i64 %35
  %37 = load i32, ptr %36, align 4, !tbaa !9
  %38 = getelementptr inbounds %struct.Student, ptr %7, i32 0, i32 6
  %39 = load i32, ptr %38, align 4, !tbaa !11
  %40 = add nsw i32 %39, %37
  store i32 %40, ptr %38, align 4, !tbaa !11
  br label %41

41:                                               ; preds = %28
  %42 = load i32, ptr %8, align 4, !tbaa !9
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %8, align 4, !tbaa !9
  br label %22, !llvm.loop !13

44:                                               ; preds = %26
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %3, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %65

48:                                               ; preds = %25
  %49 = getelementptr inbounds %struct.Student, ptr %7, i32 0, i32 6
  %50 = load i32, ptr %49, align 4, !tbaa !11
  %51 = add nsw i32 %50, 8
  %52 = sdiv i32 %51, 16
  %53 = getelementptr inbounds %struct.Student, ptr %7, i32 0, i32 6
  store i32 %52, ptr %53, align 4, !tbaa !11
  invoke void @_ZNSt6vectorI7StudentSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(148) %7)
          to label %54 unwind label %61

54:                                               ; preds = %48
  %55 = load ptr, ptr %2, align 8, !tbaa !5
  %56 = invoke ptr @mListWrite(ptr noundef %55, i32 noundef -1, ptr noundef %7, i32 noundef 148)
          to label %57 unwind label %61

57:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 148, ptr %7) #5
  br label %58

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

61:                                               ; preds = %54, %48
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %3, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %4, align 4
  br label %65

65:                                               ; preds = %61, %44
  call void @llvm.lifetime.end.p0(i64 148, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %86

66:                                               ; preds = %16
  invoke void @_mTimerBegin(ptr noundef @.str)
          to label %67 unwind label %17

67:                                               ; preds = %66
  %68 = call ptr @_ZNSt6vectorI7StudentSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %69 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %68, ptr %69, align 8
  %70 = call ptr @_ZNSt6vectorI7StudentSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %71 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %70, ptr %71, align 8
  %72 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8
  %74 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP7StudentSt6vectorIS2_SaIS2_EEEEPFbRKS2_S9_EEvT_SC_T0_(ptr %73, ptr %75, ptr noundef @_Z19stl_student_compareRK7StudentS1_)
          to label %76 unwind label %17

76:                                               ; preds = %67
  %77 = invoke float @_mTimerEnd(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 50, ptr noundef @__FUNCTION__._Z5test1v)
          to label %78 unwind label %17

78:                                               ; preds = %76
  invoke void @_mTimerBegin(ptr noundef @.str.2)
          to label %79 unwind label %17

79:                                               ; preds = %78
  %80 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @mListSort(ptr noundef %80, ptr noundef @_Z20morn_student_comparePvS_S_, ptr noundef null)
          to label %81 unwind label %17

81:                                               ; preds = %79
  %82 = invoke float @_mTimerEnd(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 54, ptr noundef @__FUNCTION__._Z5test1v)
          to label %83 unwind label %17

83:                                               ; preds = %81
  %84 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @mListRelease(ptr noundef %84)
          to label %85 unwind label %17

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

86:                                               ; preds = %65, %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  call void @_ZNSt6vectorI7StudentSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %1) #5
  br label %87

87:                                               ; preds = %86
  %88 = load ptr, ptr %3, align 8
  %89 = load i32, ptr %4, align 4
  %90 = insertvalue { ptr, i32 } poison, ptr %88, 0
  %91 = insertvalue { ptr, i32 } %90, i32 %89, 1
  resume { ptr, i32 } %91
}

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

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

declare ptr @ListCreate(i32 noundef, ptr noundef) #3

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI7StudentSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(148)) #1 align 2

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

declare void @_mTimerBegin(ptr noundef) #3

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

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

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

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

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

declare void @mListRelease(ptr noundef) #3

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

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 144}
!12 = !{!"_ZTS7Student", !7, i64 0, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !7, i64 80, !10, i64 144}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Student, std::allocator<Student>>::_Vector_impl" }
%"struct.std::_Vector_base<Student, std::allocator<Student>>::_Vector_impl" = type { %"struct.std::_Vector_base<Student, std::allocator<Student>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Student, std::allocator<Student>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Student = type { [64 x i8], i32, i32, i32, i32, [16 x 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
@__FUNCTION__._Z5test1v = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z19stl_student_compareRK7StudentS1_(ptr noundef nonnull align 4 dereferenceable(148), ptr noundef nonnull align 4 dereferenceable(148)) #0

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5test1v() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector", align 8
  %2 = alloca %struct.Student, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #5
  call void @_ZNSt6vectorI7StudentSaIS0_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 %22

.preheader:                                       ; preds = %0
  %4 = getelementptr inbounds i8, ptr %2, i64 80
  %5 = getelementptr inbounds i8, ptr %2, i64 144
  %6 = getelementptr inbounds i8, ptr %2, i64 84
  %7 = getelementptr inbounds i8, ptr %2, i64 88
  %8 = getelementptr inbounds i8, ptr %2, i64 92
  %9 = getelementptr inbounds i8, ptr %2, i64 96
  %10 = getelementptr inbounds i8, ptr %2, i64 100
  %11 = getelementptr inbounds i8, ptr %2, i64 104
  %12 = getelementptr inbounds i8, ptr %2, i64 108
  %13 = getelementptr inbounds i8, ptr %2, i64 112
  %14 = getelementptr inbounds i8, ptr %2, i64 116
  %15 = getelementptr inbounds i8, ptr %2, i64 120
  %16 = getelementptr inbounds i8, ptr %2, i64 124
  %17 = getelementptr inbounds i8, ptr %2, i64 128
  %18 = getelementptr inbounds i8, ptr %2, i64 132
  %19 = getelementptr inbounds i8, ptr %2, i64 136
  %20 = getelementptr inbounds i8, ptr %2, i64 140
  br label %24

21:                                               ; preds = %95
  invoke void @_mTimerBegin(ptr noundef nonnull @.str)
          to label %100 unwind label %22

22:                                               ; preds = %109, %107, %106, %105, %103, %100, %21, %0
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %111

24:                                               ; preds = %.preheader, %95
  %.01418 = phi i32 [ 0, %.preheader ], [ %96, %95 ]
  call void @llvm.lifetime.start.p0(i64 148, ptr nonnull %2) #5
  %25 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %26 unwind label %91

26:                                               ; preds = %24
  store i32 %25, ptr %4, align 4, !tbaa !5
  %27 = load i32, ptr %5, align 4, !tbaa !9
  %28 = add nsw i32 %27, %25
  store i32 %28, ptr %5, align 4, !tbaa !9
  %29 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %30 unwind label %91

30:                                               ; preds = %26
  store i32 %29, ptr %6, align 4, !tbaa !5
  %31 = load i32, ptr %5, align 4, !tbaa !9
  %32 = add nsw i32 %31, %29
  store i32 %32, ptr %5, align 4, !tbaa !9
  %33 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %34 unwind label %91

34:                                               ; preds = %30
  store i32 %33, ptr %7, align 4, !tbaa !5
  %35 = load i32, ptr %5, align 4, !tbaa !9
  %36 = add nsw i32 %35, %33
  store i32 %36, ptr %5, align 4, !tbaa !9
  %37 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %38 unwind label %91

38:                                               ; preds = %34
  store i32 %37, ptr %8, align 4, !tbaa !5
  %39 = load i32, ptr %5, align 4, !tbaa !9
  %40 = add nsw i32 %39, %37
  store i32 %40, ptr %5, align 4, !tbaa !9
  %41 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %42 unwind label %91

42:                                               ; preds = %38
  store i32 %41, ptr %9, align 4, !tbaa !5
  %43 = load i32, ptr %5, align 4, !tbaa !9
  %44 = add nsw i32 %43, %41
  store i32 %44, ptr %5, align 4, !tbaa !9
  %45 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %46 unwind label %91

46:                                               ; preds = %42
  store i32 %45, ptr %10, align 4, !tbaa !5
  %47 = load i32, ptr %5, align 4, !tbaa !9
  %48 = add nsw i32 %47, %45
  store i32 %48, ptr %5, align 4, !tbaa !9
  %49 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %50 unwind label %91

50:                                               ; preds = %46
  store i32 %49, ptr %11, align 4, !tbaa !5
  %51 = load i32, ptr %5, align 4, !tbaa !9
  %52 = add nsw i32 %51, %49
  store i32 %52, ptr %5, align 4, !tbaa !9
  %53 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %54 unwind label %91

54:                                               ; preds = %50
  store i32 %53, ptr %12, align 4, !tbaa !5
  %55 = load i32, ptr %5, align 4, !tbaa !9
  %56 = add nsw i32 %55, %53
  store i32 %56, ptr %5, align 4, !tbaa !9
  %57 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %58 unwind label %91

58:                                               ; preds = %54
  store i32 %57, ptr %13, align 4, !tbaa !5
  %59 = load i32, ptr %5, align 4, !tbaa !9
  %60 = add nsw i32 %59, %57
  store i32 %60, ptr %5, align 4, !tbaa !9
  %61 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %62 unwind label %91

62:                                               ; preds = %58
  store i32 %61, ptr %14, align 4, !tbaa !5
  %63 = load i32, ptr %5, align 4, !tbaa !9
  %64 = add nsw i32 %63, %61
  store i32 %64, ptr %5, align 4, !tbaa !9
  %65 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %66 unwind label %91

66:                                               ; preds = %62
  store i32 %65, ptr %15, align 4, !tbaa !5
  %67 = load i32, ptr %5, align 4, !tbaa !9
  %68 = add nsw i32 %67, %65
  store i32 %68, ptr %5, align 4, !tbaa !9
  %69 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %70 unwind label %91

70:                                               ; preds = %66
  store i32 %69, ptr %16, align 4, !tbaa !5
  %71 = load i32, ptr %5, align 4, !tbaa !9
  %72 = add nsw i32 %71, %69
  store i32 %72, ptr %5, align 4, !tbaa !9
  %73 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %74 unwind label %91

74:                                               ; preds = %70
  store i32 %73, ptr %17, align 4, !tbaa !5
  %75 = load i32, ptr %5, align 4, !tbaa !9
  %76 = add nsw i32 %75, %73
  store i32 %76, ptr %5, align 4, !tbaa !9
  %77 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %78 unwind label %91

78:                                               ; preds = %74
  store i32 %77, ptr %18, align 4, !tbaa !5
  %79 = load i32, ptr %5, align 4, !tbaa !9
  %80 = add nsw i32 %79, %77
  store i32 %80, ptr %5, align 4, !tbaa !9
  %81 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %82 unwind label %91

82:                                               ; preds = %78
  store i32 %81, ptr %19, align 4, !tbaa !5
  %83 = load i32, ptr %5, align 4, !tbaa !9
  %84 = add nsw i32 %83, %81
  store i32 %84, ptr %5, align 4, !tbaa !9
  %85 = invoke i32 @m_Rand(i32 noundef 0, i32 noundef 10000)
          to label %86 unwind label %91

86:                                               ; preds = %82
  store i32 %85, ptr %20, align 4, !tbaa !5
  %87 = load i32, ptr %5, align 4, !tbaa !9
  %88 = add nsw i32 %87, %85
  %89 = add nsw i32 %88, 8
  %90 = sdiv i32 %89, 16
  store i32 %90, ptr %5, align 4, !tbaa !9
  invoke void @_ZNSt6vectorI7StudentSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(148) %2)
          to label %93 unwind label %97

91:                                               ; preds = %82, %78, %74, %70, %66, %62, %58, %54, %50, %46, %42, %38, %34, %30, %26, %24
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %99

93:                                               ; preds = %86
  %94 = invoke ptr @mListWrite(ptr noundef %3, i32 noundef -1, ptr noundef nonnull %2, i32 noundef 148)
          to label %95 unwind label %97

95:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 148, ptr nonnull %2) #5
  %96 = add nuw nsw i32 %.01418, 1
  %exitcond.not = icmp eq i32 %96, 100000
  br i1 %exitcond.not, label %21, label %24, !llvm.loop !11

97:                                               ; preds = %93, %86
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %99

99:                                               ; preds = %97, %91
  %.pn = phi { ptr, i32 } [ %92, %91 ], [ %98, %97 ]
  call void @llvm.lifetime.end.p0(i64 148, ptr nonnull %2) #5
  br label %111

100:                                              ; preds = %21
  %101 = call ptr @_ZNSt6vectorI7StudentSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %102 = call ptr @_ZNSt6vectorI7StudentSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP7StudentSt6vectorIS2_SaIS2_EEEEPFbRKS2_S9_EEvT_SC_T0_(ptr %101, ptr %102, ptr noundef nonnull @_Z19stl_student_compareRK7StudentS1_)
          to label %103 unwind label %22

103:                                              ; preds = %100
  %104 = invoke float @_mTimerEnd(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 50, ptr noundef nonnull @__FUNCTION__._Z5test1v)
          to label %105 unwind label %22

105:                                              ; preds = %103
  invoke void @_mTimerBegin(ptr noundef nonnull @.str.2)
          to label %106 unwind label %22

106:                                              ; preds = %105
  invoke void @mListSort(ptr noundef %3, ptr noundef nonnull @_Z20morn_student_comparePvS_S_, ptr noundef null)
          to label %107 unwind label %22

107:                                              ; preds = %106
  %108 = invoke float @_mTimerEnd(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 54, ptr noundef nonnull @__FUNCTION__._Z5test1v)
          to label %109 unwind label %22

109:                                              ; preds = %107
  invoke void @mListRelease(ptr noundef %3)
          to label %110 unwind label %22

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

111:                                              ; preds = %99, %22
  %.pn.pn = phi { ptr, i32 } [ %.pn, %99 ], [ %23, %22 ]
  call void @_ZNSt6vectorI7StudentSaIS0_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.pn
}

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

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

declare ptr @ListCreate(i32 noundef, ptr noundef) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare void @_mTimerBegin(ptr noundef) local_unnamed_addr #3

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

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

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

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

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

declare void @mListRelease(ptr noundef) local_unnamed_addr #3

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

attributes #0 = { 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 #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 144}
!10 = !{!"_ZTS7Student", !7, i64 0, !6, i64 64, !6, i64 68, !6, i64 72, !6, i64 76, !7, i64 80, !6, i64 144}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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