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

; 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"

%"struct.tbb::atomic" = type { %"struct.tbb::internal::atomic_impl_with_arithmetic" }
%"struct.tbb::internal::atomic_impl_with_arithmetic" = type { %"struct.tbb::internal::atomic_impl" }
%"struct.tbb::internal::atomic_impl" = type { %"struct.tbb::internal::aligned_storage" }
%"struct.tbb::internal::aligned_storage" = type { i32 }
%"class.Harness::SpinBarrier" = type <{ i32, %"struct.tbb::atomic.0", %"struct.tbb::atomic.0", i8, [3 x i8] }>
%"struct.tbb::atomic.0" = type { %"struct.tbb::internal::atomic_impl_with_arithmetic.1" }
%"struct.tbb::internal::atomic_impl_with_arithmetic.1" = type { %"struct.tbb::internal::atomic_impl.2" }
%"struct.tbb::internal::atomic_impl.2" = type { %"struct.tbb::internal::aligned_storage.3" }
%"struct.tbb::internal::aligned_storage.3" = type { i32 }
%class.TestFunc1 = type { ptr }
%"class.tbb::aligned_space" = type { [48 x %"struct.tbb::internal::type_with_alignment"] }
%"struct.tbb::internal::type_with_alignment" = type { %"struct.tbb::internal::__TBB_machine_type_with_alignment_8" }
%"struct.tbb::internal::__TBB_machine_type_with_alignment_8" = type { [2 x i32] }
%class.NativeParallelForTask = type { i64, i8, %class.TestFunc1 }

@FinishedTasks = external dso_local global %"struct.tbb::atomic", align 4
@_ZL8MaxTasks = external hidden constant i32, align 4
@_ZL9MaxThread = external hidden global i32, align 4
@.str.20 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.22 = 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: 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) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Harness5SleepEi(i32 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5Test1v() #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.Harness::SpinBarrier", align 4
  %5 = alloca %class.TestFunc1, align 8
  %6 = alloca %"class.tbb::aligned_space", align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 2, ptr %3, align 4, !tbaa !5
  %11 = call noundef i32 @_Z3maxIiiET_RKS0_RKT0_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) @_ZL9MaxThread)
  store i32 %11, ptr %2, align 4, !tbaa !5
  %12 = call noundef i32 @_Z3minIiiET_RKS0_RKT0_(ptr noundef nonnull align 4 dereferenceable(4) @_ZL8MaxTasks, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  store i32 %12, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #3
  %13 = load i32, ptr %1, align 4, !tbaa !5
  call void @_ZN7Harness11SpinBarrierC2Ejb(ptr noundef nonnull align 4 dereferenceable(13) %4, i32 noundef %13, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @_ZN9TestFunc1C2ERN7Harness11SpinBarrierE(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(13) %4)
  %14 = call noundef i32 @_ZN3tbb6atomicIiEaSEi(ptr noundef nonnull align 4 dereferenceable(4) @FinishedTasks, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 384, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %30, %0
  %16 = load i32, ptr %7, align 4, !tbaa !5
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %18 = icmp slt i32 %16, %17
  br i1 %18, label %20, label %19

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

20:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %21 = call noundef ptr @_ZNK3tbb13aligned_spaceI21NativeParallelForTaskIb9TestFunc1ELm16EE5beginEv(ptr noundef nonnull align 8 dereferenceable(384) %6)
  %22 = load i32, ptr %7, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds %class.NativeParallelForTask, ptr %21, i64 %23
  store ptr %24, ptr %8, align 8, !tbaa !9
  %25 = load ptr, ptr %8, align 8, !tbaa !9
  %26 = load i32, ptr %7, align 4, !tbaa !5
  %27 = srem i32 %26, 2
  %28 = icmp eq i32 %27, 0
  call void @_ZN21NativeParallelForTaskIb9TestFunc1EC2EbRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %25, i1 noundef zeroext %28, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %29 = load ptr, ptr %8, align 8, !tbaa !9
  call void @_ZN21NativeParallelForTaskIb9TestFunc1E5startEv(ptr noundef nonnull align 8 dereferenceable(24) %29)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  br label %30

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

33:                                               ; preds = %19
  call void @_ZN7Harness5SleepEi(i32 noundef 1000)
  %34 = call noundef i32 @_ZNVK3tbb8internal11atomic_implIiEcviEv(ptr noundef nonnull align 4 dereferenceable(4) @FinishedTasks)
  %35 = load i32, ptr %1, align 4, !tbaa !5
  %36 = icmp eq i32 %34, %35
  br i1 %36, label %37, label %38

37:                                               ; preds = %33
  br label %39

38:                                               ; preds = %33
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.20, i32 noundef 64, ptr noundef @.str.21, ptr noundef @.str.22)
  br label %39

39:                                               ; preds = %38, %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %52, %39
  %41 = load i32, ptr %9, align 4, !tbaa !5
  %42 = load i32, ptr %1, align 4, !tbaa !5
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %55

45:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %46 = call noundef ptr @_ZNK3tbb13aligned_spaceI21NativeParallelForTaskIb9TestFunc1ELm16EE5beginEv(ptr noundef nonnull align 8 dereferenceable(384) %6)
  %47 = load i32, ptr %9, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds %class.NativeParallelForTask, ptr %46, i64 %48
  store ptr %49, ptr %10, align 8, !tbaa !9
  %50 = load ptr, ptr %10, align 8, !tbaa !9
  call void @_ZN21NativeParallelForTaskIb9TestFunc1E14wait_to_finishEv(ptr noundef nonnull align 8 dereferenceable(24) %50)
  %51 = load ptr, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br label %52

52:                                               ; preds = %45
  %53 = load i32, ptr %9, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %9, align 4, !tbaa !5
  br label %40, !llvm.loop !13

55:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 384, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #3
  ret void
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Harness11SpinBarrierC2Ejb(ptr noundef nonnull align 4 dereferenceable(13), i32 noundef, i1 noundef zeroext) unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN21NativeParallelForTaskIb9TestFunc1EC2EbRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; 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"

%"struct.tbb::atomic" = type { %"struct.tbb::internal::atomic_impl_with_arithmetic" }
%"struct.tbb::internal::atomic_impl_with_arithmetic" = type { %"struct.tbb::internal::atomic_impl" }
%"struct.tbb::internal::atomic_impl" = type { %"struct.tbb::internal::aligned_storage" }
%"struct.tbb::internal::aligned_storage" = type { i32 }
%"class.Harness::SpinBarrier" = type <{ i32, %"struct.tbb::atomic.0", %"struct.tbb::atomic.0", i8, [3 x i8] }>
%"struct.tbb::atomic.0" = type { %"struct.tbb::internal::atomic_impl_with_arithmetic.1" }
%"struct.tbb::internal::atomic_impl_with_arithmetic.1" = type { %"struct.tbb::internal::atomic_impl.2" }
%"struct.tbb::internal::atomic_impl.2" = type { %"struct.tbb::internal::aligned_storage.3" }
%"struct.tbb::internal::aligned_storage.3" = type { i32 }
%class.TestFunc1 = type { ptr }
%"class.tbb::aligned_space" = type { [48 x %"struct.tbb::internal::type_with_alignment"] }
%"struct.tbb::internal::type_with_alignment" = type { %"struct.tbb::internal::__TBB_machine_type_with_alignment_8" }
%"struct.tbb::internal::__TBB_machine_type_with_alignment_8" = type { [2 x i32] }
%class.NativeParallelForTask = type { i64, i8, %class.TestFunc1 }

@FinishedTasks = external dso_local global %"struct.tbb::atomic", align 4
@_ZL8MaxTasks = external hidden constant i32, align 4
@_ZL9MaxThread = external hidden global i32, align 4
@.str.20 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.22 = 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 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 #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Harness5SleepEi(i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5Test1v() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.Harness::SpinBarrier", align 4
  %4 = alloca %class.TestFunc1, align 8
  %5 = alloca %"class.tbb::aligned_space", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #3
  store i32 2, ptr %2, align 4, !tbaa !5
  %6 = call noundef i32 @_Z3maxIiiET_RKS0_RKT0_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) @_ZL9MaxThread)
  store i32 %6, ptr %1, align 4, !tbaa !5
  %7 = call noundef i32 @_Z3minIiiET_RKS0_RKT0_(ptr noundef nonnull align 4 dereferenceable(4) @_ZL8MaxTasks, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #3
  call void @_ZN7Harness11SpinBarrierC2Ejb(ptr noundef nonnull align 4 dereferenceable(13) %3, i32 noundef %7, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  call void @_ZN9TestFunc1C2ERN7Harness11SpinBarrierE(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(13) %3)
  %8 = call noundef i32 @_ZN3tbb6atomicIiEaSEi(ptr noundef nonnull align 4 dereferenceable(4) @FinishedTasks, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %5) #3
  %9 = icmp sgt i32 %7, 0
  br i1 %9, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %0
  %wide.trip.count = zext nneg i32 %7 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @_ZN7Harness5SleepEi(i32 noundef 1000)
  %10 = call noundef i32 @_ZNVK3tbb8internal11atomic_implIiEcviEv(ptr noundef nonnull align 4 dereferenceable(4) @FinishedTasks)
  %11 = icmp eq i32 %10, %7
  br i1 %11, label %17, label %16

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %12 = call noundef ptr @_ZNK3tbb13aligned_spaceI21NativeParallelForTaskIb9TestFunc1ELm16EE5beginEv(ptr noundef nonnull align 8 dereferenceable(384) %5)
  %13 = getelementptr inbounds %class.NativeParallelForTask, ptr %12, i64 %indvars.iv
  %14 = and i64 %indvars.iv, 1
  %15 = icmp eq i64 %14, 0
  call void @_ZN21NativeParallelForTaskIb9TestFunc1EC2EbRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %13, i1 noundef zeroext %15, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @_ZN21NativeParallelForTaskIb9TestFunc1E5startEv(ptr noundef nonnull align 8 dereferenceable(24) %13)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

16:                                               ; preds = %._crit_edge
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 64, ptr noundef nonnull @.str.21, ptr noundef nonnull @.str.22)
  br label %17

17:                                               ; preds = %._crit_edge, %16
  br i1 %9, label %.lr.ph19.preheader, label %._crit_edge20

.lr.ph19.preheader:                               ; preds = %17
  %wide.trip.count25 = zext nneg i32 %7 to i64
  br label %.lr.ph19

._crit_edge20:                                    ; preds = %.lr.ph19, %17
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #3
  ret void

.lr.ph19:                                         ; preds = %.lr.ph19.preheader, %.lr.ph19
  %indvars.iv22 = phi i64 [ 0, %.lr.ph19.preheader ], [ %indvars.iv.next23, %.lr.ph19 ]
  %18 = call noundef ptr @_ZNK3tbb13aligned_spaceI21NativeParallelForTaskIb9TestFunc1ELm16EE5beginEv(ptr noundef nonnull align 8 dereferenceable(384) %5)
  %19 = getelementptr inbounds %class.NativeParallelForTask, ptr %18, i64 %indvars.iv22
  call void @_ZN21NativeParallelForTaskIb9TestFunc1E14wait_to_finishEv(ptr noundef nonnull align 8 dereferenceable(24) %19)
  %indvars.iv.next23 = add nuw nsw i64 %indvars.iv22, 1
  %exitcond26.not = icmp eq i64 %indvars.iv.next23, %wide.trip.count25
  br i1 %exitcond26.not, label %._crit_edge20, label %.lr.ph19, !llvm.loop !11
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Harness11SpinBarrierC2Ejb(ptr noundef nonnull align 4 dereferenceable(13), i32 noundef, i1 noundef zeroext) unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN21NativeParallelForTaskIb9TestFunc1EC2EbRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

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


; Effective O3 passes: GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass