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

; 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__._Z41TestWaitDiscriminativenessWithoutStealingv = external hidden unnamed_addr constant [42 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [32 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: inlinehint mustprogress uwtable
declare dso_local void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

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

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

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

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

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

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

declare void @_ZN3tbb10interface58internal9task_base7destroyERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

16:                                               ; preds = %0
  br label %19

17:                                               ; preds = %0
  %18 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str.17, i64 noundef 631, ptr noundef @__FUNCTION__._Z41TestWaitDiscriminativenessWithoutStealingv)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %18, ptr noundef @.str.34)
  br label %19

19:                                               ; preds = %17, %16
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #6
  call void @_ZN3tbb19task_scheduler_initC2Eim(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef 1, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #6
  invoke void @_ZN3tbb4task13allocate_rootEv()
          to label %20 unwind label %36

20:                                               ; preds = %19
  %21 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %22 unwind label %36

22:                                               ; preds = %20
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %23 unwind label %40

23:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #6
  store ptr %21, ptr %2, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  invoke void @_ZN3tbb4task13allocate_rootEv()
          to label %24 unwind label %45

24:                                               ; preds = %23
  %25 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %26 unwind label %45

26:                                               ; preds = %24
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %25)
          to label %27 unwind label %49

27:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  store ptr %25, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 10, ptr %10, align 4, !tbaa !13
  %28 = load ptr, ptr %2, align 8, !tbaa !11
  invoke void @_ZN3tbb4task13set_ref_countEi(ptr noundef nonnull align 8 dereferenceable(8) %28, i32 noundef 11)
          to label %29 unwind label %54

29:                                               ; preds = %27
  %30 = load ptr, ptr %7, align 8, !tbaa !11
  invoke void @_ZN3tbb4task13set_ref_countEi(ptr noundef nonnull align 8 dereferenceable(8) %30, i32 noundef 11)
          to label %31 unwind label %54

31:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !13
  br label %32

32:                                               ; preds = %75, %31
  %33 = load i32, ptr %11, align 4, !tbaa !13
  %34 = icmp slt i32 %33, 10
  br i1 %34, label %58, label %35

35:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %96

36:                                               ; preds = %20, %19
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %4, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %5, align 4
  br label %44

40:                                               ; preds = %22
  %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 @_ZdlPvRKN3tbb8internal19allocate_root_proxyE(ptr noundef %21, ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  br label %44

44:                                               ; preds = %40, %36
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #6
  br label %133

45:                                               ; preds = %24, %23
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %4, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %5, align 4
  br label %53

49:                                               ; preds = %26
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %4, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %5, align 4
  call void @_ZdlPvRKN3tbb8internal19allocate_root_proxyE(ptr noundef %25, ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  br label %53

53:                                               ; preds = %49, %45
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  br label %132

54:                                               ; preds = %127, %124, %122, %116, %114, %112, %106, %104, %98, %96, %29, %27
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %4, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %5, align 4
  br label %131

58:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %59 = load ptr, ptr %2, align 8, !tbaa !11
  %60 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %59)
          to label %61 unwind label %78

61:                                               ; preds = %58
  %62 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %60)
          to label %63 unwind label %78

63:                                               ; preds = %61
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %62)
          to label %64 unwind label %82

64:                                               ; preds = %63
  store ptr %62, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %65 = load ptr, ptr %7, align 8, !tbaa !11
  %66 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %65)
          to label %67 unwind label %86

67:                                               ; preds = %64
  %68 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %66)
          to label %69 unwind label %86

69:                                               ; preds = %67
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %68)
          to label %70 unwind label %90

70:                                               ; preds = %69
  store ptr %68, ptr %13, align 8, !tbaa !11
  %71 = load ptr, ptr %12, align 8, !tbaa !11
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %71)
          to label %72 unwind label %86

72:                                               ; preds = %70
  %73 = load ptr, ptr %13, align 8, !tbaa !11
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %73)
          to label %74 unwind label %86

74:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %75

75:                                               ; preds = %74
  %76 = load i32, ptr %11, align 4, !tbaa !13
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %11, align 4, !tbaa !13
  br label %32, !llvm.loop !15

78:                                               ; preds = %61, %58
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %4, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %5, align 4
  br label %95

82:                                               ; preds = %63
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %4, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %5, align 4
  call void @_ZdlPvRKN3tbb8internal20allocate_child_proxyE(ptr noundef %62, ptr noundef nonnull align 1 dereferenceable(1) %60) #6
  br label %95

86:                                               ; preds = %72, %70, %67, %64
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %4, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %5, align 4
  br label %94

90:                                               ; preds = %69
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %4, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %5, align 4
  call void @_ZdlPvRKN3tbb8internal20allocate_child_proxyE(ptr noundef %68, ptr noundef nonnull align 1 dereferenceable(1) %66) #6
  br label %94

94:                                               ; preds = %90, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %95

95:                                               ; preds = %94, %82, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %131

96:                                               ; preds = %35
  %97 = load ptr, ptr %7, align 8, !tbaa !11
  invoke void @_ZN3tbb4task12wait_for_allEv(ptr noundef nonnull align 8 dereferenceable(8) %97)
          to label %98 unwind label %54

98:                                               ; preds = %96
  %99 = load ptr, ptr %7, align 8, !tbaa !11
  %100 = invoke noundef i32 @_ZNK3tbb4task9ref_countEv(ptr noundef nonnull align 8 dereferenceable(8) %99)
          to label %101 unwind label %54

101:                                              ; preds = %98
  %102 = icmp sle i32 %100, 1
  br i1 %102, label %103, label %104

103:                                              ; preds = %101
  br label %106

104:                                              ; preds = %101
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.17, i32 noundef 646, ptr noundef @.str.35, ptr noundef @.str.36)
          to label %105 unwind label %54

105:                                              ; preds = %104
  br label %106

106:                                              ; preds = %105, %103
  %107 = load ptr, ptr %2, align 8, !tbaa !11
  %108 = invoke noundef i32 @_ZNK3tbb4task9ref_countEv(ptr noundef nonnull align 8 dereferenceable(8) %107)
          to label %109 unwind label %54

109:                                              ; preds = %106
  %110 = icmp sgt i32 %108, 1
  br i1 %110, label %111, label %112

111:                                              ; preds = %109
  br label %114

112:                                              ; preds = %109
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.17, i32 noundef 647, ptr noundef @.str.37, ptr noundef @.str.38)
          to label %113 unwind label %54

113:                                              ; preds = %112
  br label %114

114:                                              ; preds = %113, %111
  %115 = load ptr, ptr %2, align 8, !tbaa !11
  invoke void @_ZN3tbb4task12wait_for_allEv(ptr noundef nonnull align 8 dereferenceable(8) %115)
          to label %116 unwind label %54

116:                                              ; preds = %114
  %117 = load ptr, ptr %2, align 8, !tbaa !11
  %118 = invoke noundef i32 @_ZNK3tbb4task9ref_countEv(ptr noundef nonnull align 8 dereferenceable(8) %117)
          to label %119 unwind label %54

119:                                              ; preds = %116
  %120 = icmp sle i32 %118, 1
  br i1 %120, label %121, label %122

121:                                              ; preds = %119
  br label %124

122:                                              ; preds = %119
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.17, i32 noundef 649, ptr noundef @.str.39, ptr noundef @.str.40)
          to label %123 unwind label %54

123:                                              ; preds = %122
  br label %124

124:                                              ; preds = %123, %121
  %125 = load ptr, ptr %2, align 8, !tbaa !11
  %126 = load ptr, ptr %2, align 8, !tbaa !11
  invoke void @_ZN3tbb10interface58internal9task_base7destroyERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %126)
          to label %127 unwind label %54

127:                                              ; preds = %124
  %128 = load ptr, ptr %7, align 8, !tbaa !11
  %129 = load ptr, ptr %7, align 8, !tbaa !11
  invoke void @_ZN3tbb10interface58internal9task_base7destroyERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %129)
          to label %130 unwind label %54

130:                                              ; preds = %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  call void @_ZN3tbb19task_scheduler_initD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #6
  ret void

131:                                              ; preds = %95, %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %132

132:                                              ; preds = %131, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %133

133:                                              ; preds = %132, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  call void @_ZN3tbb19task_scheduler_initD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #6
  br label %134

134:                                              ; preds = %133
  %135 = load ptr, ptr %4, align 8
  %136 = load i32, ptr %5, align 4
  %137 = insertvalue { ptr, i32 } poison, ptr %135, 0
  %138 = insertvalue { ptr, i32 } %137, i32 %136, 1
  resume { ptr, i32 } %138
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3tbb4task9ref_countEv(ptr noundef nonnull align 8 dereferenceable(8)) #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !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__._Z41TestWaitDiscriminativenessWithoutStealingv = external hidden unnamed_addr constant [42 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [32 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: inlinehint mustprogress uwtable
declare dso_local void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

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

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

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

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

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

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

declare void @_ZN3tbb10interface58internal9task_base7destroyERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local void @_Z41TestWaitDiscriminativenessWithoutStealingv() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.tbb::task_scheduler_init", align 8
  %2 = alloca %"class.tbb::internal::allocate_root_proxy", align 1
  %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 = %0
  %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 631, ptr noundef nonnull @__FUNCTION__._Z41TestWaitDiscriminativenessWithoutStealingv)
  tail call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %7, ptr noundef nonnull @.str.34)
  br label %8

8:                                                ; preds = %0, %6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @_ZN3tbb19task_scheduler_initC2Eim(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef 1, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #6
  call void @_ZN3tbb4task13allocate_rootEv()
  %9 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %10 unwind label %17

10:                                               ; preds = %8
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %11 unwind label %19

11:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #6
  call void @_ZN3tbb4task13allocate_rootEv()
  %12 = invoke noundef ptr @_ZnwmRKN3tbb8internal19allocate_root_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %13 unwind label %22

13:                                               ; preds = %11
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %14 unwind label %24

14:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  call void @_ZN3tbb4task13set_ref_countEi(ptr noundef nonnull align 8 dereferenceable(8) %9, i32 noundef 11)
  call void @_ZN3tbb4task13set_ref_countEi(ptr noundef nonnull align 8 dereferenceable(8) %12, i32 noundef 11)
  %15 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %16 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %29 unwind label %127

17:                                               ; preds = %8
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %21

19:                                               ; preds = %10
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvRKN3tbb8internal19allocate_root_proxyE(ptr noundef %9, ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  br label %21

21:                                               ; preds = %19, %17
  %.pn = phi { ptr, i32 } [ %20, %19 ], [ %18, %17 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #6
  br label %151

22:                                               ; preds = %11
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %26

24:                                               ; preds = %13
  %25 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvRKN3tbb8internal19allocate_root_proxyE(ptr noundef %12, ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  br label %26

26:                                               ; preds = %24, %22
  %.pn27 = phi { ptr, i32 } [ %25, %24 ], [ %23, %22 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  br label %151

27:                                               ; preds = %149, %148, %147, %143, %142, %138, %126
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %151

29:                                               ; preds = %14
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %30 unwind label %129

30:                                               ; preds = %29
  %31 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %32 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %33 unwind label %131

33:                                               ; preds = %30
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %32)
          to label %34 unwind label %133

34:                                               ; preds = %33
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %35 unwind label %131

35:                                               ; preds = %34
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %32)
          to label %36 unwind label %131

36:                                               ; preds = %35
  %37 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %38 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %37)
          to label %39 unwind label %127

39:                                               ; preds = %36
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %38)
          to label %40 unwind label %129

40:                                               ; preds = %39
  %41 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %42 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %41)
          to label %43 unwind label %131

43:                                               ; preds = %40
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %42)
          to label %44 unwind label %133

44:                                               ; preds = %43
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %38)
          to label %45 unwind label %131

45:                                               ; preds = %44
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %42)
          to label %46 unwind label %131

46:                                               ; preds = %45
  %47 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %48 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %47)
          to label %49 unwind label %127

49:                                               ; preds = %46
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %48)
          to label %50 unwind label %129

50:                                               ; preds = %49
  %51 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %52 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %51)
          to label %53 unwind label %131

53:                                               ; preds = %50
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %52)
          to label %54 unwind label %133

54:                                               ; preds = %53
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %48)
          to label %55 unwind label %131

55:                                               ; preds = %54
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %52)
          to label %56 unwind label %131

56:                                               ; preds = %55
  %57 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %58 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %57)
          to label %59 unwind label %127

59:                                               ; preds = %56
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %58)
          to label %60 unwind label %129

60:                                               ; preds = %59
  %61 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %62 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %61)
          to label %63 unwind label %131

63:                                               ; preds = %60
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %62)
          to label %64 unwind label %133

64:                                               ; preds = %63
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %58)
          to label %65 unwind label %131

65:                                               ; preds = %64
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %62)
          to label %66 unwind label %131

66:                                               ; preds = %65
  %67 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %68 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %67)
          to label %69 unwind label %127

69:                                               ; preds = %66
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %68)
          to label %70 unwind label %129

70:                                               ; preds = %69
  %71 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %72 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %71)
          to label %73 unwind label %131

73:                                               ; preds = %70
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %72)
          to label %74 unwind label %133

74:                                               ; preds = %73
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %68)
          to label %75 unwind label %131

75:                                               ; preds = %74
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %72)
          to label %76 unwind label %131

76:                                               ; preds = %75
  %77 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %78 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %77)
          to label %79 unwind label %127

79:                                               ; preds = %76
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %78)
          to label %80 unwind label %129

80:                                               ; preds = %79
  %81 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %82 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %81)
          to label %83 unwind label %131

83:                                               ; preds = %80
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %82)
          to label %84 unwind label %133

84:                                               ; preds = %83
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %78)
          to label %85 unwind label %131

85:                                               ; preds = %84
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %82)
          to label %86 unwind label %131

86:                                               ; preds = %85
  %87 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %88 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %87)
          to label %89 unwind label %127

89:                                               ; preds = %86
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %88)
          to label %90 unwind label %129

90:                                               ; preds = %89
  %91 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %92 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %91)
          to label %93 unwind label %131

93:                                               ; preds = %90
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %92)
          to label %94 unwind label %133

94:                                               ; preds = %93
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %88)
          to label %95 unwind label %131

95:                                               ; preds = %94
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %92)
          to label %96 unwind label %131

96:                                               ; preds = %95
  %97 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %98 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %97)
          to label %99 unwind label %127

99:                                               ; preds = %96
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %98)
          to label %100 unwind label %129

100:                                              ; preds = %99
  %101 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %102 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %101)
          to label %103 unwind label %131

103:                                              ; preds = %100
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %102)
          to label %104 unwind label %133

104:                                              ; preds = %103
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %98)
          to label %105 unwind label %131

105:                                              ; preds = %104
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %102)
          to label %106 unwind label %131

106:                                              ; preds = %105
  %107 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %108 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %107)
          to label %109 unwind label %127

109:                                              ; preds = %106
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %108)
          to label %110 unwind label %129

110:                                              ; preds = %109
  %111 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %112 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %111)
          to label %113 unwind label %131

113:                                              ; preds = %110
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %112)
          to label %114 unwind label %133

114:                                              ; preds = %113
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %108)
          to label %115 unwind label %131

115:                                              ; preds = %114
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %112)
          to label %116 unwind label %131

116:                                              ; preds = %115
  %117 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %118 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %117)
          to label %119 unwind label %127

119:                                              ; preds = %116
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %118)
          to label %120 unwind label %129

120:                                              ; preds = %119
  %121 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN3tbb4task14allocate_childEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %122 = invoke noundef ptr @_ZnwmRKN3tbb8internal20allocate_child_proxyE(i64 noundef 8, ptr noundef nonnull align 1 dereferenceable(1) %121)
          to label %123 unwind label %131

123:                                              ; preds = %120
  invoke void @_ZN3tbb10empty_taskC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %122)
          to label %124 unwind label %133

124:                                              ; preds = %123
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %118)
          to label %125 unwind label %131

125:                                              ; preds = %124
  invoke void @_ZN3tbb10interface58internal9task_base5spawnERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %122)
          to label %126 unwind label %131

126:                                              ; preds = %125
  invoke void @_ZN3tbb4task12wait_for_allEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %135 unwind label %27

127:                                              ; preds = %116, %106, %96, %86, %76, %66, %56, %46, %36, %14
  %128 = landingpad { ptr, i32 }
          cleanup
  br label %151

129:                                              ; preds = %119, %109, %99, %89, %79, %69, %59, %49, %39, %29
  %.lcssa49 = phi ptr [ %15, %29 ], [ %37, %39 ], [ %47, %49 ], [ %57, %59 ], [ %67, %69 ], [ %77, %79 ], [ %87, %89 ], [ %97, %99 ], [ %107, %109 ], [ %117, %119 ]
  %.lcssa = phi ptr [ %16, %29 ], [ %38, %39 ], [ %48, %49 ], [ %58, %59 ], [ %68, %69 ], [ %78, %79 ], [ %88, %89 ], [ %98, %99 ], [ %108, %109 ], [ %118, %119 ]
  %130 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvRKN3tbb8internal20allocate_child_proxyE(ptr noundef %.lcssa, ptr noundef nonnull align 1 dereferenceable(1) %.lcssa49) #6
  br label %151

131:                                              ; preds = %125, %124, %120, %115, %114, %110, %105, %104, %100, %95, %94, %90, %85, %84, %80, %75, %74, %70, %65, %64, %60, %55, %54, %50, %45, %44, %40, %35, %34, %30
  %132 = landingpad { ptr, i32 }
          cleanup
  br label %151

133:                                              ; preds = %123, %113, %103, %93, %83, %73, %63, %53, %43, %33
  %.lcssa56 = phi ptr [ %31, %33 ], [ %41, %43 ], [ %51, %53 ], [ %61, %63 ], [ %71, %73 ], [ %81, %83 ], [ %91, %93 ], [ %101, %103 ], [ %111, %113 ], [ %121, %123 ]
  %.lcssa53 = phi ptr [ %32, %33 ], [ %42, %43 ], [ %52, %53 ], [ %62, %63 ], [ %72, %73 ], [ %82, %83 ], [ %92, %93 ], [ %102, %103 ], [ %112, %113 ], [ %122, %123 ]
  %134 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvRKN3tbb8internal20allocate_child_proxyE(ptr noundef %.lcssa53, ptr noundef nonnull align 1 dereferenceable(1) %.lcssa56) #6
  br label %151

135:                                              ; preds = %126
  %136 = call noundef i32 @_ZNK3tbb4task9ref_countEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %137 = icmp slt i32 %136, 2
  br i1 %137, label %139, label %138

138:                                              ; preds = %135
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.17, i32 noundef 646, ptr noundef nonnull @.str.35, ptr noundef nonnull @.str.36)
          to label %139 unwind label %27

139:                                              ; preds = %138, %135
  %140 = call noundef i32 @_ZNK3tbb4task9ref_countEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %141 = icmp sgt i32 %140, 1
  br i1 %141, label %143, label %142

142:                                              ; preds = %139
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.17, i32 noundef 647, ptr noundef nonnull @.str.37, ptr noundef nonnull @.str.38)
          to label %143 unwind label %27

143:                                              ; preds = %142, %139
  invoke void @_ZN3tbb4task12wait_for_allEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %144 unwind label %27

144:                                              ; preds = %143
  %145 = call noundef i32 @_ZNK3tbb4task9ref_countEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
  %146 = icmp slt i32 %145, 2
  br i1 %146, label %148, label %147

147:                                              ; preds = %144
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.17, i32 noundef 649, ptr noundef nonnull @.str.39, ptr noundef nonnull @.str.40)
          to label %148 unwind label %27

148:                                              ; preds = %147, %144
  invoke void @_ZN3tbb10interface58internal9task_base7destroyERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %149 unwind label %27

149:                                              ; preds = %148
  invoke void @_ZN3tbb10interface58internal9task_base7destroyERNS_4taskE(ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %150 unwind label %27

150:                                              ; preds = %149
  call void @_ZN3tbb19task_scheduler_initD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret void

151:                                              ; preds = %26, %127, %129, %133, %131, %27, %21
  %.pn29.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn, %21 ], [ %.pn27, %26 ], [ %28, %27 ], [ %130, %129 ], [ %128, %127 ], [ %132, %131 ], [ %134, %133 ]
  call void @_ZN3tbb19task_scheduler_initD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn29.pn.pn.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3tbb4task9ref_countEv(ptr noundef nonnull align 8 dereferenceable(8)) local_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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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