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

; 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.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 }
%"class.std::thread" = type { %"class.std::thread::id" }
%"class.std::thread::id" = type { i64 }

@.str.3 = external hidden unnamed_addr constant [90 x i8], align 1
@_ZN12_GLOBAL__N_17gc_FileE = external hidden global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [30 x i8], align 1
@__PRETTY_FUNCTION__._ZN4enki13TaskScheduler11StopThreadsEb = external hidden unnamed_addr constant [44 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4enki13TaskScheduler29GetNumFirstExternalTaskThreadEv() #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4enki13TaskScheduler11StopThreadsEb(ptr noundef nonnull align 8 dereferenceable(220) %0, i1 noundef zeroext %1) #4 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %9 = zext i1 %1 to i8
  store i8 %9, ptr %4, align 1, !tbaa !9
  %10 = load ptr, ptr %3, align 8
  %11 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 8
  call void @_ZNSt6atomicIbE5storeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) %11, i1 noundef zeroext true, i32 noundef 3) #6
  %12 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 7
  call void @_ZNSt6atomicIbE5storeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) %12, i1 noundef zeroext true, i32 noundef 3) #6
  %13 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 6
  call void @_ZNSt6atomicIbE5storeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) %13, i1 noundef zeroext false, i32 noundef 3) #6
  %14 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 18
  %15 = load i8, ptr %14, align 4, !tbaa !11, !range !21, !noundef !22
  %16 = trunc i8 %15 to i1
  br i1 %16, label %17, label %161

17:                                               ; preds = %2
  br label %18

18:                                               ; preds = %45, %17
  %19 = load i8, ptr %4, align 1, !tbaa !9, !range !21, !noundef !22
  %20 = trunc i8 %19 to i1
  br i1 %20, label %21, label %25

21:                                               ; preds = %18
  %22 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 10
  %23 = call noundef i32 @_ZNKSt13__atomic_baseIiEcviEv(ptr noundef nonnull align 4 dereferenceable(4) %22) #6
  %24 = icmp ne i32 %23, 0
  br label %25

25:                                               ; preds = %21, %18
  %26 = phi i1 [ false, %18 ], [ %24, %21 ]
  br i1 %26, label %27, label %46

27:                                               ; preds = %25
  call void @_ZN4enki13TaskScheduler22WakeThreadsForNewTasksEv(ptr noundef nonnull align 8 dereferenceable(220) %10)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !23
  br label %28

28:                                               ; preds = %42, %27
  %29 = load i32, ptr %5, align 4, !tbaa !23
  %30 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 2
  %31 = load i32, ptr %30, align 8, !tbaa !24
  %32 = icmp ult i32 %29, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %45

34:                                               ; preds = %28
  %35 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 4
  %36 = load ptr, ptr %35, align 8, !tbaa !25
  %37 = load i32, ptr %5, align 4, !tbaa !23
  %38 = zext i32 %37 to i64
  %39 = getelementptr inbounds %"struct.enki::ThreadDataStore", ptr %36, i64 %38
  %40 = getelementptr inbounds %"struct.enki::ThreadDataStore", ptr %39, i32 0, i32 0
  %41 = load ptr, ptr %40, align 64, !tbaa !26
  call void @_ZN4enki15SemaphoreSignalERNS_13semaphoreid_tEi(ptr noundef nonnull align 1 %41, i32 noundef 1)
  br label %42

42:                                               ; preds = %34
  %43 = load i32, ptr %5, align 4, !tbaa !23
  %44 = add i32 %43, 1
  store i32 %44, ptr %5, align 4, !tbaa !23
  br label %28, !llvm.loop !30

45:                                               ; preds = %33
  br label %18, !llvm.loop !32

46:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %47 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 20
  %48 = getelementptr inbounds %"struct.enki::TaskSchedulerConfig", ptr %47, i32 0, i32 1
  %49 = load i32, ptr %48, align 4, !tbaa !33
  %50 = call noundef i32 @_ZN4enki13TaskScheduler29GetNumFirstExternalTaskThreadEv()
  %51 = add i32 %49, %50
  store i32 %51, ptr %6, align 4, !tbaa !23
  br label %52

52:                                               ; preds = %74, %46
  %53 = load i32, ptr %6, align 4, !tbaa !23
  %54 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 2
  %55 = load i32, ptr %54, align 8, !tbaa !24
  %56 = icmp ult i32 %53, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %77

58:                                               ; preds = %52
  %59 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 5
  %60 = load ptr, ptr %59, align 8, !tbaa !34
  %61 = load i32, ptr %6, align 4, !tbaa !23
  %62 = zext i32 %61 to i64
  %63 = getelementptr inbounds %"class.std::thread", ptr %60, i64 %62
  %64 = call noundef zeroext i1 @_ZNKSt6thread8joinableEv(ptr noundef nonnull align 8 dereferenceable(8) %63) #6
  br i1 %64, label %65, label %66

65:                                               ; preds = %58
  br label %68

66:                                               ; preds = %58
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.3, i32 noundef 477, ptr noundef @__PRETTY_FUNCTION__._ZN4enki13TaskScheduler11StopThreadsEb) #7
  unreachable

67:                                               ; No predecessors!
  br label %68

68:                                               ; preds = %67, %65
  %69 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 5
  %70 = load ptr, ptr %69, align 8, !tbaa !34
  %71 = load i32, ptr %6, align 4, !tbaa !23
  %72 = zext i32 %71 to i64
  %73 = getelementptr inbounds %"class.std::thread", ptr %70, i64 %72
  call void @_ZNSt6thread4joinEv(ptr noundef nonnull align 8 dereferenceable(8) %73)
  br label %74

74:                                               ; preds = %68
  %75 = load i32, ptr %6, align 4, !tbaa !23
  %76 = add i32 %75, 1
  store i32 %76, ptr %6, align 4, !tbaa !23
  br label %52, !llvm.loop !35

77:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !23
  br label %78

78:                                               ; preds = %92, %77
  %79 = load i32, ptr %7, align 4, !tbaa !23
  %80 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 2
  %81 = load i32, ptr %80, align 8, !tbaa !24
  %82 = icmp ult i32 %79, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %95

84:                                               ; preds = %78
  %85 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 4
  %86 = load ptr, ptr %85, align 8, !tbaa !25
  %87 = load i32, ptr %7, align 4, !tbaa !23
  %88 = zext i32 %87 to i64
  %89 = getelementptr inbounds %"struct.enki::ThreadDataStore", ptr %86, i64 %88
  %90 = getelementptr inbounds %"struct.enki::ThreadDataStore", ptr %89, i32 0, i32 0
  %91 = load ptr, ptr %90, align 64, !tbaa !26
  call void @_ZN4enki13TaskScheduler15SemaphoreDeleteEPNS_13semaphoreid_tE(ptr noundef nonnull align 8 dereferenceable(220) %10, ptr noundef %91)
  br label %92

92:                                               ; preds = %84
  %93 = load i32, ptr %7, align 4, !tbaa !23
  %94 = add i32 %93, 1
  store i32 %94, ptr %7, align 4, !tbaa !23
  br label %78, !llvm.loop !36

95:                                               ; preds = %83
  %96 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 4
  %97 = load ptr, ptr %96, align 8, !tbaa !25
  %98 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 2
  %99 = load i32, ptr %98, align 8, !tbaa !24
  %100 = zext i32 %99 to i64
  %101 = load ptr, ptr @_ZN12_GLOBAL__N_17gc_FileE, align 8, !tbaa !5
  call void @_ZN4enki13TaskScheduler11DeleteArrayINS_15ThreadDataStoreEEEvPT_mPKci(ptr noundef nonnull align 8 dereferenceable(220) %10, ptr noundef %97, i64 noundef %100, ptr noundef %101, i32 noundef 0)
  %102 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 5
  %103 = load ptr, ptr %102, align 8, !tbaa !34
  %104 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 2
  %105 = load i32, ptr %104, align 8, !tbaa !24
  %106 = zext i32 %105 to i64
  %107 = load ptr, ptr @_ZN12_GLOBAL__N_17gc_FileE, align 8, !tbaa !5
  call void @_ZN4enki13TaskScheduler11DeleteArrayISt6threadEEvPT_mPKci(ptr noundef nonnull align 8 dereferenceable(220) %10, ptr noundef %103, i64 noundef %106, ptr noundef %107, i32 noundef 0)
  %108 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 4
  store ptr null, ptr %108, align 8, !tbaa !25
  %109 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 5
  store ptr null, ptr %109, align 8, !tbaa !34
  %110 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 15
  %111 = load ptr, ptr %110, align 8, !tbaa !37
  call void @_ZN4enki13TaskScheduler15SemaphoreDeleteEPNS_13semaphoreid_tE(ptr noundef nonnull align 8 dereferenceable(220) %10, ptr noundef %111)
  %112 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 15
  store ptr null, ptr %112, align 8, !tbaa !37
  %113 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 16
  %114 = load ptr, ptr %113, align 8, !tbaa !38
  call void @_ZN4enki13TaskScheduler15SemaphoreDeleteEPNS_13semaphoreid_tE(ptr noundef nonnull align 8 dereferenceable(220) %10, ptr noundef %114)
  %115 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 16
  store ptr null, ptr %115, align 8, !tbaa !38
  %116 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 18
  store i8 0, ptr %116, align 4, !tbaa !11
  %117 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 11
  %118 = call noundef i32 @_ZNSt13__atomic_baseIiEaSEi(ptr noundef nonnull align 4 dereferenceable(4) %117, i32 noundef 0) #6
  %119 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 12
  %120 = call noundef i32 @_ZNSt13__atomic_baseIiEaSEi(ptr noundef nonnull align 4 dereferenceable(4) %119, i32 noundef 0) #6
  %121 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 10
  %122 = call noundef i32 @_ZNSt13__atomic_baseIiEaSEi(ptr noundef nonnull align 4 dereferenceable(4) %121, i32 noundef 0) #6
  %123 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 21
  %124 = call noundef i32 @_ZNSt13__atomic_baseIiEaSEi(ptr noundef nonnull align 4 dereferenceable(4) %123, i32 noundef 0) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !23
  br label %125

125:                                              ; preds = %156, %95
  %126 = load i32, ptr %8, align 4, !tbaa !23
  %127 = icmp slt i32 %126, 3
  br i1 %127, label %129, label %128

128:                                              ; preds = %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %159

129:                                              ; preds = %125
  %130 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 0
  %131 = load i32, ptr %8, align 4, !tbaa !23
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [3 x ptr], ptr %130, i64 0, i64 %132
  %134 = load ptr, ptr %133, align 8, !tbaa !5
  %135 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 2
  %136 = load i32, ptr %135, align 8, !tbaa !24
  %137 = zext i32 %136 to i64
  %138 = load ptr, ptr @_ZN12_GLOBAL__N_17gc_FileE, align 8, !tbaa !5
  call void @_ZN4enki13TaskScheduler11DeleteArrayINS_8TaskPipeEEEvPT_mPKci(ptr noundef nonnull align 8 dereferenceable(220) %10, ptr noundef %134, i64 noundef %137, ptr noundef %138, i32 noundef 0)
  %139 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 0
  %140 = load i32, ptr %8, align 4, !tbaa !23
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [3 x ptr], ptr %139, i64 0, i64 %141
  store ptr null, ptr %142, align 8, !tbaa !5
  %143 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 1
  %144 = load i32, ptr %8, align 4, !tbaa !23
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [3 x ptr], ptr %143, i64 0, i64 %145
  %147 = load ptr, ptr %146, align 8, !tbaa !5
  %148 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 2
  %149 = load i32, ptr %148, align 8, !tbaa !24
  %150 = zext i32 %149 to i64
  %151 = load ptr, ptr @_ZN12_GLOBAL__N_17gc_FileE, align 8, !tbaa !5
  call void @_ZN4enki13TaskScheduler11DeleteArrayINS_14PinnedTaskListEEEvPT_mPKci(ptr noundef nonnull align 8 dereferenceable(220) %10, ptr noundef %147, i64 noundef %150, ptr noundef %151, i32 noundef 0)
  %152 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 1
  %153 = load i32, ptr %8, align 4, !tbaa !23
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [3 x ptr], ptr %152, i64 0, i64 %154
  store ptr null, ptr %155, align 8, !tbaa !5
  br label %156

156:                                              ; preds = %129
  %157 = load i32, ptr %8, align 4, !tbaa !23
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %8, align 4, !tbaa !23
  br label %125, !llvm.loop !39

159:                                              ; preds = %128
  %160 = getelementptr inbounds %"class.enki::TaskScheduler", ptr %10, i32 0, i32 2
  store i32 0, ptr %160, align 8, !tbaa !24
  br label %161

161:                                              ; preds = %159, %2
  ret void
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4enki15SemaphoreSignalERNS_13semaphoreid_tEi(ptr noundef nonnull align 1, i32 noundef) #3

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

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

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

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

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

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

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

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

attributes #0 = { noreturn nounwind "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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { 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 #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 }
attributes #7 = { noreturn 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, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !10, i64 116}
!12 = !{!"_ZTSN4enki13TaskSchedulerE", !7, i64 0, !7, i64 24, !13, i64 48, !6, i64 56, !6, i64 64, !14, i64 72, !14, i64 73, !14, i64 74, !16, i64 76, !16, i64 80, !16, i64 84, !13, i64 88, !6, i64 96, !6, i64 104, !13, i64 112, !10, i64 116, !18, i64 120, !16, i64 216}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSSt6atomicIbE", !15, i64 0}
!15 = !{!"_ZTSSt13__atomic_baseIbE", !10, i64 0}
!16 = !{!"_ZTSSt6atomicIiE", !17, i64 0}
!17 = !{!"_ZTSSt13__atomic_baseIiE", !13, i64 0}
!18 = !{!"_ZTSN4enki19TaskSchedulerConfigE", !13, i64 0, !13, i64 4, !19, i64 8, !20, i64 72}
!19 = !{!"_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}
!20 = !{!"_ZTSN4enki15CustomAllocatorE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!13, !13, i64 0}
!24 = !{!12, !13, i64 48}
!25 = !{!12, !6, i64 56}
!26 = !{!27, !6, i64 0}
!27 = !{!"_ZTSN4enki15ThreadDataStoreE", !6, i64 0, !28, i64 8, !13, i64 12, !7, i64 16}
!28 = !{!"_ZTSSt6atomicIN4enki11ThreadStateEE", !29, i64 0}
!29 = !{!"_ZTSN4enki11ThreadStateE", !7, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = !{!12, !13, i64 124}
!34 = !{!12, !6, i64 64}
!35 = distinct !{!35, !31}
!36 = distinct !{!36, !31}
!37 = !{!12, !6, i64 96}
!38 = !{!12, !6, i64 104}
!39 = distinct !{!39, !31}


; 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 }
%"class.std::thread" = type { %"class.std::thread::id" }
%"class.std::thread::id" = type { i64 }

@.str.3 = external hidden unnamed_addr constant [90 x i8], align 1
@_ZN12_GLOBAL__N_17gc_FileE = external hidden local_unnamed_addr global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [30 x i8], align 1
@__PRETTY_FUNCTION__._ZN4enki13TaskScheduler11StopThreadsEb = external hidden unnamed_addr constant [44 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4enki13TaskScheduler29GetNumFirstExternalTaskThreadEv() local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4enki13TaskScheduler11StopThreadsEb(ptr noundef nonnull align 8 dereferenceable(220) %0, i1 noundef zeroext %1) local_unnamed_addr #3 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 74
  tail call void @_ZNSt6atomicIbE5storeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) %3, i1 noundef zeroext true, i32 noundef 3) #6
  %4 = getelementptr inbounds i8, ptr %0, i64 73
  tail call void @_ZNSt6atomicIbE5storeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) %4, i1 noundef zeroext true, i32 noundef 3) #6
  %5 = getelementptr inbounds i8, ptr %0, i64 72
  tail call void @_ZNSt6atomicIbE5storeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) %5, i1 noundef zeroext false, i32 noundef 3) #6
  %6 = getelementptr inbounds i8, ptr %0, i64 116
  %7 = load i8, ptr %6, align 4, !tbaa !5, !range !19, !noundef !20
  %8 = trunc nuw i8 %7 to i1
  br i1 %8, label %.preheader21, label %99

