; LLVM IR from aras-p/ToyPathTracer :: Cpp/Source/enkiTS (TaskScheduler)

; 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.enki::ThreadArgs" = type { i32, ptr }
%"class.enki::TaskScheduler" = type <{ [3 x ptr], [3 x ptr], i32, [4 x i8], ptr, ptr, %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", i8, %"struct.std::atomic.0", %"struct.std::atomic.0", %"struct.std::atomic.0", i32, [4 x i8], ptr, ptr, i32, i8, [3 x i8], %"struct.enki::TaskSchedulerConfig", %"struct.std::atomic.0", [4 x i8] }>
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i8 }
%"struct.enki::TaskSchedulerConfig" = type { i32, i32, %"struct.enki::ProfilerCallbacks", %"struct.enki::CustomAllocator" }
%"struct.enki::ProfilerCallbacks" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"struct.enki::CustomAllocator" = type { ptr, ptr, ptr }
%"struct.std::atomic.0" = type { %"struct.std::__atomic_base.1" }
%"struct.std::__atomic_base.1" = type { i32 }
%"struct.enki::ThreadDataStore" = type { ptr, %"struct.std::atomic.2", i32, [48 x i8] }
%"struct.std::atomic.2" = type { i32 }

@_ZL13gtl_threadNum = external hidden thread_local global i32, align 4

; 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4enki13TaskScheduler21TaskingThreadFunctionERKNS_10ThreadArgsE(ptr noundef nonnull align 8 dereferenceable(16) %0) #3 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %8 = load ptr, ptr %2, align 8, !tbaa !5
  %9 = getelementptr inbounds %"struct.enki::ThreadArgs", ptr %8, i32 0, i32 0
  %10 = load i32, ptr %9, align 8, !tbaa !9
  store i32 %10, ptr %3, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = getelementptr inbounds %"struct.enki::ThreadArgs", ptr %11, i32 0, i32 1
  %13 = load ptr, ptr %12, align 8, !tbaa !13
  store ptr %13, ptr %4, align 8, !tbaa !5
  %14 = load i32, ptr %3, align 4, !tbaa !12
  %15 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @_ZL13gtl_threadNum)
  store i32 %14, ptr %15, align 4, !tbaa !12
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %16, i32 0, i32 4
  %18 = load ptr, ptr %17, align 8, !tbaa !14
  %19 = load i32, ptr %3, align 4, !tbaa !12
  %20 = zext i32 %19 to i64
  %21 = getelementptr inbounds %"struct.enki::ThreadDataStore", ptr %18, i64 %20
  %22 = getelementptr inbounds %"struct.enki::ThreadDataStore", ptr %21, i32 0, i32 1
  call void @_ZNSt6atomicIN4enki11ThreadStateEE5storeES1_St12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %22, i32 noundef 2, i32 noundef 3) #6
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %23, i32 0, i32 20
  %25 = getelementptr inbounds %"struct.enki::TaskSchedulerConfig", ptr %24, i32 0, i32 2
  %26 = getelementptr inbounds %"struct.enki::ProfilerCallbacks", ptr %25, i32 0, i32 0
  %27 = load ptr, ptr %26, align 8, !tbaa !24
  %28 = load i32, ptr %3, align 4, !tbaa !12
  call void @_ZN12_GLOBAL__N_112SafeCallbackEPFvjEj(ptr noundef %27, i32 noundef %28)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %29 = load i32, ptr %3, align 4, !tbaa !12
  %30 = add i32 %29, 1
  store i32 %30, ptr %6, align 4, !tbaa !12
  br label %31

31:                                               ; preds = %52, %1
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = call noundef zeroext i1 @_ZNK4enki13TaskScheduler15GetIsRunningIntEv(ptr noundef nonnull align 8 dereferenceable(220) %32)
  br i1 %33, label %34, label %53

34:                                               ; preds = %31
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = load i32, ptr %3, align 4, !tbaa !12
  %37 = call noundef zeroext i1 @_ZN4enki13TaskScheduler10TryRunTaskEjRj(ptr noundef nonnull align 8 dereferenceable(220) %35, i32 noundef %36, ptr noundef nonnull align 4 dereferenceable(4) %6)
  br i1 %37, label %51, label %38

38:                                               ; preds = %34
  %39 = load i32, ptr %5, align 4, !tbaa !12
  %40 = add i32 %39, 1
  store i32 %40, ptr %5, align 4, !tbaa !12
  %41 = load i32, ptr %5, align 4, !tbaa !12
  %42 = icmp ugt i32 %41, 10
  br i1 %42, label %43, label %46

43:                                               ; preds = %38
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = load i32, ptr %3, align 4, !tbaa !12
  call void @_ZN4enki13TaskScheduler15WaitForNewTasksEj(ptr noundef nonnull align 8 dereferenceable(220) %44, i32 noundef %45)
  br label %50

46:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %47 = load i32, ptr %5, align 4, !tbaa !12
  %48 = mul i32 %47, 100
  store i32 %48, ptr %7, align 4, !tbaa !12
  %49 = load i32, ptr %7, align 4, !tbaa !12
  call void @_ZN12_GLOBAL__N_18SpinWaitEj(i32 noundef %49)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %50

50:                                               ; preds = %46, %43
  br label %52

51:                                               ; preds = %34
  store i32 0, ptr %5, align 4, !tbaa !12
  br label %52

52:                                               ; preds = %51, %50
  br label %31, !llvm.loop !25

53:                                               ; preds = %31
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %54, i32 0, i32 10
  %56 = call noundef i32 @_ZNSt13__atomic_baseIiE9fetch_subEiSt12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %55, i32 noundef 1, i32 noundef 3) #6
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %57, i32 0, i32 4
  %59 = load ptr, ptr %58, align 8, !tbaa !14
  %60 = load i32, ptr %3, align 4, !tbaa !12
  %61 = zext i32 %60 to i64
  %62 = getelementptr inbounds %"struct.enki::ThreadDataStore", ptr %59, i64 %61
  %63 = getelementptr inbounds %"struct.enki::ThreadDataStore", ptr %62, i32 0, i32 1
  call void @_ZNSt6atomicIN4enki11ThreadStateEE5storeES1_St12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %63, i32 noundef 9, i32 noundef 3) #6
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %64, i32 0, i32 20
  %66 = getelementptr inbounds %"struct.enki::TaskSchedulerConfig", ptr %65, i32 0, i32 2
  %67 = getelementptr inbounds %"struct.enki::ProfilerCallbacks", ptr %66, i32 0, i32 1
  %68 = load ptr, ptr %67, align 8, !tbaa !27
  %69 = load i32, ptr %3, align 4, !tbaa !12
  call void @_ZN12_GLOBAL__N_112SafeCallbackEPFvjEj(ptr noundef %68, i32 noundef %69)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  ret void
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_112SafeCallbackEPFvjEj(ptr noundef, i32 noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4enki13TaskScheduler15GetIsRunningIntEv(ptr noundef nonnull align 8 dereferenceable(220)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4enki13TaskScheduler10TryRunTaskEjRj(ptr noundef nonnull align 8 dereferenceable(220), i32 noundef, ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN12_GLOBAL__N_18SpinWaitEj(i32 noundef) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 = { alwaysinline 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSN4enki10ThreadArgsE", !11, i64 0, !6, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!10, !6, i64 8}
!14 = !{!15, !6, i64 56}
!15 = !{!"_ZTSN4enki13TaskSchedulerE", !7, i64 0, !7, i64 24, !11, i64 48, !6, i64 56, !6, i64 64, !16, i64 72, !16, i64 73, !16, i64 74, !19, i64 76, !19, i64 80, !19, i64 84, !11, i64 88, !6, i64 96, !6, i64 104, !11, i64 112, !18, i64 116, !21, i64 120, !19, i64 216}
!16 = !{!"_ZTSSt6atomicIbE", !17, i64 0}
!17 = !{!"_ZTSSt13__atomic_baseIbE", !18, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTSSt6atomicIiE", !20, i64 0}
!20 = !{!"_ZTSSt13__atomic_baseIiE", !11, i64 0}
!21 = !{!"_ZTSN4enki19TaskSchedulerConfigE", !11, i64 0, !11, i64 4, !22, i64 8, !23, i64 72}
!22 = !{!"_ZTSN4enki17ProfilerCallbacksE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!23 = !{!"_ZTSN4enki15CustomAllocatorE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!15, !6, i64 128}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!15, !6, i64 136}


; 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.enki::ThreadDataStore" = type { ptr, %"struct.std::atomic.2", i32, [48 x i8] }
%"struct.std::atomic.2" = type { i32 }

@_ZL13gtl_threadNum = external hidden thread_local local_unnamed_addr global i32, align 4

; 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 nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4enki13TaskScheduler21TaskingThreadFunctionERKNS_10ThreadArgsE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(16) %0) local_unnamed_addr #3 align 2 {
  %2 = alloca i32, align 4
  %3 = load i32, ptr %0, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = load ptr, ptr %4, align 8, !tbaa !11
  %6 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @_ZL13gtl_threadNum)
  store i32 %3, ptr %6, align 4, !tbaa !12
  %7 = getelementptr inbounds i8, ptr %5, i64 56
  %8 = load ptr, ptr %7, align 8, !tbaa !13
  %9 = zext i32 %3 to i64
  %10 = getelementptr inbounds %"struct.enki::ThreadDataStore", ptr %8, i64 %9, i32 1
  tail call void @_ZNSt6atomicIN4enki11ThreadStateEE5storeES1_St12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %10, i32 noundef 2, i32 noundef 3) #6
  %11 = getelementptr inbounds i8, ptr %5, i64 128
  %12 = load ptr, ptr %11, align 8, !tbaa !23
  tail call void @_ZN12_GLOBAL__N_112SafeCallbackEPFvjEj(ptr noundef %12, i32 noundef %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %13 = add i32 %3, 1
  store i32 %13, ptr %2, align 4, !tbaa !12
  %14 = tail call noundef zeroext i1 @_ZNK4enki13TaskScheduler15GetIsRunningIntEv(ptr noundef nonnull align 8 dereferenceable(220) %5)
  br i1 %14, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %1, %22
  %.023 = phi i32 [ %.1, %22 ], [ 0, %1 ]
  %15 = call noundef zeroext i1 @_ZN4enki13TaskScheduler10TryRunTaskEjRj(ptr noundef nonnull align 8 dereferenceable(220) %5, i32 noundef %3, ptr noundef nonnull align 4 dereferenceable(4) %2)
  br i1 %15, label %22, label %16

16:                                               ; preds = %.lr.ph
  %17 = add i32 %.023, 1
  %18 = icmp ugt i32 %17, 10
  br i1 %18, label %19, label %20

19:                                               ; preds = %16
  call void @_ZN4enki13TaskScheduler15WaitForNewTasksEj(ptr noundef nonnull align 8 dereferenceable(220) %5, i32 noundef %3)
  br label %22

20:                                               ; preds = %16
  %21 = mul nuw nsw i32 %17, 100
  call void @_ZN12_GLOBAL__N_18SpinWaitEj(i32 noundef %21)
  br label %22

22:                                               ; preds = %.lr.ph, %19, %20
  %.1 = phi i32 [ %17, %19 ], [ %17, %20 ], [ 0, %.lr.ph ]
  %23 = call noundef zeroext i1 @_ZNK4enki13TaskScheduler15GetIsRunningIntEv(ptr noundef nonnull align 8 dereferenceable(220) %5)
  br i1 %23, label %.lr.ph, label %._crit_edge, !llvm.loop !24

._crit_edge:                                      ; preds = %22, %1
  %24 = getelementptr inbounds i8, ptr %5, i64 76
  %25 = call noundef i32 @_ZNSt13__atomic_baseIiE9fetch_subEiSt12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %24, i32 noundef 1, i32 noundef 3) #6
  %26 = load ptr, ptr %7, align 8, !tbaa !13
  %27 = getelementptr inbounds %"struct.enki::ThreadDataStore", ptr %26, i64 %9, i32 1
  call void @_ZNSt6atomicIN4enki11ThreadStateEE5storeES1_St12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %27, i32 noundef 9, i32 noundef 3) #6
  %28 = getelementptr inbounds i8, ptr %5, i64 136
  %29 = load ptr, ptr %28, align 8, !tbaa !26
  call void @_ZN12_GLOBAL__N_112SafeCallbackEPFvjEj(ptr noundef %29, i32 noundef %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  ret void
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_112SafeCallbackEPFvjEj(ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4enki13TaskScheduler15GetIsRunningIntEv(ptr noundef nonnull align 8 dereferenceable(220)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN12_GLOBAL__N_18SpinWaitEj(i32 noundef) local_unnamed_addr #2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 = { alwaysinline 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 #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, !7, i64 0}
!6 = !{!"_ZTSN4enki10ThreadArgsE", !7, i64 0, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !10, i64 8}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !10, i64 56}
!14 = !{!"_ZTSN4enki13TaskSchedulerE", !8, i64 0, !8, i64 24, !7, i64 48, !10, i64 56, !10, i64 64, !15, i64 72, !15, i64 73, !15, i64 74, !18, i64 76, !18, i64 80, !18, i64 84, !7, i64 88, !10, i64 96, !10, i64 104, !7, i64 112, !17, i64 116, !20, i64 120, !18, i64 216}
!15 = !{!"_ZTSSt6atomicIbE", !16, i64 0}
!16 = !{!"_ZTSSt13__atomic_baseIbE", !17, i64 0}
!17 = !{!"bool", !8, i64 0}
!18 = !{!"_ZTSSt6atomicIiE", !19, i64 0}
!19 = !{!"_ZTSSt13__atomic_baseIiE", !7, i64 0}
!20 = !{!"_ZTSN4enki19TaskSchedulerConfigE", !7, i64 0, !7, i64 4, !21, i64 8, !22, i64 72}
!21 = !{!"_ZTSN4enki17ProfilerCallbacksE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56}
!22 = !{!"_ZTSN4enki15CustomAllocatorE", !10, i64 0, !10, i64 8, !10, i64 16}
!23 = !{!14, !10, i64 128}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!14, !10, i64 136}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass