; LLVM IR from stan-dev/math :: lib/tbb_2020.3/src/test/test_task.ll (Z17TestSpawnRootListi)

; 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.Harness::internal::Tracer" = type <{ i32, [4 x i8], ptr, ptr, i64, [8 x i8] }>
%"struct.tbb::atomic" = type { %"struct.tbb::internal::atomic_impl_with_arithmetic" }
%"struct.tbb::internal::atomic_impl_with_arithmetic" = type { %"struct.tbb::internal::atomic_impl" }
%"struct.tbb::internal::atomic_impl" = type { %"struct.tbb::internal::aligned_storage" }
%"struct.tbb::internal::aligned_storage" = type { i32 }
%"class.tbb::task_scheduler_init" = type { ptr }
%"class.tbb::task_list" = type { ptr, ptr }
%"class.tbb::internal::allocate_root_proxy" = type { i8 }

@_ZN7Harness8internalL6tracerE = external hidden global %"class.Harness::internal::Tracer", align 8
@Count = external dso_local global %"struct.tbb::atomic", align 4
@_ZL7Verbose = external hidden global i8, align 1
@.str.17 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [16 x i8], align 1
@__FUNCTION__._Z17TestSpawnRootListi = external hidden unnamed_addr constant [18 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [62 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33), i32 noundef, ptr noundef, i64 noundef, ptr noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef, ...) #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3tbb4task13allocate_rootEv() #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZdlPvRKN3tbb8internal19allocate_root_proxyE(ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) #4

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL8Expectedii(i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNVK3tbb8internal11atomic_implIiEcviEv(ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17TestSpawnRootListi(i32 noundef %0) #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca %"class.tbb::task_scheduler_init", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.tbb::task_list", align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.tbb::internal::allocate_root_proxy", align 1
  %12 = alloca %"class.tbb::internal::allocate_root_proxy", align 1
  %13 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  %14 = load i8, ptr @_ZL7Verbose, align 1, !tbaa !9, !range !11, !noundef !12
  %15 = trunc i8 %14 to i1
  br i1 %15, label %17, label %16

16:                                               ; preds = %1
  br label %20

17:                                               ; preds = %1
  %18 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str.17, i64 noundef 141, ptr noundef @__FUNCTION__._Z17TestSpawnRootListi)
  %19 = load i32, ptr %2, align 4, !tbaa !5
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %18, ptr noundef @.str.21, i32 noundef %19)
  br label %20

20:                                               ; preds = %17, %16
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %21 = load i32, ptr %2, align 4, !tbaa !5
  call void @_ZN3tbb19task_scheduler_initC2Eim(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %21, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %97, %20
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = icmp slt i32 %23, 5
  br i1 %24, label %26, label %25

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

26:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %82, %26
  %28 = load i32, ptr %6, align 4, !tbaa !5
  %29 = icmp slt i32 %28, 10
  br i1 %29, label %31, label %30

30:                                               ; preds = %27
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %96

31:                                               ; preds = %27
  %32 = invoke noundef i32 @_ZN3tbb6atomicIiEaSEi(ptr noundef nonnull align 4 dereferenceable(4) @Count, i32 noundef 0)
          to label %33 unwind label %40

33:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  invoke void @_ZN3tbb9task_listC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %34 unwind label %44

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

35:                                               ; preds = %55, %34
  %36 = load i32, ptr %10, align 4, !tbaa !5
  %37 = load i32, ptr %6, align 4, !tbaa !5
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %48, label %39

39:                                               ; preds = %35
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %67

40:                                               ; preds = %31
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %7, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %8, align 4
  br label %95

44:                                               ; preds = %33
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %7, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %8, align 4
  br label %94

48:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #5
  invoke void @_ZN3tbb4task13allocate_rootEv()
          to label %49 unwind label %58

49:                                               ; preds = %48
  %50 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %51 unwind label %58

51:                                               ; preds = %49
  %52 = load i32, ptr %4, align 4, !tbaa !5
  invoke void @_ZN13RecursiveTaskC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %50, i32 noundef %52, i32 noundef 4)
          to label %53 unwind label %62

53:                                               ; preds = %51
  invoke void @_ZN3tbb9task_list9push_backERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(8) %50)
          to label %54 unwind label %58

54:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  br label %55

55:                                               ; preds = %54
  %56 = load i32, ptr %10, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %10, align 4, !tbaa !5
  br label %35, !llvm.loop !13

58:                                               ; preds = %53, %49, %48
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %7, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %8, align 4
  br label %66

62:                                               ; preds = %51
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %7, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %8, align 4
  call void @_ZdlPvRKN3tbb8internal19allocate_root_proxyE(ptr noundef %50, ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  br label %66

66:                                               ; preds = %62, %58
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %93

67:                                               ; preds = %39
  invoke void @_ZN3tbb4task19spawn_root_and_waitERNS_9task_listE(ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %68 unwind label %85

68:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = load i32, ptr %4, align 4, !tbaa !5
  %71 = invoke noundef i32 @_ZL8Expectedii(i32 noundef %70, i32 noundef 4)
          to label %72 unwind label %89

72:                                               ; preds = %68
  %73 = mul nsw i32 %69, %71
  store i32 %73, ptr %13, align 4, !tbaa !5
  %74 = invoke noundef i32 @_ZNVK3tbb8internal11atomic_implIiEcviEv(ptr noundef nonnull align 4 dereferenceable(4) @Count)
          to label %75 unwind label %89

75:                                               ; preds = %72
  %76 = load i32, ptr %13, align 4, !tbaa !5
  %77 = icmp eq i32 %74, %76
  br i1 %77, label %78, label %79

78:                                               ; preds = %75
  br label %81

79:                                               ; preds = %75
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.17, i32 noundef 151, ptr noundef @.str.20, ptr noundef null)
          to label %80 unwind label %89

80:                                               ; preds = %79
  br label %81

81:                                               ; preds = %80, %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @_ZN3tbb9task_listD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr %6, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %6, align 4, !tbaa !5
  br label %27, !llvm.loop !15

85:                                               ; preds = %67
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %7, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %8, align 4
  br label %93

89:                                               ; preds = %79, %72, %68
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %7, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %93

93:                                               ; preds = %89, %85, %66
  call void @_ZN3tbb9task_listD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  br label %94

94:                                               ; preds = %93, %44
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  br label %95

95:                                               ; preds = %94, %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @_ZN3tbb19task_scheduler_initD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %101

96:                                               ; preds = %30
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %4, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %4, align 4, !tbaa !5
  br label %22, !llvm.loop !16

100:                                              ; preds = %25
  call void @_ZN3tbb19task_scheduler_initD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret void

101:                                              ; preds = %95
  %102 = load ptr, ptr %7, align 8
  %103 = load i32, ptr %8, align 4
  %104 = insertvalue { ptr, i32 } poison, ptr %102, 0
  %105 = insertvalue { ptr, i32 } %104, i32 %103, 1
  resume { ptr, i32 } %105
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3tbb4task19spawn_root_and_waitERNS_9task_listE(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { 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 #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.Harness::internal::Tracer" = type <{ i32, [4 x i8], ptr, ptr, i64, [8 x i8] }>
%"struct.tbb::atomic" = type { %"struct.tbb::internal::atomic_impl_with_arithmetic" }
%"struct.tbb::internal::atomic_impl_with_arithmetic" = type { %"struct.tbb::internal::atomic_impl" }
%"struct.tbb::internal::atomic_impl" = type { %"struct.tbb::internal::aligned_storage" }
%"struct.tbb::internal::aligned_storage" = type { i32 }
%"class.tbb::task_scheduler_init" = type { ptr }
%"class.tbb::task_list" = type { ptr, ptr }
%"class.tbb::internal::allocate_root_proxy" = type { i8 }

@_ZN7Harness8internalL6tracerE = external hidden global %"class.Harness::internal::Tracer", align 8
@Count = external dso_local global %"struct.tbb::atomic", align 4
@_ZL7Verbose = external hidden local_unnamed_addr global i8, align 1
@.str.17 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [16 x i8], align 1
@__FUNCTION__._Z17TestSpawnRootListi = external hidden unnamed_addr constant [18 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [62 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33), i32 noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef, ...) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3tbb4task13allocate_rootEv() local_unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZdlPvRKN3tbb8internal19allocate_root_proxyE(ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #4

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL8Expectedii(i32 noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17TestSpawnRootListi(i32 noundef %0) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.tbb::task_scheduler_init", align 8
  %3 = alloca %"class.tbb::task_list", align 8
  %4 = alloca %"class.tbb::internal::allocate_root_proxy", align 1
  %5 = load i8, ptr @_ZL7Verbose, align 1, !tbaa !5, !range !9, !noundef !10
  %6 = trunc nuw i8 %5 to i1
  br i1 %6, label %7, label %.preheader

7:                                                ; preds = %1
  %8 = tail call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str.17, i64 noundef 141, ptr noundef nonnull @__FUNCTION__._Z17TestSpawnRootListi)
  tail call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %8, ptr noundef nonnull @.str.21, i32 noundef %0)
  br label %.preheader

.preheader:                                       ; preds = %1, %7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  call void @_ZN3tbb19task_scheduler_initC2Eim(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef %0, i64 noundef 0)
  br label %74

.preheader.1:                                     ; preds = %89, %23
  %.01924.1 = phi i32 [ %24, %23 ], [ 0, %89 ]
  %9 = invoke noundef i32 @_ZN3tbb6atomicIiEaSEi(ptr noundef nonnull align 4 dereferenceable(4) @Count, i32 noundef 0)
          to label %10 unwind label %.loopexit.split-lp36.loopexit

10:                                               ; preds = %.preheader.1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #5
  call void @_ZN3tbb9task_listC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %.not.1 = icmp eq i32 %.01924.1, 0
  br i1 %.not.1, label %._crit_edge.1, label %.lr.ph.1

.lr.ph.1:                                         ; preds = %10, %13
  %.01423.1 = phi i32 [ %14, %13 ], [ 0, %10 ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %11 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %12 unwind label %.loopexit.split-lp.loopexit

12:                                               ; preds = %.lr.ph.1
  invoke void @_ZN13RecursiveTaskC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %11, i32 noundef 1, i32 noundef 4)
          to label %13 unwind label %.loopexit.split-lp30.loopexit

13:                                               ; preds = %12
  call void @_ZN3tbb9task_list9push_backERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  %14 = add nuw nsw i32 %.01423.1, 1
  %exitcond.1.not = icmp eq i32 %14, %.01924.1
  br i1 %exitcond.1.not, label %._crit_edge.1, label %.lr.ph.1, !llvm.loop !11

._crit_edge.1:                                    ; preds = %13, %10
  invoke void @_ZN3tbb4task19spawn_root_and_waitERNS_9task_listE(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %15 unwind label %.loopexit.split-lp41.loopexit

15:                                               ; preds = %._crit_edge.1
  %16 = invoke noundef i32 @_ZL8Expectedii(i32 noundef 1, i32 noundef 4)
          to label %17 unwind label %.loopexit.split-lp46.loopexit

17:                                               ; preds = %15
  %18 = invoke noundef i32 @_ZNVK3tbb8internal11atomic_implIiEcviEv(ptr noundef nonnull align 4 dereferenceable(4) @Count)
          to label %19 unwind label %.loopexit.split-lp46.loopexit

19:                                               ; preds = %17
  %20 = mul nsw i32 %16, %.01924.1
  %21 = icmp eq i32 %18, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %19
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.17, i32 noundef 151, ptr noundef nonnull @.str.20, ptr noundef null)
          to label %23 unwind label %.loopexit.split-lp46.loopexit

23:                                               ; preds = %22, %19
  call void @_ZN3tbb9task_listD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  %24 = add nuw nsw i32 %.01924.1, 1
  %exitcond27.1.not = icmp eq i32 %24, 10
  br i1 %exitcond27.1.not, label %.preheader.2, label %.preheader.1, !llvm.loop !13

.preheader.2:                                     ; preds = %23, %39
  %.01924.2 = phi i32 [ %40, %39 ], [ 0, %23 ]
  %25 = invoke noundef i32 @_ZN3tbb6atomicIiEaSEi(ptr noundef nonnull align 4 dereferenceable(4) @Count, i32 noundef 0)
          to label %26 unwind label %.loopexit.split-lp36.loopexit.split-lp.loopexit

26:                                               ; preds = %.preheader.2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #5
  call void @_ZN3tbb9task_listC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %.not.2 = icmp eq i32 %.01924.2, 0
  br i1 %.not.2, label %._crit_edge.2, label %.lr.ph.2

.lr.ph.2:                                         ; preds = %26, %29
  %.01423.2 = phi i32 [ %30, %29 ], [ 0, %26 ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %27 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %28 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

28:                                               ; preds = %.lr.ph.2
  invoke void @_ZN13RecursiveTaskC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %27, i32 noundef 2, i32 noundef 4)
          to label %29 unwind label %.loopexit.split-lp30.loopexit.split-lp.loopexit

29:                                               ; preds = %28
  call void @_ZN3tbb9task_list9push_backERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %27)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  %30 = add nuw nsw i32 %.01423.2, 1
  %exitcond.2.not = icmp eq i32 %30, %.01924.2
  br i1 %exitcond.2.not, label %._crit_edge.2, label %.lr.ph.2, !llvm.loop !11

._crit_edge.2:                                    ; preds = %29, %26
  invoke void @_ZN3tbb4task19spawn_root_and_waitERNS_9task_listE(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %31 unwind label %.loopexit.split-lp41.loopexit.split-lp.loopexit

31:                                               ; preds = %._crit_edge.2
  %32 = invoke noundef i32 @_ZL8Expectedii(i32 noundef 2, i32 noundef 4)
          to label %33 unwind label %.loopexit.split-lp46.loopexit.split-lp.loopexit

33:                                               ; preds = %31
  %34 = invoke noundef i32 @_ZNVK3tbb8internal11atomic_implIiEcviEv(ptr noundef nonnull align 4 dereferenceable(4) @Count)
          to label %35 unwind label %.loopexit.split-lp46.loopexit.split-lp.loopexit

35:                                               ; preds = %33
  %36 = mul nsw i32 %32, %.01924.2
  %37 = icmp eq i32 %34, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %35
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.17, i32 noundef 151, ptr noundef nonnull @.str.20, ptr noundef null)
          to label %39 unwind label %.loopexit.split-lp46.loopexit.split-lp.loopexit

39:                                               ; preds = %38, %35
  call void @_ZN3tbb9task_listD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  %40 = add nuw nsw i32 %.01924.2, 1
  %exitcond27.2.not = icmp eq i32 %40, 10
  br i1 %exitcond27.2.not, label %.preheader.3, label %.preheader.2, !llvm.loop !13

.preheader.3:                                     ; preds = %39, %55
  %.01924.3 = phi i32 [ %56, %55 ], [ 0, %39 ]
  %41 = invoke noundef i32 @_ZN3tbb6atomicIiEaSEi(ptr noundef nonnull align 4 dereferenceable(4) @Count, i32 noundef 0)
          to label %42 unwind label %.loopexit.split-lp36.loopexit.split-lp.loopexit.split-lp.loopexit

42:                                               ; preds = %.preheader.3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #5
  call void @_ZN3tbb9task_listC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %.not.3 = icmp eq i32 %.01924.3, 0
  br i1 %.not.3, label %._crit_edge.3, label %.lr.ph.3

.lr.ph.3:                                         ; preds = %42, %45
  %.01423.3 = phi i32 [ %46, %45 ], [ 0, %42 ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %43 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %44 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit

44:                                               ; preds = %.lr.ph.3
  invoke void @_ZN13RecursiveTaskC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %43, i32 noundef 3, i32 noundef 4)
          to label %45 unwind label %.loopexit.split-lp30.loopexit.split-lp.loopexit.split-lp.loopexit

45:                                               ; preds = %44
  call void @_ZN3tbb9task_list9push_backERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %43)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  %46 = add nuw nsw i32 %.01423.3, 1
  %exitcond.3.not = icmp eq i32 %46, %.01924.3
  br i1 %exitcond.3.not, label %._crit_edge.3, label %.lr.ph.3, !llvm.loop !11

._crit_edge.3:                                    ; preds = %45, %42
  invoke void @_ZN3tbb4task19spawn_root_and_waitERNS_9task_listE(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %47 unwind label %.loopexit.split-lp41.loopexit.split-lp.loopexit.split-lp.loopexit

47:                                               ; preds = %._crit_edge.3
  %48 = invoke noundef i32 @_ZL8Expectedii(i32 noundef 3, i32 noundef 4)
          to label %49 unwind label %.loopexit.split-lp46.loopexit.split-lp.loopexit.split-lp.loopexit

49:                                               ; preds = %47
  %50 = invoke noundef i32 @_ZNVK3tbb8internal11atomic_implIiEcviEv(ptr noundef nonnull align 4 dereferenceable(4) @Count)
          to label %51 unwind label %.loopexit.split-lp46.loopexit.split-lp.loopexit.split-lp.loopexit

51:                                               ; preds = %49
  %52 = mul nsw i32 %48, %.01924.3
  %53 = icmp eq i32 %50, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %51
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.17, i32 noundef 151, ptr noundef nonnull @.str.20, ptr noundef null)
          to label %55 unwind label %.loopexit.split-lp46.loopexit.split-lp.loopexit.split-lp.loopexit

55:                                               ; preds = %54, %51
  call void @_ZN3tbb9task_listD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  %56 = add nuw nsw i32 %.01924.3, 1
  %exitcond27.3.not = icmp eq i32 %56, 10
  br i1 %exitcond27.3.not, label %.preheader.4, label %.preheader.3, !llvm.loop !13

.preheader.4:                                     ; preds = %55, %71
  %.01924.4 = phi i32 [ %72, %71 ], [ 0, %55 ]
  %57 = invoke noundef i32 @_ZN3tbb6atomicIiEaSEi(ptr noundef nonnull align 4 dereferenceable(4) @Count, i32 noundef 0)
          to label %58 unwind label %.loopexit.split-lp36.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

58:                                               ; preds = %.preheader.4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #5
  call void @_ZN3tbb9task_listC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %.not.4 = icmp eq i32 %.01924.4, 0
  br i1 %.not.4, label %._crit_edge.4, label %.lr.ph.4

.lr.ph.4:                                         ; preds = %58, %61
  %.01423.4 = phi i32 [ %62, %61 ], [ 0, %58 ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %59 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %60 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

60:                                               ; preds = %.lr.ph.4
  invoke void @_ZN13RecursiveTaskC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %59, i32 noundef 4, i32 noundef 4)
          to label %61 unwind label %.loopexit.split-lp30.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

61:                                               ; preds = %60
  call void @_ZN3tbb9task_list9push_backERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %59)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  %62 = add nuw nsw i32 %.01423.4, 1
  %exitcond.4.not = icmp eq i32 %62, %.01924.4
  br i1 %exitcond.4.not, label %._crit_edge.4, label %.lr.ph.4, !llvm.loop !11

