; LLVM IR from adrian17/cpp-drop-merge-sort :: tests.ll (Z30test_non_default_constructiblev)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<NonDefaultConstructible, std::allocator<NonDefaultConstructible>>::_Vector_impl" }
%"struct.std::_Vector_base<NonDefaultConstructible, std::allocator<NonDefaultConstructible>>::_Vector_impl" = type { %"struct.std::_Vector_base<NonDefaultConstructible, std::allocator<NonDefaultConstructible>>::_Vector_impl_data" }
%"struct.std::_Vector_base<NonDefaultConstructible, std::allocator<NonDefaultConstructible>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.NonDefaultConstructible = type { i32 }
%"class.__gnu_cxx::__normal_iterator.13" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext) #2 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z30test_non_default_constructiblev() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector.8", align 8
  %2 = alloca i32, align 4
  %3 = alloca %struct.NonDefaultConstructible, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %1) #6
  call void @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %23, %0
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = icmp slt i32 %15, 10
  br i1 %16, label %18, label %17

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

18:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = sub nsw i32 0, %19
  invoke void @_ZN23NonDefaultConstructibleC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %3, i32 noundef %20)
          to label %21 unwind label %26

21:                                               ; preds = %18
  invoke void @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %22 unwind label %26

22:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %23

23:                                               ; preds = %22
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %2, align 4, !tbaa !5
  br label %14, !llvm.loop !9

26:                                               ; preds = %21, %18
  %27 = landingpad { ptr, i32 }
          cleanup
  %28 = extractvalue { ptr, i32 } %27, 0
  store ptr %28, ptr %4, align 8
  %29 = extractvalue { ptr, i32 } %27, 1
  store i32 %29, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %87

30:                                               ; preds = %17
  %31 = call ptr @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %32 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %6, i32 0, i32 0
  store ptr %31, ptr %32, align 8
  %33 = call ptr @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %34 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %7, i32 0, i32 0
  store ptr %33, ptr %34, align 8
  %35 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %6, i32 0, i32 0
  %36 = load ptr, ptr %35, align 8
  %37 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %7, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8
  invoke void @_Z6dmsortIN9__gnu_cxx17__normal_iteratorIP23NonDefaultConstructibleSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %36, ptr %38)
          to label %39 unwind label %49

39:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store ptr %1, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %40 = load ptr, ptr %8, align 8, !tbaa !11
  %41 = call ptr @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #6
  %42 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %9, i32 0, i32 0
  store ptr %41, ptr %42, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %43 = load ptr, ptr %8, align 8, !tbaa !11
  %44 = call ptr @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #6
  %45 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %10, i32 0, i32 0
  store ptr %44, ptr %45, align 8
  br label %46

46:                                               ; preds = %62, %39
  %47 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP23NonDefaultConstructibleSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  br i1 %47, label %53, label %48

48:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %68

49:                                               ; preds = %84, %82, %75, %72, %70, %68, %30
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %4, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %5, align 4
  br label %87

53:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP23NonDefaultConstructibleSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  store ptr %54, ptr %11, align 8, !tbaa !11
  %55 = load ptr, ptr %11, align 8, !tbaa !11
  %56 = getelementptr inbounds %struct.NonDefaultConstructible, ptr %55, i32 0, i32 0
  %57 = load i32, ptr %56, align 4, !tbaa !13
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %57)
          to label %59 unwind label %64

59:                                               ; preds = %53
  %60 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef @.str.7)
          to label %61 unwind label %64

61:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %62

62:                                               ; preds = %61
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP23NonDefaultConstructibleSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br label %46

64:                                               ; preds = %59, %53
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %4, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %87

68:                                               ; preds = %48
  %69 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %70 unwind label %49

70:                                               ; preds = %68
  %71 = invoke ptr @_ZSt5beginISt6vectorI23NonDefaultConstructibleSaIS1_EEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %72 unwind label %49

72:                                               ; preds = %70
  %73 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %12, i32 0, i32 0
  store ptr %71, ptr %73, align 8
  %74 = invoke ptr @_ZSt3endISt6vectorI23NonDefaultConstructibleSaIS1_EEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %75 unwind label %49

75:                                               ; preds = %72
  %76 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %13, i32 0, i32 0
  store ptr %74, ptr %76, align 8
  %77 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %12, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8
  %79 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %13, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8
  %81 = invoke noundef zeroext i1 @_ZSt9is_sortedIN9__gnu_cxx17__normal_iteratorIP23NonDefaultConstructibleSt6vectorIS2_SaIS2_EEEEEbT_S8_(ptr %78, ptr %80)
          to label %82 unwind label %49

82:                                               ; preds = %75
  %83 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i1 noundef zeroext %81)
          to label %84 unwind label %49

84:                                               ; preds = %82
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef @.str)
          to label %86 unwind label %49

86:                                               ; preds = %84
  call void @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %1) #6
  ret void

87:                                               ; preds = %64, %49, %26
  call void @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %1) #6
  br label %88

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN23NonDefaultConstructibleC2Ei(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6dmsortIN9__gnu_cxx17__normal_iteratorIP23NonDefaultConstructibleSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr, ptr) #2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSt9is_sortedIN9__gnu_cxx17__normal_iteratorIP23NonDefaultConstructibleSt6vectorIS2_SaIS2_EEEEEbT_S8_(ptr, ptr) #1

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTS23NonDefaultConstructible", !6, i64 0}


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<NonDefaultConstructible, std::allocator<NonDefaultConstructible>>::_Vector_impl" }
%"struct.std::_Vector_base<NonDefaultConstructible, std::allocator<NonDefaultConstructible>>::_Vector_impl" = type { %"struct.std::_Vector_base<NonDefaultConstructible, std::allocator<NonDefaultConstructible>>::_Vector_impl_data" }
%"struct.std::_Vector_base<NonDefaultConstructible, std::allocator<NonDefaultConstructible>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.NonDefaultConstructible = type { i32 }
%"class.__gnu_cxx::__normal_iterator.13" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext) local_unnamed_addr #2 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z30test_non_default_constructiblev() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector.8", align 8
  %2 = alloca %struct.NonDefaultConstructible, align 4
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #6
  call void @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @_ZN23NonDefaultConstructibleC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %2, i32 noundef 0)
  invoke void @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %5 unwind label %17

5:                                                ; preds = %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @_ZN23NonDefaultConstructibleC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %2, i32 noundef -1)
  invoke void @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %6 unwind label %17

6:                                                ; preds = %5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @_ZN23NonDefaultConstructibleC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %2, i32 noundef -2)
  invoke void @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %7 unwind label %17

7:                                                ; preds = %6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @_ZN23NonDefaultConstructibleC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %2, i32 noundef -3)
  invoke void @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %8 unwind label %17

8:                                                ; preds = %7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @_ZN23NonDefaultConstructibleC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %2, i32 noundef -4)
  invoke void @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %9 unwind label %17

9:                                                ; preds = %8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @_ZN23NonDefaultConstructibleC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %2, i32 noundef -5)
  invoke void @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %10 unwind label %17

10:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @_ZN23NonDefaultConstructibleC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %2, i32 noundef -6)
  invoke void @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %11 unwind label %17

11:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @_ZN23NonDefaultConstructibleC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %2, i32 noundef -7)
  invoke void @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %12 unwind label %17

12:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @_ZN23NonDefaultConstructibleC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %2, i32 noundef -8)
  invoke void @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %13 unwind label %17

13:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @_ZN23NonDefaultConstructibleC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %2, i32 noundef -9)
  invoke void @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %14 unwind label %17

14:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %15 = call ptr @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %16 = call ptr @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  invoke void @_Z6dmsortIN9__gnu_cxx17__normal_iteratorIP23NonDefaultConstructibleSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %15, ptr %16)
          to label %19 unwind label %24

17:                                               ; preds = %13, %12, %11, %10, %9, %8, %7, %6, %5, %0
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  br label %45

19:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %20 = call ptr @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  store ptr %20, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %21 = call ptr @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  store ptr %21, ptr %4, align 8
  %22 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP23NonDefaultConstructibleSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %22, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %31, %19
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  %23 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %36 unwind label %24

24:                                               ; preds = %42, %40, %36, %._crit_edge, %14
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %45

.lr.ph:                                           ; preds = %19, %31
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP23NonDefaultConstructibleSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %27)
          to label %29 unwind label %34

29:                                               ; preds = %.lr.ph
  %30 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull @.str.7)
          to label %31 unwind label %34

31:                                               ; preds = %29
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP23NonDefaultConstructibleSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %33 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP23NonDefaultConstructibleSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %33, label %.lr.ph, label %._crit_edge

34:                                               ; preds = %29, %.lr.ph
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br label %45

36:                                               ; preds = %._crit_edge
  %37 = call ptr @_ZSt5beginISt6vectorI23NonDefaultConstructibleSaIS1_EEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %38 = call ptr @_ZSt3endISt6vectorI23NonDefaultConstructibleSaIS1_EEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %39 = invoke noundef zeroext i1 @_ZSt9is_sortedIN9__gnu_cxx17__normal_iteratorIP23NonDefaultConstructibleSt6vectorIS2_SaIS2_EEEEEbT_S8_(ptr %37, ptr %38)
          to label %40 unwind label %24

40:                                               ; preds = %36
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i1 noundef zeroext %39)
          to label %42 unwind label %24

42:                                               ; preds = %40
  %43 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull @.str)
          to label %44 unwind label %24

44:                                               ; preds = %42
  call void @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #6
  ret void

45:                                               ; preds = %34, %24, %17
  %.pn = phi { ptr, i32 } [ %18, %17 ], [ %35, %34 ], [ %25, %24 ]
  call void @_ZNSt6vectorI23NonDefaultConstructibleSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN23NonDefaultConstructibleC2Ei(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6dmsortIN9__gnu_cxx17__normal_iteratorIP23NonDefaultConstructibleSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr, ptr) local_unnamed_addr #2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSt9is_sortedIN9__gnu_cxx17__normal_iteratorIP23NonDefaultConstructibleSt6vectorIS2_SaIS2_EEEEEbT_S8_(ptr, ptr) local_unnamed_addr #1

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 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 #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, !7, i64 0}
!6 = !{!"_ZTS23NonDefaultConstructible", !7, i64 0}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}


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