.preheader21:                                     ; preds = %2
  %9 = getelementptr inbounds i8, ptr %0, i64 76
  br i1 %1, label %.lr.ph25, label %.critedge

.lr.ph25:                                         ; preds = %.preheader21
  %10 = getelementptr inbounds i8, ptr %0, i64 48
  %11 = getelementptr inbounds i8, ptr %0, i64 56
  %12 = tail call noundef i32 @_ZNKSt13__atomic_baseIiEcviEv(ptr noundef nonnull align 4 dereferenceable(4) %9) #6
  %.not.us27 = icmp eq i32 %12, 0
  br i1 %.not.us27, label %.critedge, label %.lr.ph28

.lr.ph28:                                         ; preds = %.lr.ph25, %.loopexit.us
  tail call void @_ZN4enki13TaskScheduler22WakeThreadsForNewTasksEv(ptr noundef nonnull align 8 dereferenceable(220) %0)
  %13 = load i32, ptr %10, align 8, !tbaa !21
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %.loopexit.us, label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph28, %.lr.ph.us
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph.us ], [ 0, %.lr.ph28 ]
  %14 = load ptr, ptr %11, align 8, !tbaa !22
  %15 = getelementptr inbounds %"struct.enki::ThreadDataStore", ptr %14, i64 %indvars.iv
  %16 = load ptr, ptr %15, align 64, !tbaa !23
  tail call void @_ZN4enki15SemaphoreSignalERNS_13semaphoreid_tEi(ptr noundef nonnull align 1 %16, i32 noundef 1)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %17 = load i32, ptr %10, align 8, !tbaa !21
  %18 = zext i32 %17 to i64
  %19 = icmp ult i64 %indvars.iv.next, %18
  br i1 %19, label %.lr.ph.us, label %.loopexit.us, !llvm.loop !27

.loopexit.us:                                     ; preds = %.lr.ph.us, %.lr.ph28
  %20 = tail call noundef i32 @_ZNKSt13__atomic_baseIiEcviEv(ptr noundef nonnull align 4 dereferenceable(4) %9) #6
  %.not.us = icmp eq i32 %20, 0
  br i1 %.not.us, label %.critedge, label %.lr.ph28

.critedge:                                        ; preds = %.loopexit.us, %.lr.ph25, %.preheader21
  %21 = getelementptr inbounds i8, ptr %0, i64 124
  %22 = load i32, ptr %21, align 4, !tbaa !29
  %23 = tail call noundef i32 @_ZN4enki13TaskScheduler29GetNumFirstExternalTaskThreadEv()
  %24 = add i32 %23, %22
  %25 = getelementptr inbounds i8, ptr %0, i64 48
  %26 = load i32, ptr %25, align 8, !tbaa !21
  %27 = icmp ult i32 %24, %26
  br i1 %27, label %.lr.ph30, label %.preheader

.lr.ph30:                                         ; preds = %.critedge
  %28 = getelementptr inbounds i8, ptr %0, i64 64
  %29 = zext i32 %24 to i64
  br label %32

.preheader:                                       ; preds = %37, %.critedge
  %30 = phi i32 [ %26, %.critedge ], [ %40, %37 ]
  %.not34 = icmp eq i32 %30, 0
  br i1 %.not34, label %._crit_edge, label %.lr.ph32

.lr.ph32:                                         ; preds = %.preheader
  %31 = getelementptr inbounds i8, ptr %0, i64 56
  br label %92

32:                                               ; preds = %.lr.ph30, %37
  %indvars.iv37 = phi i64 [ %29, %.lr.ph30 ], [ %indvars.iv.next38, %37 ]
  %33 = load ptr, ptr %28, align 8, !tbaa !30
  %34 = getelementptr inbounds %"class.std::thread", ptr %33, i64 %indvars.iv37
  %35 = tail call noundef zeroext i1 @_ZNKSt6thread8joinableEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #6
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.3, i32 noundef 477, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4enki13TaskScheduler11StopThreadsEb) #7
  unreachable

37:                                               ; preds = %32
  %38 = load ptr, ptr %28, align 8, !tbaa !30
  %39 = getelementptr inbounds %"class.std::thread", ptr %38, i64 %indvars.iv37
  tail call void @_ZNSt6thread4joinEv(ptr noundef nonnull align 8 dereferenceable(8) %39)
  %indvars.iv.next38 = add nuw nsw i64 %indvars.iv37, 1
  %40 = load i32, ptr %25, align 8, !tbaa !21
  %41 = zext i32 %40 to i64
  %42 = icmp ult i64 %indvars.iv.next38, %41
  br i1 %42, label %32, label %.preheader, !llvm.loop !31

