; LLVM IR from ritikbanger/Hacktoberfest2022-DSA :: 14. Tree (BinaryTreeDiagram)

; 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.BinTree = type { ptr }
%"class.std::random_device" = type { %union.anon }
%union.anon = type { %"class.std::mersenne_twister_engine" }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }
%"class.std::uniform_int_distribution" = type { %"struct.std::uniform_int_distribution<>::param_type" }
%"struct.std::uniform_int_distribution<>::param_type" = type { i32, i32 }

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %class.BinTree, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::random_device", align 8
  %7 = alloca %"class.std::mersenne_twister_engine", align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::uniform_int_distribution", align 4
  %13 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  call void @_ZN7BinTreeIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 8, ptr %3, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJiiiiiiEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, i32 noundef 5, i32 noundef 2, i32 noundef 6, i32 noundef 10, i32 noundef 9, i32 noundef 11)
          to label %14 unwind label %40

14:                                               ; preds = %0
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  %15 = 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 %16 unwind label %44

16:                                               ; preds = %14
  invoke void @_ZNK7BinTreeIiE4DumpEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %17 unwind label %44

17:                                               ; preds = %16
  %18 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
          to label %19 unwind label %44

19:                                               ; preds = %17
  invoke void @_ZN7BinTreeIiE5clearEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %20 unwind label %44

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 5000, ptr %6) #5
  invoke void @_ZNSt13random_deviceC2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %6)
          to label %21 unwind label %48

21:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 5000, ptr %7) #5
  %22 = invoke noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000) %6)
          to label %23 unwind label %52

23:                                               ; preds = %21
  %24 = zext i32 %22 to i64
  invoke void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000) %7, i64 noundef %24)
          to label %25 unwind label %52

25:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 20, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 5, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 1000, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  invoke void @_ZNSt24uniform_int_distributionIiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %12, i32 noundef 0, i32 noundef 1000)
          to label %26 unwind label %56

26:                                               ; preds = %25
  br label %27

27:                                               ; preds = %64, %26
  %28 = load i32, ptr %8, align 4, !tbaa !5
  %29 = add nsw i32 %28, -1
  store i32 %29, ptr %8, align 4, !tbaa !5
  %30 = icmp ne i32 %28, 0
  br i1 %30, label %31, label %65

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %32 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(5000) %7)
          to label %33 unwind label %60

33:                                               ; preds = %31
  store i32 %32, ptr %13, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %34 unwind label %60

34:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  %35 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %36 unwind label %56

36:                                               ; preds = %34
  %37 = load i32, ptr %9, align 4, !tbaa !5
  %38 = icmp sge i32 %35, %37
  br i1 %38, label %39, label %64

39:                                               ; preds = %36
  br label %65

40:                                               ; preds = %0
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %4, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %73

44:                                               ; preds = %19, %17, %16, %14
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %4, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %5, align 4
  br label %73

48:                                               ; preds = %20
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %4, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %5, align 4
  br label %72

52:                                               ; preds = %23, %21
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %4, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %5, align 4
  br label %71

56:                                               ; preds = %67, %65, %34, %25
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %4, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %5, align 4
  br label %70

60:                                               ; preds = %33, %31
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %4, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %70

64:                                               ; preds = %36
  br label %27, !llvm.loop !9

65:                                               ; preds = %39, %27
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
          to label %67 unwind label %56

67:                                               ; preds = %65
  invoke void @_ZNK7BinTreeIiE4DumpEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %68 unwind label %56

68:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 5000, ptr %7) #5
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %6) #5
  call void @llvm.lifetime.end.p0(i64 5000, ptr %6) #5
  call void @_ZN7BinTreeIiED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %69 = load i32, ptr %1, align 4
  ret i32 %69

70:                                               ; preds = %60, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %71

71:                                               ; preds = %70, %52
  call void @llvm.lifetime.end.p0(i64 5000, ptr %7) #5
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %6) #5
  br label %72

72:                                               ; preds = %71, %48
  call void @llvm.lifetime.end.p0(i64 5000, ptr %6) #5
  br label %73

73:                                               ; preds = %72, %44, %40
  call void @_ZN7BinTreeIiED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  br label %74

74:                                               ; preds = %73
  %75 = load ptr, ptr %4, align 8
  %76 = load i32, ptr %5, align 4
  %77 = insertvalue { ptr, i32 } poison, ptr %75, 0
  %78 = insertvalue { ptr, i32 } %77, i32 %76, 1
  resume { ptr, i32 } %78
}