._crit_edge.4:                                    ; preds = %61, %58
  invoke void @_ZN3tbb4task19spawn_root_and_waitERNS_9task_listE(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %63 unwind label %.loopexit.split-lp41.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

63:                                               ; preds = %._crit_edge.4
  %64 = invoke noundef i32 @_ZL8Expectedii(i32 noundef 4, i32 noundef 4)
          to label %65 unwind label %.loopexit.split-lp46.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

65:                                               ; preds = %63
  %66 = invoke noundef i32 @_ZNVK3tbb8internal11atomic_implIiEcviEv(ptr noundef nonnull align 4 dereferenceable(4) @Count)
          to label %67 unwind label %.loopexit.split-lp46.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

67:                                               ; preds = %65
  %68 = mul nsw i32 %64, %.01924.4
  %69 = icmp eq i32 %66, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %67
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.17, i32 noundef 151, ptr noundef nonnull @.str.20, ptr noundef null)
          to label %71 unwind label %.loopexit.split-lp46.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

71:                                               ; preds = %70, %67
  call void @_ZN3tbb9task_listD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  %72 = add nuw nsw i32 %.01924.4, 1
  %exitcond27.4.not = icmp eq i32 %72, 10
  br i1 %exitcond27.4.not, label %73, label %.preheader.4, !llvm.loop !13

73:                                               ; preds = %71
  call void @_ZN3tbb19task_scheduler_initD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  ret void

74:                                               ; preds = %.preheader, %89
  %.01924 = phi i32 [ 0, %.preheader ], [ %90, %89 ]
  %75 = invoke noundef i32 @_ZN3tbb6atomicIiEaSEi(ptr noundef nonnull align 4 dereferenceable(4) @Count, i32 noundef 0)
          to label %76 unwind label %.loopexit35

76:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #5
  call void @_ZN3tbb9task_listC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %.not = icmp eq i32 %.01924, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %79, %76
  invoke void @_ZN3tbb4task19spawn_root_and_waitERNS_9task_listE(ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %81 unwind label %.loopexit40

.loopexit35:                                      ; preds = %74
  %lpad.loopexit37 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp36

.loopexit.split-lp36.loopexit:                    ; preds = %.preheader.1
  %lpad.loopexit56 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp36

.loopexit.split-lp36.loopexit.split-lp.loopexit:  ; preds = %.preheader.2
  %lpad.loopexit72 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp36

.loopexit.split-lp36.loopexit.split-lp.loopexit.split-lp.loopexit: ; preds = %.preheader.3
  %lpad.loopexit87 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp36

.loopexit.split-lp36.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp: ; preds = %.preheader.4
  %lpad.loopexit.split-lp88 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp36

.lr.ph:                                           ; preds = %76, %79
  %.01423 = phi i32 [ %80, %79 ], [ 0, %76 ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %77 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %78 unwind label %.loopexit

78:                                               ; preds = %.lr.ph
  invoke void @_ZN13RecursiveTaskC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %77, i32 noundef 0, i32 noundef 4)
          to label %79 unwind label %.loopexit29

79:                                               ; preds = %78
  call void @_ZN3tbb9task_list9push_backERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %77)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  %80 = add nuw nsw i32 %.01423, 1
  %exitcond.not = icmp eq i32 %80, %.01924
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !11

.loopexit:                                        ; preds = %.lr.ph
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %.lr.ph.1
  %lpad.loopexit50 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit:    ; preds = %.lr.ph.2
  %lpad.loopexit65 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit: ; preds = %.lr.ph.3
  %lpad.loopexit80 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp: ; preds = %.lr.ph.4
  %lpad.loopexit.split-lp81 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit29:                                      ; preds = %78
  %lpad.loopexit32 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp30

.loopexit.split-lp30.loopexit:                    ; preds = %12
  %lpad.loopexit54 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp30

.loopexit.split-lp30.loopexit.split-lp.loopexit:  ; preds = %28
  %lpad.loopexit69 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp30

.loopexit.split-lp30.loopexit.split-lp.loopexit.split-lp.loopexit: ; preds = %44
  %lpad.loopexit84 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp30

.loopexit.split-lp30.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp: ; preds = %60
  %lpad.loopexit.split-lp85 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp30

.loopexit.split-lp30:                             ; preds = %.loopexit.split-lp30.loopexit, %.loopexit.split-lp30.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit.split-lp30.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp30.loopexit.split-lp.loopexit, %.loopexit29
  %.lcssa = phi ptr [ %77, %.loopexit29 ], [ %11, %.loopexit.split-lp30.loopexit ], [ %27, %.loopexit.split-lp30.loopexit.split-lp.loopexit ], [ %43, %.loopexit.split-lp30.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %59, %.loopexit.split-lp30.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp ]
  %lpad.phi34 = phi { ptr, i32 } [ %lpad.loopexit32, %.loopexit29 ], [ %lpad.loopexit54, %.loopexit.split-lp30.loopexit ], [ %lpad.loopexit69, %.loopexit.split-lp30.loopexit.split-lp.loopexit ], [ %lpad.loopexit84, %.loopexit.split-lp30.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp85, %.loopexit.split-lp30.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZdlPvRKN3tbb8internal19allocate_root_proxyE(ptr noundef %.lcssa, ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  br label %.loopexit.split-lp

.loopexit.split-lp:                               ; preds = %.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit, %.loopexit.split-lp30
  %.pn = phi { ptr, i32 } [ %lpad.phi34, %.loopexit.split-lp30 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit50, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit65, %.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit80, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp81, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  br label %.loopexit.split-lp41

81:                                               ; preds = %._crit_edge
  %82 = invoke noundef i32 @_ZL8Expectedii(i32 noundef 0, i32 noundef 4)
          to label %83 unwind label %.loopexit45

83:                                               ; preds = %81
  %84 = invoke noundef i32 @_ZNVK3tbb8internal11atomic_implIiEcviEv(ptr noundef nonnull align 4 dereferenceable(4) @Count)
          to label %85 unwind label %.loopexit45

85:                                               ; preds = %83
  %86 = mul nsw i32 %82, %.01924
  %87 = icmp eq i32 %84, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %85
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.17, i32 noundef 151, ptr noundef nonnull @.str.20, ptr noundef null)
          to label %89 unwind label %.loopexit45

89:                                               ; preds = %88, %85
  call void @_ZN3tbb9task_listD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  %90 = add nuw nsw i32 %.01924, 1
  %exitcond27.not = icmp eq i32 %90, 10
  br i1 %exitcond27.not, label %.preheader.1, label %74, !llvm.loop !13

.loopexit40:                                      ; preds = %._crit_edge
  %lpad.loopexit42 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp41

.loopexit.split-lp41.loopexit:                    ; preds = %._crit_edge.1
  %lpad.loopexit59 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp41

.loopexit.split-lp41.loopexit.split-lp.loopexit:  ; preds = %._crit_edge.2
  %lpad.loopexit74 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp41

.loopexit.split-lp41.loopexit.split-lp.loopexit.split-lp.loopexit: ; preds = %._crit_edge.3
  %lpad.loopexit90 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp41

.loopexit.split-lp41.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp: ; preds = %._crit_edge.4
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp41

.loopexit45:                                      ; preds = %81, %83, %88
  %lpad.loopexit47 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp41

.loopexit.split-lp46.loopexit:                    ; preds = %22, %17, %15
  %lpad.loopexit62 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp41

.loopexit.split-lp46.loopexit.split-lp.loopexit:  ; preds = %31, %33, %38
  %lpad.loopexit77 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp41

.loopexit.split-lp46.loopexit.split-lp.loopexit.split-lp.loopexit: ; preds = %54, %49, %47
  %lpad.loopexit92 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp41

.loopexit.split-lp46.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp: ; preds = %70, %65, %63
  %lpad.loopexit.split-lp93 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp41

.loopexit.split-lp41:                             ; preds = %.loopexit45, %.loopexit.split-lp46.loopexit.split-lp.loopexit, %.loopexit.split-lp46.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp46.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit.split-lp46.loopexit, %.loopexit40, %.loopexit.split-lp41.loopexit.split-lp.loopexit, %.loopexit.split-lp41.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp41.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit.split-lp41.loopexit, %.loopexit.split-lp
  %.pn.pn = phi { ptr, i32 } [ %.pn, %.loopexit.split-lp ], [ %lpad.loopexit42, %.loopexit40 ], [ %lpad.loopexit59, %.loopexit.split-lp41.loopexit ], [ %lpad.loopexit74, %.loopexit.split-lp41.loopexit.split-lp.loopexit ], [ %lpad.loopexit90, %.loopexit.split-lp41.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp41.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp ], [ %lpad.loopexit47, %.loopexit45 ], [ %lpad.loopexit62, %.loopexit.split-lp46.loopexit ], [ %lpad.loopexit77, %.loopexit.split-lp46.loopexit.split-lp.loopexit ], [ %lpad.loopexit92, %.loopexit.split-lp46.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp93, %.loopexit.split-lp46.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZN3tbb9task_listD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  br label %.loopexit.split-lp36

.loopexit.split-lp36:                             ; preds = %.loopexit35, %.loopexit.split-lp36.loopexit.split-lp.loopexit, %.loopexit.split-lp36.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp36.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit.split-lp36.loopexit, %.loopexit.split-lp41
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %.loopexit.split-lp41 ], [ %lpad.loopexit37, %.loopexit35 ], [ %lpad.loopexit56, %.loopexit.split-lp36.loopexit ], [ %lpad.loopexit72, %.loopexit.split-lp36.loopexit.split-lp.loopexit ], [ %lpad.loopexit87, %.loopexit.split-lp36.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp88, %.loopexit.split-lp36.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZN3tbb19task_scheduler_initD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn.pn.pn
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3tbb4task19spawn_root_and_waitERNS_9task_listE(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

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

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


; Effective O3 passes: GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass