; LLVM IR from TheAlgorithms/C-Plus-Plus :: sorting/bogo_sort.ll (Z4testv)

; 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 }
%"struct.std::array" = type { [5 x i32] }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [18 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [81 x i8], align 1
@__PRETTY_FUNCTION__._Z4testv = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [41 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4testv() #0 {
  %1 = alloca %"struct.std::array", align 4
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"struct.std::array", align 4
  %7 = alloca %"struct.std::array", align 8
  %8 = alloca %"struct.std::array", align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"struct.std::array", align 4
  %14 = alloca %"struct.std::array", align 8
  call void @llvm.lifetime.start.p0(i64 20, ptr %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store ptr %1, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = call noundef ptr @_ZNSt5arrayIiLm5EE5beginEv(ptr noundef nonnull align 4 dereferenceable(20) %15) #8
  store ptr %16, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = call noundef ptr @_ZNSt5arrayIiLm5EE3endEv(ptr noundef nonnull align 4 dereferenceable(20) %17) #8
  store ptr %18, ptr %4, align 8, !tbaa !5
  br label %19

19:                                               ; preds = %29, %0
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = icmp ne ptr %20, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %32

24:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %25, ptr %5, align 8, !tbaa !5
  %26 = call i32 @rand() #7
  %27 = srem i32 %26, 100
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  store i32 %27, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %29

29:                                               ; preds = %24
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds i32, ptr %30, i32 1
  store ptr %31, ptr %3, align 8, !tbaa !5
  br label %19

32:                                               ; preds = %23
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  call void @_Z10show_arrayIiLm5EEvRKSt5arrayIT_XT0_EE(ptr noundef nonnull align 4 dereferenceable(20) %1)
  call void @llvm.lifetime.start.p0(i64 20, ptr %6) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 4 %1, i64 20, i1 false), !tbaa.struct !11
  call void @_ZN7sorting19randomized_bogosortIiLm5EEESt5arrayIT_XT0_EES3_(ptr dead_on_unwind writable sret(%"struct.std::array") align 4 %6, ptr noundef byval(%"struct.std::array") align 8 %7)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %1, ptr align 4 %6, i64 20, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 20, ptr %6) #7
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  call void @_Z10show_arrayIiLm5EEvRKSt5arrayIT_XT0_EE(ptr noundef nonnull align 4 dereferenceable(20) %1)
  %35 = call noundef ptr @_ZNSt5arrayIiLm5EE5beginEv(ptr noundef nonnull align 4 dereferenceable(20) %1) #8
  %36 = call noundef ptr @_ZNSt5arrayIiLm5EE3endEv(ptr noundef nonnull align 4 dereferenceable(20) %1) #8
  %37 = call noundef zeroext i1 @_ZSt9is_sortedIPiEbT_S1_(ptr noundef %35, ptr noundef %36)
  br i1 %37, label %38, label %39

38:                                               ; preds = %32
  br label %41

39:                                               ; preds = %32
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 92, ptr noundef @__PRETTY_FUNCTION__._Z4testv) #9
  unreachable

40:                                               ; No predecessors!
  br label %41

41:                                               ; preds = %40, %38
  call void @llvm.lifetime.start.p0(i64 20, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store ptr %8, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = call noundef ptr @_ZNSt5arrayIiLm5EE5beginEv(ptr noundef nonnull align 4 dereferenceable(20) %42) #8
  store ptr %43, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  %45 = call noundef ptr @_ZNSt5arrayIiLm5EE3endEv(ptr noundef nonnull align 4 dereferenceable(20) %44) #8
  store ptr %45, ptr %11, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %56, %41
  %47 = load ptr, ptr %10, align 8, !tbaa !5
  %48 = load ptr, ptr %11, align 8, !tbaa !5
  %49 = icmp ne ptr %47, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %59

51:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %52, ptr %12, align 8, !tbaa !5
  %53 = call i32 @rand() #7
  %54 = srem i32 %53, 100
  %55 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 %54, ptr %55, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %56

56:                                               ; preds = %51
  %57 = load ptr, ptr %10, align 8, !tbaa !5
  %58 = getelementptr inbounds i32, ptr %57, i32 1
  store ptr %58, ptr %10, align 8, !tbaa !5
  br label %46

59:                                               ; preds = %50
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  call void @_Z10show_arrayIiLm5EEvRKSt5arrayIT_XT0_EE(ptr noundef nonnull align 4 dereferenceable(20) %8)
  call void @llvm.lifetime.start.p0(i64 20, ptr %13) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %8, i64 20, i1 false), !tbaa.struct !11
  call void @_ZN7sorting19randomized_bogosortIiLm5EEESt5arrayIT_XT0_EES3_(ptr dead_on_unwind writable sret(%"struct.std::array") align 4 %13, ptr noundef byval(%"struct.std::array") align 8 %14)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %13, i64 20, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 20, ptr %13) #7
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  call void @_Z10show_arrayIiLm5EEvRKSt5arrayIT_XT0_EE(ptr noundef nonnull align 4 dereferenceable(20) %8)
  %62 = call noundef ptr @_ZNSt5arrayIiLm5EE5beginEv(ptr noundef nonnull align 4 dereferenceable(20) %8) #8
  %63 = call noundef ptr @_ZNSt5arrayIiLm5EE3endEv(ptr noundef nonnull align 4 dereferenceable(20) %8) #8
  %64 = call noundef zeroext i1 @_ZSt9is_sortedIPiEbT_S1_(ptr noundef %62, ptr noundef %63)
  br i1 %64, label %65, label %66

65:                                               ; preds = %59
  br label %68

66:                                               ; preds = %59
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.3, i32 noundef 103, ptr noundef @__PRETTY_FUNCTION__._Z4testv) #9
  unreachable

67:                                               ; No predecessors!
  br label %68

68:                                               ; preds = %67, %65
  call void @llvm.lifetime.end.p0(i64 20, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 20, ptr %1) #7
  ret void
}

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

; Function Attrs: mustprogress nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIiLm5EE5beginEv(ptr noundef nonnull align 4 dereferenceable(20)) #2 align 2

; Function Attrs: mustprogress nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIiLm5EE3endEv(ptr noundef nonnull align 4 dereferenceable(20)) #2 align 2

; Function Attrs: nounwind
declare i32 @rand() #3

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

; 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) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z10show_arrayIiLm5EEvRKSt5arrayIT_XT0_EE(ptr noundef nonnull align 4 dereferenceable(20)) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7sorting19randomized_bogosortIiLm5EEESt5arrayIT_XT0_EES3_(ptr dead_on_unwind noalias writable sret(%"struct.std::array") align 4, ptr noundef byval(%"struct.std::array") align 8) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind willreturn memory(none) 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 = { nounwind "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { noreturn nounwind "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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(none) }
attributes #9 = { noreturn 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 = !{i64 0, i64 20, !12}
!12 = !{!7, !7, 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 }
%"struct.std::array" = type { [5 x i32] }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [18 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [81 x i8], align 1
@__PRETTY_FUNCTION__._Z4testv = external hidden unnamed_addr constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [41 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4testv() local_unnamed_addr #0 {
  %1 = alloca %"struct.std::array", align 8
  %2 = alloca %"struct.std::array", align 4
  %3 = alloca %"struct.std::array", align 8
  %4 = alloca %"struct.std::array", align 4
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %1) #7
  %5 = call noundef ptr @_ZNSt5arrayIiLm5EE5beginEv(ptr noundef nonnull align 4 dereferenceable(20) %1) #8
  %6 = call noundef ptr @_ZNSt5arrayIiLm5EE3endEv(ptr noundef nonnull align 4 dereferenceable(20) %1) #8
  %.not18 = icmp eq ptr %5, %6
  br i1 %.not18, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %7 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  call void @_Z10show_arrayIiLm5EEvRKSt5arrayIT_XT0_EE(ptr noundef nonnull align 4 dereferenceable(20) %1)
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %2) #7
  call void @_ZN7sorting19randomized_bogosortIiLm5EEESt5arrayIT_XT0_EES3_(ptr dead_on_unwind nonnull writable sret(%"struct.std::array") align 4 %2, ptr noundef nonnull byval(%"struct.std::array") align 8 %1)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %1, ptr noundef nonnull align 4 dereferenceable(20) %2, i64 20, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %2) #7
  %8 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
  call void @_Z10show_arrayIiLm5EEvRKSt5arrayIT_XT0_EE(ptr noundef nonnull align 4 dereferenceable(20) %1)
  %9 = call noundef zeroext i1 @_ZSt9is_sortedIPiEbT_S1_(ptr noundef %5, ptr noundef %6)
  br i1 %9, label %14, label %13

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.019 = phi ptr [ %12, %.lr.ph ], [ %5, %0 ]
  %10 = call i32 @rand() #7
  %11 = srem i32 %10, 100
  store i32 %11, ptr %.019, align 4, !tbaa !9
  %12 = getelementptr inbounds i8, ptr %.019, i64 4
  %.not = icmp eq ptr %12, %6
  br i1 %.not, label %._crit_edge, label %.lr.ph

13:                                               ; preds = %._crit_edge
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 92, ptr noundef nonnull @__PRETTY_FUNCTION__._Z4testv) #9
  unreachable

14:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %3) #7
  %15 = call noundef ptr @_ZNSt5arrayIiLm5EE5beginEv(ptr noundef nonnull align 4 dereferenceable(20) %3) #8
  %16 = call noundef ptr @_ZNSt5arrayIiLm5EE3endEv(ptr noundef nonnull align 4 dereferenceable(20) %3) #8
  %.not1720 = icmp eq ptr %15, %16
  br i1 %.not1720, label %._crit_edge24, label %.lr.ph23

._crit_edge24:                                    ; preds = %.lr.ph23, %14
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  call void @_Z10show_arrayIiLm5EEvRKSt5arrayIT_XT0_EE(ptr noundef nonnull align 4 dereferenceable(20) %3)
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %4) #7
  call void @_ZN7sorting19randomized_bogosortIiLm5EEESt5arrayIT_XT0_EES3_(ptr dead_on_unwind nonnull writable sret(%"struct.std::array") align 4 %4, ptr noundef nonnull byval(%"struct.std::array") align 8 %3)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %3, ptr noundef nonnull align 4 dereferenceable(20) %4, i64 20, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %4) #7
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
  call void @_Z10show_arrayIiLm5EEvRKSt5arrayIT_XT0_EE(ptr noundef nonnull align 4 dereferenceable(20) %3)
  %19 = call noundef zeroext i1 @_ZSt9is_sortedIPiEbT_S1_(ptr noundef %15, ptr noundef %16)
  br i1 %19, label %24, label %23

.lr.ph23:                                         ; preds = %14, %.lr.ph23
  %.01421 = phi ptr [ %22, %.lr.ph23 ], [ %15, %14 ]
  %20 = call i32 @rand() #7
  %21 = srem i32 %20, 100
  store i32 %21, ptr %.01421, align 4, !tbaa !9
  %22 = getelementptr inbounds i8, ptr %.01421, i64 4
  %.not17 = icmp eq ptr %22, %16
  br i1 %.not17, label %._crit_edge24, label %.lr.ph23

23:                                               ; preds = %._crit_edge24
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.3, i32 noundef 103, ptr noundef nonnull @__PRETTY_FUNCTION__._Z4testv) #9
  unreachable

24:                                               ; preds = %._crit_edge24
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %1) #7
  ret void
}

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

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIiLm5EE5beginEv(ptr noundef nonnull align 4 dereferenceable(20)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIiLm5EE3endEv(ptr noundef nonnull align 4 dereferenceable(20)) local_unnamed_addr #2 align 2

; Function Attrs: nounwind
declare i32 @rand() 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) #1

; 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 #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z10show_arrayIiLm5EEvRKSt5arrayIT_XT0_EE(ptr noundef nonnull align 4 dereferenceable(20)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7sorting19randomized_bogosortIiLm5EEESt5arrayIT_XT0_EES3_(ptr dead_on_unwind noalias writable sret(%"struct.std::array") align 4, ptr noundef byval(%"struct.std::array") align 8) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

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


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