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

; 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] }>
%"class.tbb::task_scheduler_init" = type { ptr }
%"class.tbb::internal::allocate_root_proxy" = type { i8 }

@_ZN7Harness8internalL6tracerE = external hidden global %"class.Harness::internal::Tracer", align 8
@_ZL7Verbose = external hidden global i8, align 1
@.str.17 = external hidden unnamed_addr constant [85 x i8], align 1
@__FUNCTION__._Z20TestSafeContinuationi = external hidden unnamed_addr constant [21 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [59 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 @_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 uwtable
declare dso_local void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; 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
define dso_local void @_Z20TestSafeContinuationi(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 ptr, align 8
  %6 = alloca %"class.tbb::internal::allocate_root_proxy", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.tbb::internal::allocate_root_proxy", align 1
  store i32 %0, ptr %2, align 4, !tbaa !5
  %10 = load i8, ptr @_ZL7Verbose, align 1, !tbaa !9, !range !11, !noundef !12
  %11 = trunc i8 %10 to i1
  br i1 %11, label %13, label %12

12:                                               ; preds = %1
  br label %16

13:                                               ; preds = %1
  %14 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str.17, i64 noundef 160, ptr noundef @__FUNCTION__._Z20TestSafeContinuationi)
  %15 = load i32, ptr %2, align 4, !tbaa !5
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %14, ptr noundef @.str.22, i32 noundef %15)
  br label %16

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

18:                                               ; preds = %30, %16
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = icmp slt i32 %19, 33
  br i1 %20, label %22, label %21

21:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %47

22:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  invoke void @_ZN3tbb4task13allocate_rootEv()
          to label %23 unwind label %33

23:                                               ; preds = %22
  %24 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %25 unwind label %33

25:                                               ; preds = %23
  %26 = load i32, ptr %4, align 4, !tbaa !5
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %24, i32 noundef %26, i32 noundef 5)
          to label %27 unwind label %37

27:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  store ptr %24, ptr %5, align 8, !tbaa !13
  %28 = load ptr, ptr %5, align 8, !tbaa !13
  invoke void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %29 unwind label %42

29:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %30

30:                                               ; preds = %29
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %4, align 4, !tbaa !5
  br label %18, !llvm.loop !15

33:                                               ; preds = %23, %22
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %7, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %8, align 4
  br label %41

37:                                               ; preds = %25
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %7, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %8, align 4
  call void @_ZdlPvRKN3tbb8internal19allocate_root_proxyE(ptr noundef %24, ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  br label %41

41:                                               ; preds = %37, %33
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  br label %46

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

46:                                               ; preds = %42, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #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 %48

47:                                               ; preds = %21
  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

48:                                               ; preds = %46
  %49 = load ptr, ptr %7, align 8
  %50 = load i32, ptr %8, align 4
  %51 = insertvalue { ptr, i32 } poison, ptr %49, 0
  %52 = insertvalue { ptr, i32 } %51, i32 %50, 1
  resume { ptr, i32 } %52
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, i32 noundef) unnamed_addr #2 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 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"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.Harness::internal::Tracer" = type <{ i32, [4 x i8], ptr, ptr, i64, [8 x i8] }>
%"class.tbb::task_scheduler_init" = type { ptr }
%"class.tbb::internal::allocate_root_proxy" = type { i8 }

@_ZN7Harness8internalL6tracerE = external hidden global %"class.Harness::internal::Tracer", align 8
@_ZL7Verbose = external hidden local_unnamed_addr global i8, align 1
@.str.17 = external hidden unnamed_addr constant [85 x i8], align 1
@__FUNCTION__._Z20TestSafeContinuationi = external hidden unnamed_addr constant [21 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [59 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 @_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 uwtable
declare dso_local void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; 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
define dso_local void @_Z20TestSafeContinuationi(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::internal::allocate_root_proxy", align 1
  %4 = load i8, ptr @_ZL7Verbose, align 1, !tbaa !5, !range !9, !noundef !10
  %5 = trunc nuw i8 %4 to i1
  br i1 %5, label %6, label %8

6:                                                ; preds = %1
  %7 = 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 160, ptr noundef nonnull @__FUNCTION__._Z20TestSafeContinuationi)
  tail call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %7, ptr noundef nonnull @.str.22, i32 noundef %0)
  br label %8

8:                                                ; preds = %1, %6
  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)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %9 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %10 unwind label %109