; 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 uwtable
declare dso_local void @_ZN7BinTreeIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

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

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) #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 @_ZNK7BinTreeIiE4DumpEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt13random_deviceC2Ev(ptr noundef nonnull align 8 dereferenceable(5000)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000), i64 noundef) unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(5000)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

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

attributes #0 = { mustprogress norecurse 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 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"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::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.BinTree = type { ptr }
%"class.std::random_device" = type { %union.anon }
%union.anon = type { %"class.std::mersenne_twister_engine" }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }
%"class.std::uniform_int_distribution" = type { %"struct.std::uniform_int_distribution<>::param_type" }
%"struct.std::uniform_int_distribution<>::param_type" = type { i32, i32 }

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %class.BinTree, align 8
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::random_device", align 8
  %4 = alloca %"class.std::mersenne_twister_engine", align 8
  %5 = alloca %"class.std::uniform_int_distribution", align 4
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  call void @_ZN7BinTreeIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  store i32 8, ptr %2, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJiiiiiiEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %2, i32 noundef 5, i32 noundef 2, i32 noundef 6, i32 noundef 10, i32 noundef 9, i32 noundef 11)
          to label %7 unwind label %136

7:                                                ; preds = %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  %8 = 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 %9 unwind label %138

9:                                                ; preds = %7
  invoke void @_ZNK7BinTreeIiE4DumpEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %10 unwind label %138

10:                                               ; preds = %9
  %11 = 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.1)
          to label %12 unwind label %138

12:                                               ; preds = %10
  call void @_ZN7BinTreeIiE5clearEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.start.p0(i64 5000, ptr nonnull %3) #5
  invoke void @_ZNSt13random_deviceC2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %3)
          to label %13 unwind label %140

13:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 5000, ptr nonnull %4) #5
  %14 = invoke noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000) %3)
          to label %15 unwind label %142

15:                                               ; preds = %13
  %16 = zext i32 %14 to i64
  invoke void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000) %4, i64 noundef %16)
          to label %17 unwind label %142

17:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  invoke void @_ZNSt24uniform_int_distributionIiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %5, i32 noundef 0, i32 noundef 1000)
          to label %.preheader.preheader unwind label %.loopexit.split-lp

.preheader.preheader:                             ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %18 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %19 unwind label %144

19:                                               ; preds = %.preheader.preheader
  store i32 %18, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %20 unwind label %144

20:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %21 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %22 unwind label %.loopexit

22:                                               ; preds = %20
  %23 = icmp sgt i32 %21, 4
  br i1 %23, label %.preheader.20, label %.preheader.1, !llvm.loop !9

.preheader.1:                                     ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %24 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %25 unwind label %144

25:                                               ; preds = %.preheader.1
  store i32 %24, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %26 unwind label %144

26:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %27 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %28 unwind label %.loopexit

28:                                               ; preds = %26
  %29 = icmp sgt i32 %27, 4
  br i1 %29, label %.preheader.20, label %.preheader.2, !llvm.loop !9

.preheader.2:                                     ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %30 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %31 unwind label %144

31:                                               ; preds = %.preheader.2
  store i32 %30, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %32 unwind label %144

32:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %33 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %34 unwind label %.loopexit

34:                                               ; preds = %32
  %35 = icmp sgt i32 %33, 4
  br i1 %35, label %.preheader.20, label %.preheader.3, !llvm.loop !9

.preheader.3:                                     ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %36 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %37 unwind label %144

37:                                               ; preds = %.preheader.3
  store i32 %36, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %38 unwind label %144

38:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %39 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %40 unwind label %.loopexit

40:                                               ; preds = %38
  %41 = icmp sgt i32 %39, 4
  br i1 %41, label %.preheader.20, label %.preheader.4, !llvm.loop !9

.preheader.4:                                     ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %42 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %43 unwind label %144

43:                                               ; preds = %.preheader.4
  store i32 %42, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %44 unwind label %144

44:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %45 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %46 unwind label %.loopexit

46:                                               ; preds = %44
  %47 = icmp sgt i32 %45, 4
  br i1 %47, label %.preheader.20, label %.preheader.5, !llvm.loop !9

.preheader.5:                                     ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %48 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %49 unwind label %144

49:                                               ; preds = %.preheader.5
  store i32 %48, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %50 unwind label %144

50:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %51 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %52 unwind label %.loopexit

52:                                               ; preds = %50
  %53 = icmp sgt i32 %51, 4
  br i1 %53, label %.preheader.20, label %.preheader.6, !llvm.loop !9

.preheader.6:                                     ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %54 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %55 unwind label %144

55:                                               ; preds = %.preheader.6
  store i32 %54, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %56 unwind label %144

56:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %57 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %58 unwind label %.loopexit

58:                                               ; preds = %56
  %59 = icmp sgt i32 %57, 4
  br i1 %59, label %.preheader.20, label %.preheader.7, !llvm.loop !9

.preheader.7:                                     ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %60 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %61 unwind label %144

61:                                               ; preds = %.preheader.7
  store i32 %60, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %62 unwind label %144

62:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %63 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %64 unwind label %.loopexit

64:                                               ; preds = %62
  %65 = icmp sgt i32 %63, 4
  br i1 %65, label %.preheader.20, label %.preheader.8, !llvm.loop !9

.preheader.8:                                     ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %66 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %67 unwind label %144

67:                                               ; preds = %.preheader.8
  store i32 %66, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %68 unwind label %144

68:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %69 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %70 unwind label %.loopexit

70:                                               ; preds = %68
  %71 = icmp sgt i32 %69, 4
  br i1 %71, label %.preheader.20, label %.preheader.9, !llvm.loop !9

.preheader.9:                                     ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %72 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %73 unwind label %144

73:                                               ; preds = %.preheader.9
  store i32 %72, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %74 unwind label %144

74:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %75 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %76 unwind label %.loopexit

76:                                               ; preds = %74
  %77 = icmp sgt i32 %75, 4
  br i1 %77, label %.preheader.20, label %.preheader.10, !llvm.loop !9

.preheader.10:                                    ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %78 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %79 unwind label %144

79:                                               ; preds = %.preheader.10
  store i32 %78, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %80 unwind label %144

80:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %81 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %82 unwind label %.loopexit

82:                                               ; preds = %80
  %83 = icmp sgt i32 %81, 4
  br i1 %83, label %.preheader.20, label %.preheader.11, !llvm.loop !9

.preheader.11:                                    ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %84 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %85 unwind label %144

85:                                               ; preds = %.preheader.11
  store i32 %84, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %86 unwind label %144

86:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %87 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %88 unwind label %.loopexit

88:                                               ; preds = %86
  %89 = icmp sgt i32 %87, 4
  br i1 %89, label %.preheader.20, label %.preheader.12, !llvm.loop !9

.preheader.12:                                    ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %90 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %91 unwind label %144

91:                                               ; preds = %.preheader.12
  store i32 %90, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %92 unwind label %144

92:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %93 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %94 unwind label %.loopexit

94:                                               ; preds = %92
  %95 = icmp sgt i32 %93, 4
  br i1 %95, label %.preheader.20, label %.preheader.13, !llvm.loop !9

.preheader.13:                                    ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %96 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %97 unwind label %144

97:                                               ; preds = %.preheader.13
  store i32 %96, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %98 unwind label %144

98:                                               ; preds = %97
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %99 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %100 unwind label %.loopexit

100:                                              ; preds = %98
  %101 = icmp sgt i32 %99, 4
  br i1 %101, label %.preheader.20, label %.preheader.14, !llvm.loop !9

.preheader.14:                                    ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %102 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %103 unwind label %144

103:                                              ; preds = %.preheader.14
  store i32 %102, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %104 unwind label %144

104:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %105 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %106 unwind label %.loopexit

106:                                              ; preds = %104
  %107 = icmp sgt i32 %105, 4
  br i1 %107, label %.preheader.20, label %.preheader.15, !llvm.loop !9

.preheader.15:                                    ; preds = %106
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %108 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %109 unwind label %144

109:                                              ; preds = %.preheader.15
  store i32 %108, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %110 unwind label %144

110:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %111 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %112 unwind label %.loopexit

112:                                              ; preds = %110
  %113 = icmp sgt i32 %111, 4
  br i1 %113, label %.preheader.20, label %.preheader.16, !llvm.loop !9

.preheader.16:                                    ; preds = %112
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %114 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %115 unwind label %144

115:                                              ; preds = %.preheader.16
  store i32 %114, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %116 unwind label %144

116:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %117 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %118 unwind label %.loopexit

118:                                              ; preds = %116
  %119 = icmp sgt i32 %117, 4
  br i1 %119, label %.preheader.20, label %.preheader.17, !llvm.loop !9

.preheader.17:                                    ; preds = %118
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %120 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %121 unwind label %144

121:                                              ; preds = %.preheader.17
  store i32 %120, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %122 unwind label %144

122:                                              ; preds = %121
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %123 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %124 unwind label %.loopexit

124:                                              ; preds = %122
  %125 = icmp sgt i32 %123, 4
  br i1 %125, label %.preheader.20, label %.preheader.18, !llvm.loop !9

.preheader.18:                                    ; preds = %124
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %126 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %127 unwind label %144

127:                                              ; preds = %.preheader.18
  store i32 %126, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %128 unwind label %144

128:                                              ; preds = %127
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %129 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %130 unwind label %.loopexit

130:                                              ; preds = %128
  %131 = icmp sgt i32 %129, 4
  br i1 %131, label %.preheader.20, label %.preheader.19, !llvm.loop !9

.preheader.19:                                    ; preds = %130
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %132 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %133 unwind label %144

133:                                              ; preds = %.preheader.19
  store i32 %132, ptr %6, align 4, !tbaa !5
  invoke void @_ZN7BinTreeIiE6insertIJEEEvRKiDpT_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %134 unwind label %144

134:                                              ; preds = %133
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %135 = invoke noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %.preheader.20 unwind label %.loopexit, !llvm.loop !9

136:                                              ; preds = %0
  %137 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  br label %152

138:                                              ; preds = %10, %9, %7
  %139 = landingpad { ptr, i32 }
          cleanup
  br label %152

140:                                              ; preds = %12
  %141 = landingpad { ptr, i32 }
          cleanup
  br label %151

142:                                              ; preds = %15, %13
  %143 = landingpad { ptr, i32 }
          cleanup
  br label %150

.loopexit:                                        ; preds = %134, %128, %122, %116, %110, %104, %98, %92, %86, %80, %74, %68, %62, %56, %50, %44, %38, %32, %26, %20
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %149

.loopexit.split-lp:                               ; preds = %17, %.preheader.20, %147
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %149

144:                                              ; preds = %133, %.preheader.19, %127, %.preheader.18, %121, %.preheader.17, %115, %.preheader.16, %109, %.preheader.15, %103, %.preheader.14, %97, %.preheader.13, %91, %.preheader.12, %85, %.preheader.11, %79, %.preheader.10, %73, %.preheader.9, %67, %.preheader.8, %61, %.preheader.7, %55, %.preheader.6, %49, %.preheader.5, %43, %.preheader.4, %37, %.preheader.3, %31, %.preheader.2, %25, %.preheader.1, %19, %.preheader.preheader
  %145 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  br label %149

.preheader.20:                                    ; preds = %134, %130, %124, %118, %112, %106, %100, %94, %88, %82, %76, %70, %64, %58, %52, %46, %40, %34, %28, %22
  %146 = 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.2)
          to label %147 unwind label %.loopexit.split-lp

147:                                              ; preds = %.preheader.20
  invoke void @_ZNK7BinTreeIiE4DumpEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %148 unwind label %.loopexit.split-lp

148:                                              ; preds = %147
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %4) #5
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %3) #5
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %3) #5
  call void @_ZN7BinTreeIiED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i32 0

149:                                              ; preds = %.loopexit, %.loopexit.split-lp, %144
  %.pn = phi { ptr, i32 } [ %145, %144 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %150

150:                                              ; preds = %149, %142
  %.pn.pn = phi { ptr, i32 } [ %.pn, %149 ], [ %143, %142 ]
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %4) #5
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %3) #5
  br label %151

151:                                              ; preds = %150, %140
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %150 ], [ %141, %140 ]
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %3) #5
  br label %152

152:                                              ; preds = %151, %138, %136
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %151 ], [ %139, %138 ], [ %137, %136 ]
  call void @_ZN7BinTreeIiED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn.pn.pn.pn
}

; 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 nounwind uwtable
declare dso_local void @_ZN7BinTreeIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

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

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) #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 @_ZNK7BinTreeIiE4DumpEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt13random_deviceC2Ev(ptr noundef nonnull align 8 dereferenceable(5000)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000), i64 noundef) unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(5000)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK7BinTreeIiE13get_max_depthEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

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

attributes #0 = { mustprogress norecurse 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 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopSimplifyPass,SCCPPass,SROAPass,SimplifyCFGPass