._crit_edge.loopexit:                             ; preds = %92
  %43 = zext i32 %96 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.preheader, %._crit_edge.loopexit
  %.lcssa = phi i64 [ %43, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %44 = getelementptr inbounds i8, ptr %0, i64 56
  %45 = load ptr, ptr %44, align 8, !tbaa !22
  %46 = load ptr, ptr @_ZN12_GLOBAL__N_17gc_FileE, align 8, !tbaa !32
  tail call void @_ZN4enki13TaskScheduler11DeleteArrayINS_15ThreadDataStoreEEEvPT_mPKci(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef %45, i64 noundef %.lcssa, ptr noundef %46, i32 noundef 0)
  %47 = getelementptr inbounds i8, ptr %0, i64 64
  %48 = load ptr, ptr %47, align 8, !tbaa !30
  %49 = load i32, ptr %25, align 8, !tbaa !21
  %50 = zext i32 %49 to i64
  %51 = load ptr, ptr @_ZN12_GLOBAL__N_17gc_FileE, align 8, !tbaa !32
  tail call void @_ZN4enki13TaskScheduler11DeleteArrayISt6threadEEvPT_mPKci(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef %48, i64 noundef %50, ptr noundef %51, i32 noundef 0)
  %52 = getelementptr inbounds i8, ptr %0, i64 96
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %44, i8 0, i64 16, i1 false)
  %53 = load ptr, ptr %52, align 8, !tbaa !33
  tail call void @_ZN4enki13TaskScheduler15SemaphoreDeleteEPNS_13semaphoreid_tE(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef %53)
  store ptr null, ptr %52, align 8, !tbaa !33
  %54 = getelementptr inbounds i8, ptr %0, i64 104
  %55 = load ptr, ptr %54, align 8, !tbaa !34
  tail call void @_ZN4enki13TaskScheduler15SemaphoreDeleteEPNS_13semaphoreid_tE(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef %55)
  store ptr null, ptr %54, align 8, !tbaa !34
  store i8 0, ptr %6, align 4, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %0, i64 80
  %57 = tail call noundef i32 @_ZNSt13__atomic_baseIiEaSEi(ptr noundef nonnull align 4 dereferenceable(4) %56, i32 noundef 0) #6
  %58 = getelementptr inbounds i8, ptr %0, i64 84
  %59 = tail call noundef i32 @_ZNSt13__atomic_baseIiEaSEi(ptr noundef nonnull align 4 dereferenceable(4) %58, i32 noundef 0) #6
  %60 = tail call noundef i32 @_ZNSt13__atomic_baseIiEaSEi(ptr noundef nonnull align 4 dereferenceable(4) %9, i32 noundef 0) #6
  %61 = getelementptr inbounds i8, ptr %0, i64 216
  %62 = tail call noundef i32 @_ZNSt13__atomic_baseIiEaSEi(ptr noundef nonnull align 4 dereferenceable(4) %61, i32 noundef 0) #6
  %63 = getelementptr inbounds i8, ptr %0, i64 24
  %64 = load ptr, ptr %0, align 8, !tbaa !32
  %65 = load i32, ptr %25, align 8, !tbaa !21
  %66 = zext i32 %65 to i64
  %67 = load ptr, ptr @_ZN12_GLOBAL__N_17gc_FileE, align 8, !tbaa !32
  tail call void @_ZN4enki13TaskScheduler11DeleteArrayINS_8TaskPipeEEEvPT_mPKci(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef %64, i64 noundef %66, ptr noundef %67, i32 noundef 0)
  store ptr null, ptr %0, align 8, !tbaa !32
  %68 = load ptr, ptr %63, align 8, !tbaa !32
  %69 = load i32, ptr %25, align 8, !tbaa !21
  %70 = zext i32 %69 to i64
  %71 = load ptr, ptr @_ZN12_GLOBAL__N_17gc_FileE, align 8, !tbaa !32
  tail call void @_ZN4enki13TaskScheduler11DeleteArrayINS_14PinnedTaskListEEEvPT_mPKci(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef %68, i64 noundef %70, ptr noundef %71, i32 noundef 0)
  store ptr null, ptr %63, align 8, !tbaa !32
  %72 = getelementptr inbounds i8, ptr %0, i64 8
  %73 = load ptr, ptr %72, align 8, !tbaa !32
  %74 = load i32, ptr %25, align 8, !tbaa !21
  %75 = zext i32 %74 to i64
  %76 = load ptr, ptr @_ZN12_GLOBAL__N_17gc_FileE, align 8, !tbaa !32
  tail call void @_ZN4enki13TaskScheduler11DeleteArrayINS_8TaskPipeEEEvPT_mPKci(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef %73, i64 noundef %75, ptr noundef %76, i32 noundef 0)
  store ptr null, ptr %72, align 8, !tbaa !32
  %77 = getelementptr inbounds i8, ptr %0, i64 32
  %78 = load ptr, ptr %77, align 8, !tbaa !32
  %79 = load i32, ptr %25, align 8, !tbaa !21
  %80 = zext i32 %79 to i64
  %81 = load ptr, ptr @_ZN12_GLOBAL__N_17gc_FileE, align 8, !tbaa !32
  tail call void @_ZN4enki13TaskScheduler11DeleteArrayINS_14PinnedTaskListEEEvPT_mPKci(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef %78, i64 noundef %80, ptr noundef %81, i32 noundef 0)
  store ptr null, ptr %77, align 8, !tbaa !32
  %82 = getelementptr inbounds i8, ptr %0, i64 16
  %83 = load ptr, ptr %82, align 8, !tbaa !32
  %84 = load i32, ptr %25, align 8, !tbaa !21
  %85 = zext i32 %84 to i64
  %86 = load ptr, ptr @_ZN12_GLOBAL__N_17gc_FileE, align 8, !tbaa !32
  tail call void @_ZN4enki13TaskScheduler11DeleteArrayINS_8TaskPipeEEEvPT_mPKci(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef %83, i64 noundef %85, ptr noundef %86, i32 noundef 0)
  store ptr null, ptr %82, align 8, !tbaa !32
  %87 = getelementptr inbounds i8, ptr %0, i64 40
  %88 = load ptr, ptr %87, align 8, !tbaa !32
  %89 = load i32, ptr %25, align 8, !tbaa !21
  %90 = zext i32 %89 to i64
  %91 = load ptr, ptr @_ZN12_GLOBAL__N_17gc_FileE, align 8, !tbaa !32
  tail call void @_ZN4enki13TaskScheduler11DeleteArrayINS_14PinnedTaskListEEEvPT_mPKci(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef %88, i64 noundef %90, ptr noundef %91, i32 noundef 0)
  store ptr null, ptr %87, align 8, !tbaa !32
  store i32 0, ptr %25, align 8, !tbaa !21
  br label %99

92:                                               ; preds = %.lr.ph32, %92
  %indvars.iv40 = phi i64 [ 0, %.lr.ph32 ], [ %indvars.iv.next41, %92 ]
  %93 = load ptr, ptr %31, align 8, !tbaa !22
  %94 = getelementptr inbounds %"struct.enki::ThreadDataStore", ptr %93, i64 %indvars.iv40
  %95 = load ptr, ptr %94, align 64, !tbaa !23
  tail call void @_ZN4enki13TaskScheduler15SemaphoreDeleteEPNS_13semaphoreid_tE(ptr noundef nonnull align 8 dereferenceable(220) %0, ptr noundef %95)
  %indvars.iv.next41 = add nuw nsw i64 %indvars.iv40, 1
  %96 = load i32, ptr %25, align 8, !tbaa !21
  %97 = zext i32 %96 to i64
  %98 = icmp ult i64 %indvars.iv.next41, %97
  br i1 %98, label %92, label %._crit_edge.loopexit, !llvm.loop !35

99:                                               ; preds = %._crit_edge, %2
  ret void
}

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

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

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

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

declare void @_ZNSt6thread4joinEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

attributes #0 = { noreturn nounwind "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 #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 = { 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 #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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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, !13, i64 116}
!6 = !{!"_ZTSN4enki13TaskSchedulerE", !7, i64 0, !7, i64 24, !9, i64 48, !10, i64 56, !10, i64 64, !11, i64 72, !11, i64 73, !11, i64 74, !14, i64 76, !14, i64 80, !14, i64 84, !9, i64 88, !10, i64 96, !10, i64 104, !9, i64 112, !13, i64 116, !16, i64 120, !14, i64 216}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!"_ZTSSt6atomicIbE", !12, i64 0}
!12 = !{!"_ZTSSt13__atomic_baseIbE", !13, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSSt6atomicIiE", !15, i64 0}
!15 = !{!"_ZTSSt13__atomic_baseIiE", !9, i64 0}
!16 = !{!"_ZTSN4enki19TaskSchedulerConfigE", !9, i64 0, !9, i64 4, !17, i64 8, !18, i64 72}
!17 = !{!"_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}
!18 = !{!"_ZTSN4enki15CustomAllocatorE", !10, i64 0, !10, i64 8, !10, i64 16}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!6, !9, i64 48}
!22 = !{!6, !10, i64 56}
!23 = !{!24, !10, i64 0}
!24 = !{!"_ZTSN4enki15ThreadDataStoreE", !10, i64 0, !25, i64 8, !9, i64 12, !7, i64 16}
!25 = !{!"_ZTSSt6atomicIN4enki11ThreadStateEE", !26, i64 0}
!26 = !{!"_ZTSN4enki11ThreadStateE", !7, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!6, !9, i64 124}
!30 = !{!6, !10, i64 64}
!31 = distinct !{!31, !28}
!32 = !{!10, !10, i64 0}
!33 = !{!6, !10, i64 96}
!34 = !{!6, !10, i64 104}
!35 = distinct !{!35, !28}


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