10:                                               ; preds = %8
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef 8, i32 noundef 5)
          to label %11 unwind label %111

11:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  invoke void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %12 unwind label %114

12:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %13 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %14 unwind label %109

14:                                               ; preds = %12
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %13, i32 noundef 9, i32 noundef 5)
          to label %15 unwind label %111

15:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  invoke void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %16 unwind label %114

16:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %17 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %18 unwind label %109

18:                                               ; preds = %16
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %17, i32 noundef 10, i32 noundef 5)
          to label %19 unwind label %111

19:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  invoke void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %20 unwind label %114

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %21 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %22 unwind label %109

22:                                               ; preds = %20
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef 11, i32 noundef 5)
          to label %23 unwind label %111

23:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  invoke void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %24 unwind label %114

24:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %25 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %26 unwind label %109

26:                                               ; preds = %24
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %25, i32 noundef 12, i32 noundef 5)
          to label %27 unwind label %111

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

28:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %29 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %30 unwind label %109

30:                                               ; preds = %28
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %29, i32 noundef 13, i32 noundef 5)
          to label %31 unwind label %111

31:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  invoke void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %32 unwind label %114

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %33 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %34 unwind label %109

34:                                               ; preds = %32
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %33, i32 noundef 14, i32 noundef 5)
          to label %35 unwind label %111

35:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  invoke void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %36 unwind label %114

36:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %37 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %38 unwind label %109

38:                                               ; preds = %36
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %37, i32 noundef 15, i32 noundef 5)
          to label %39 unwind label %111

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

40:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %41 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %42 unwind label %109

42:                                               ; preds = %40
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %41, i32 noundef 16, i32 noundef 5)
          to label %43 unwind label %111

43:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  invoke void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8) %41)
          to label %44 unwind label %114

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %45 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %46 unwind label %109

46:                                               ; preds = %44
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %45, i32 noundef 17, i32 noundef 5)
          to label %47 unwind label %111

47:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  invoke void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8) %45)
          to label %48 unwind label %114

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %49 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %50 unwind label %109

50:                                               ; preds = %48
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %49, i32 noundef 18, i32 noundef 5)
          to label %51 unwind label %111

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

52:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %53 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %54 unwind label %109

54:                                               ; preds = %52
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %53, i32 noundef 19, i32 noundef 5)
          to label %55 unwind label %111

55:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  invoke void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8) %53)
          to label %56 unwind label %114

56:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %57 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %58 unwind label %109

58:                                               ; preds = %56
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %57, i32 noundef 20, i32 noundef 5)
          to label %59 unwind label %111

59:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  invoke void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8) %57)
          to label %60 unwind label %114

60:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %61 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %62 unwind label %109

62:                                               ; preds = %60
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %61, i32 noundef 21, i32 noundef 5)
          to label %63 unwind label %111

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

64:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %65 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %66 unwind label %109

66:                                               ; preds = %64
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %65, i32 noundef 22, i32 noundef 5)
          to label %67 unwind label %111

67:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  invoke void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8) %65)
          to label %68 unwind label %114

68:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %69 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %70 unwind label %109

70:                                               ; preds = %68
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %69, i32 noundef 23, i32 noundef 5)
          to label %71 unwind label %111

71:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  invoke void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8) %69)
          to label %72 unwind label %114

72:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %73 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %74 unwind label %109

74:                                               ; preds = %72
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %73, i32 noundef 24, i32 noundef 5)
          to label %75 unwind label %111

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

76:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %77 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %78 unwind label %109

78:                                               ; preds = %76
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %77, i32 noundef 25, i32 noundef 5)
          to label %79 unwind label %111

79:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  invoke void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8) %77)
          to label %80 unwind label %114

80:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %81 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %82 unwind label %109

82:                                               ; preds = %80
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %81, i32 noundef 26, i32 noundef 5)
          to label %83 unwind label %111

83:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  invoke void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8) %81)
          to label %84 unwind label %114

84:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %85 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %86 unwind label %109

86:                                               ; preds = %84
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %85, i32 noundef 27, i32 noundef 5)
          to label %87 unwind label %111

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

88:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %89 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %90 unwind label %109

90:                                               ; preds = %88
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %89, i32 noundef 28, i32 noundef 5)
          to label %91 unwind label %111

91:                                               ; preds = %90
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  invoke void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8) %89)
          to label %92 unwind label %114

92:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %93 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %94 unwind label %109

94:                                               ; preds = %92
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %93, i32 noundef 29, i32 noundef 5)
          to label %95 unwind label %111

95:                                               ; preds = %94
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  invoke void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8) %93)
          to label %96 unwind label %114

96:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %97 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %98 unwind label %109

98:                                               ; preds = %96
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %97, i32 noundef 30, i32 noundef 5)
          to label %99 unwind label %111

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

100:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %101 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %102 unwind label %109

102:                                              ; preds = %100
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %101, i32 noundef 31, i32 noundef 5)
          to label %103 unwind label %111

103:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  invoke void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8) %101)
          to label %104 unwind label %114

104:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN3tbb4task13allocate_rootEv()
  %105 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 16, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %106 unwind label %109

106:                                              ; preds = %104
  invoke void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %105, i32 noundef 32, i32 noundef 5)
          to label %107 unwind label %111

107:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  invoke void @_ZN3tbb4task19spawn_root_and_waitERS0_(ptr noundef nonnull align 8 dereferenceable(8) %105)
          to label %108 unwind label %114

108:                                              ; preds = %107
  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

109:                                              ; preds = %104, %100, %96, %92, %88, %84, %80, %76, %72, %68, %64, %60, %56, %52, %48, %44, %40, %36, %32, %28, %24, %20, %16, %12, %8
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %113

111:                                              ; preds = %106, %102, %98, %94, %90, %86, %82, %78, %74, %70, %66, %62, %58, %54, %50, %46, %42, %38, %34, %30, %26, %22, %18, %14, %10
  %.lcssa = phi ptr [ %9, %10 ], [ %13, %14 ], [ %17, %18 ], [ %21, %22 ], [ %25, %26 ], [ %29, %30 ], [ %33, %34 ], [ %37, %38 ], [ %41, %42 ], [ %45, %46 ], [ %49, %50 ], [ %53, %54 ], [ %57, %58 ], [ %61, %62 ], [ %65, %66 ], [ %69, %70 ], [ %73, %74 ], [ %77, %78 ], [ %81, %82 ], [ %85, %86 ], [ %89, %90 ], [ %93, %94 ], [ %97, %98 ], [ %101, %102 ], [ %105, %106 ]
  %112 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvRKN3tbb8internal19allocate_root_proxyE(ptr noundef %.lcssa, ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  br label %113

113:                                              ; preds = %111, %109
  %.pn = phi { ptr, i32 } [ %112, %111 ], [ %110, %109 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  br label %116

114:                                              ; preds = %107, %103, %99, %95, %91, %87, %83, %79, %75, %71, %67, %63, %59, %55, %51, %47, %43, %39, %35, %31, %27, %23, %19, %15, %11
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %116

116:                                              ; preds = %114, %113
  %.pn11 = phi { ptr, i32 } [ %115, %114 ], [ %.pn, %113 ]
  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 } %.pn11
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13TaskGeneratorC2Eii(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, i32 noundef) unnamed_addr #2 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 = !{}


; Effective O3 passes: GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LoopRotatePass,SROAPass,SimplifyCFGPass,TailCallElimPass