; LLVM IR from lynx-family/primjs :: src/gc/thread_pool.ll (ZN14ByteThreadPoolC2EPKcii)

; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"struct.std::nothrow_t" = type { i8 }
%"class.std::allocator" = type { i8 }
%class.ByteThreadPool = type { %"class.std::__cxx11::basic_string", %"struct.std::atomic", %"struct.std::atomic", %"class.std::queue", i32, i32, %"struct.std::atomic.3", %"struct.std::atomic.3", %"class.std::mutex", %"class.std::condition_variable", %"class.std::condition_variable", %"class.std::condition_variable", %"class.std::condition_variable", %"class.std::vector" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i8 }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<ByteTask *, std::allocator<ByteTask *>>::_Deque_impl" }
%"struct.std::_Deque_base<ByteTask *, std::allocator<ByteTask *>>::_Deque_impl" = type { %"struct.std::_Deque_base<ByteTask *, std::allocator<ByteTask *>>::_Deque_impl_data" }
%"struct.std::_Deque_base<ByteTask *, std::allocator<ByteTask *>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.std::atomic.3" = type { %"struct.std::__atomic_base.4" }
%"struct.std::__atomic_base.4" = type { i32 }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::condition_variable" = type { %"class.std::__condvar" }
%"class.std::__condvar" = type { %union.pthread_cond_t }
%union.pthread_cond_t = type { %struct.__pthread_cond_s }
%struct.__pthread_cond_s = type { %union.__atomic_wide_counter, %union.__atomic_wide_counter, [2 x i32], [2 x i32], i32, i32, [2 x i32] }
%union.__atomic_wide_counter = type { i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<BytePoolThread *, std::allocator<BytePoolThread *>>::_Vector_impl" }
%"struct.std::_Vector_base<BytePoolThread *, std::allocator<BytePoolThread *>>::_Vector_impl" = type { %"struct.std::_Vector_base<BytePoolThread *, std::allocator<BytePoolThread *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<BytePoolThread *, std::allocator<BytePoolThread *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.12 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [16 x i8], align 1
@_ZSt7nothrow = external global %"struct.std::nothrow_t", align 1
@.str.18 = external hidden unnamed_addr constant [26 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 void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14ByteThreadPoolC2EPKcii(ptr noundef nonnull align 8 dereferenceable(392) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca [256 x i8], align 16
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i1, align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  %18 = load ptr, ptr %5, align 8
  %19 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 0
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef %20, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %21 unwind label %44

21:                                               ; preds = %4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #10
  %22 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 1
  call void @_ZNSt6atomicIbEC2Eb(ptr noundef nonnull align 1 dereferenceable(1) %22, i1 noundef zeroext false) #10
  %23 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 2
  call void @_ZNSt6atomicIbEC2Eb(ptr noundef nonnull align 1 dereferenceable(1) %23, i1 noundef zeroext false) #10
  %24 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 3
  invoke void @_ZNSt5queueIP8ByteTaskSt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %24)
          to label %25 unwind label %48

25:                                               ; preds = %21
  %26 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 4
  store i32 0, ptr %26, align 8, !tbaa !11
  %27 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 5
  store i32 0, ptr %27, align 4, !tbaa !35
  %28 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 6
  %29 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 7
  %30 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 8
  call void @_ZNSt5mutexC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %30) #10
  %31 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 9
  call void @_ZNSt18condition_variableC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %31) #10
  %32 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 10
  call void @_ZNSt18condition_variableC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %32) #10
  %33 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 11
  call void @_ZNSt18condition_variableC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %33) #10
  %34 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 12
  call void @_ZNSt18condition_variableC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %34) #10
  %35 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 13
  call void @_ZNSt6vectorIP14BytePoolThreadSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %35) #10
  %36 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 6
  call void @_ZNSt13__atomic_baseIiE5storeEiSt12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %36, i32 noundef 0, i32 noundef 5) #10
  %37 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 7
  call void @_ZNSt13__atomic_baseIiE5storeEiSt12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %37, i32 noundef 0, i32 noundef 5) #10
  call void @llvm.lifetime.start.p0(i64 256, ptr %12) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #10
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %129, %25
  %39 = load i32, ptr %13, align 4, !tbaa !9
  %40 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 4
  %41 = load i32, ptr %40, align 8, !tbaa !11
  %42 = icmp slt i32 %39, %41
  br i1 %42, label %52, label %43

43:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  br label %134

44:                                               ; preds = %4
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %10, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %11, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #10
  br label %142

48:                                               ; preds = %21
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %10, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %11, align 4
  br label %141

52:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #10
  %53 = getelementptr inbounds [256 x i8], ptr %12, i64 0, i64 0
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = load i32, ptr %13, align 4, !tbaa !9
  %56 = add nsw i32 %55, 1
  %57 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %53, i64 noundef 255, ptr noundef @.str.12, ptr noundef %54, i32 noundef %56) #10
  store i32 %57, ptr %14, align 4, !tbaa !9
  %58 = load i32, ptr %14, align 4, !tbaa !9
  %59 = icmp slt i32 %58, 0
  br i1 %59, label %60, label %87

60:                                               ; preds = %52
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.13)
          to label %62 unwind label %83

62:                                               ; preds = %60
  %63 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef @.str.14)
          to label %64 unwind label %83

64:                                               ; preds = %62
  %65 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 0
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %63, ptr noundef nonnull align 8 dereferenceable(32) %65)
          to label %67 unwind label %83

67:                                               ; preds = %64
  %68 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef @.str.15)
          to label %69 unwind label %83

69:                                               ; preds = %67
  %70 = load i32, ptr %13, align 4, !tbaa !9
  %71 = add nsw i32 %70, 1
  %72 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %68, i32 noundef %71)
          to label %73 unwind label %83

73:                                               ; preds = %69
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef @.str.16)
          to label %75 unwind label %83

75:                                               ; preds = %73
  %76 = load i32, ptr %14, align 4, !tbaa !9
  %77 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %74, i32 noundef %76)
          to label %78 unwind label %83

78:                                               ; preds = %75
  %79 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef @.str.17)
          to label %80 unwind label %83

80:                                               ; preds = %78
  %81 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %79, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %82 unwind label %83

82:                                               ; preds = %80
  br label %87

83:                                               ; preds = %80, %78, %75, %73, %69, %67, %64, %62, %60
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %10, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %11, align 4
  br label %133

87:                                               ; preds = %82, %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #10
  %88 = call noalias noundef ptr @_ZnwmRKSt9nothrow_t(i64 noundef 72, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #11
  %89 = icmp eq ptr %88, null
  store i1 false, ptr %17, align 1
  br i1 %89, label %96, label %90

90:                                               ; preds = %87
  store ptr %88, ptr %16, align 8
  store i1 true, ptr %17, align 1
  %91 = getelementptr inbounds [256 x i8], ptr %12, i64 0, i64 0
  %92 = load i32, ptr %13, align 4, !tbaa !9
  %93 = add nsw i32 %92, 1
  %94 = sext i32 %93 to i64
  invoke void @_ZN14BytePoolThreadC1EP14ByteThreadPoolPKcmm(ptr noundef nonnull align 8 dereferenceable(72) %88, ptr noundef %18, ptr noundef %91, i64 noundef %94, i64 noundef 524288)
          to label %95 unwind label %105

95:                                               ; preds = %90
  br label %96

96:                                               ; preds = %95, %87
  %97 = phi ptr [ %88, %95 ], [ null, %87 ]
  store ptr %97, ptr %15, align 8, !tbaa !5
  %98 = load ptr, ptr %15, align 8, !tbaa !5
  %99 = icmp eq ptr %98, null
  br i1 %99, label %100, label %117

100:                                              ; preds = %96
  %101 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.18)
          to label %102 unwind label %113

102:                                              ; preds = %100
  %103 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %101, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %104 unwind label %113

104:                                              ; preds = %102
  br label %128

105:                                              ; preds = %90
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %10, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %11, align 4
  %109 = load i1, ptr %17, align 1
  br i1 %109, label %110, label %112

110:                                              ; preds = %105
  %111 = load ptr, ptr %16, align 8
  call void @_ZdlPvRKSt9nothrow_t(ptr noundef %111, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #12
  br label %112

112:                                              ; preds = %110, %105
  br label %132

113:                                              ; preds = %117, %102, %100
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %10, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %11, align 4
  br label %132

117:                                              ; preds = %96
  %118 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 13
  invoke void @_ZNSt6vectorIP14BytePoolThreadSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %118, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %119 unwind label %113

119:                                              ; preds = %117
  %120 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 4
  %121 = load i32, ptr %120, align 8, !tbaa !11
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %120, align 8, !tbaa !11
  %123 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 5
  %124 = load i32, ptr %123, align 4, !tbaa !35
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %123, align 4, !tbaa !35
  %126 = getelementptr inbounds %class.ByteThreadPool, ptr %18, i32 0, i32 6
  %127 = call noundef i32 @_ZNSt13__atomic_baseIiE9fetch_addEiSt12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %126, i32 noundef 1, i32 noundef 5) #10
  br label %128

128:                                              ; preds = %119, %104
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #10
  br label %129

129:                                              ; preds = %128
  %130 = load i32, ptr %13, align 4, !tbaa !9
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %13, align 4, !tbaa !9
  br label %38, !llvm.loop !36

132:                                              ; preds = %113, %112
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  br label %133

133:                                              ; preds = %132, %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  br label %140

134:                                              ; preds = %43
  invoke void @_ZN14ByteThreadPool4StopEv(ptr noundef nonnull align 8 dereferenceable(392) %18)
          to label %135 unwind label %136

135:                                              ; preds = %134
  call void @llvm.lifetime.end.p0(i64 256, ptr %12) #10
  ret void

136:                                              ; preds = %134
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %10, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %11, align 4
  br label %140

140:                                              ; preds = %136, %133
  call void @llvm.lifetime.end.p0(i64 256, ptr %12) #10
  call void @_ZNSt6vectorIP14BytePoolThreadSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %35) #10
  call void @_ZNSt18condition_variableD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %34) #10
  call void @_ZNSt18condition_variableD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %33) #10
  call void @_ZNSt18condition_variableD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %32) #10
  call void @_ZNSt18condition_variableD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %31) #10
  call void @_ZNSt5queueIP8ByteTaskSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %24) #10
  br label %141

141:                                              ; preds = %140, %48
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #10
  br label %142

142:                                              ; preds = %141, %44
  %143 = load ptr, ptr %10, align 8
  %144 = load i32, ptr %11, align 4
  %145 = insertvalue { ptr, i32 } poison, ptr %143, 0
  %146 = insertvalue { ptr, i32 } %145, i32 %144, 1
  resume { ptr, i32 } %146
}

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

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

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

; Function Attrs: nounwind
declare void @_ZNSt18condition_variableC1Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #6

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

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

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #6

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: nobuiltin nounwind allocsize(0)
declare noalias noundef ptr @_ZnwmRKSt9nothrow_t(i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) #7

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvRKSt9nothrow_t(ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) #8

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

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

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

; Function Attrs: nounwind
declare void @_ZNSt18condition_variableD1Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIP8ByteTaskSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #9 align 2

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

declare void @_ZN14BytePoolThreadC1EP14ByteThreadPoolPKcmm(ptr, ptr, ptr, i64, i64)

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 = { "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 "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 #7 = { nobuiltin nounwind allocsize(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 #8 = { nobuiltin 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 #9 = { 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 #10 = { nounwind }
attributes #11 = { builtin nounwind allocsize(0) }
attributes #12 = { builtin 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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 120}
!12 = !{!"_ZTS14ByteThreadPool", !13, i64 0, !16, i64 32, !16, i64 33, !19, i64 40, !10, i64 120, !10, i64 124, !25, i64 128, !25, i64 132, !27, i64 136, !29, i64 176, !29, i64 224, !29, i64 272, !29, i64 320, !31, i64 368}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSSt6atomicIbE", !17, i64 0}
!17 = !{!"_ZTSSt13__atomic_baseIbE", !18, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTSSt5queueIP8ByteTaskSt5dequeIS1_SaIS1_EEE", !20, i64 0}
!20 = !{!"_ZTSSt5dequeIP8ByteTaskSaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSSt11_Deque_baseIP8ByteTaskSaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSNSt11_Deque_baseIP8ByteTaskSaIS1_EE11_Deque_implE", !23, i64 0}
!23 = !{!"_ZTSNSt11_Deque_baseIP8ByteTaskSaIS1_EE16_Deque_impl_dataE", !6, i64 0, !15, i64 8, !24, i64 16, !24, i64 48}
!24 = !{!"_ZTSSt15_Deque_iteratorIP8ByteTaskRS1_PS1_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!25 = !{!"_ZTSSt6atomicIiE", !26, i64 0}
!26 = !{!"_ZTSSt13__atomic_baseIiE", !10, i64 0}
!27 = !{!"_ZTSSt5mutex", !28, i64 0}
!28 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!29 = !{!"_ZTSSt18condition_variable", !30, i64 0}
!30 = !{!"_ZTSSt9__condvar", !7, i64 0}
!31 = !{!"_ZTSSt6vectorIP14BytePoolThreadSaIS1_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIP14BytePoolThreadSaIS1_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIP14BytePoolThreadSaIS1_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIP14BytePoolThreadSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!35 = !{!12, !10, i64 124}
!36 = distinct !{!36, !37}
!37 = !{!"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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"struct.std::nothrow_t" = type { i8 }
%"class.std::allocator" = type { i8 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.12 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [16 x i8], align 1
@_ZSt7nothrow = external global %"struct.std::nothrow_t", align 1
@.str.18 = external hidden unnamed_addr constant [26 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 void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14ByteThreadPoolC2EPKcii(ptr noundef nonnull align 8 dereferenceable(392) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca [256 x i8], align 16
  %7 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #11
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #11
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %8 unwind label %25

8:                                                ; preds = %4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #11
  %9 = getelementptr inbounds i8, ptr %0, i64 32
  call void @_ZNSt6atomicIbEC2Eb(ptr noundef nonnull align 1 dereferenceable(1) %9, i1 noundef zeroext false) #11
  %10 = getelementptr inbounds i8, ptr %0, i64 33
  call void @_ZNSt6atomicIbEC2Eb(ptr noundef nonnull align 1 dereferenceable(1) %10, i1 noundef zeroext false) #11
  %11 = getelementptr inbounds i8, ptr %0, i64 40
  invoke void @_ZNSt5queueIP8ByteTaskSt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %11)
          to label %12 unwind label %27

12:                                               ; preds = %8
  %13 = getelementptr inbounds i8, ptr %0, i64 120
  store i32 0, ptr %13, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %0, i64 124
  store i32 0, ptr %14, align 4, !tbaa !33
  %15 = getelementptr inbounds i8, ptr %0, i64 136
  call void @_ZNSt5mutexC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #11
  %16 = getelementptr inbounds i8, ptr %0, i64 176
  call void @_ZNSt18condition_variableC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %16) #11
  %17 = getelementptr inbounds i8, ptr %0, i64 224
  call void @_ZNSt18condition_variableC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %17) #11
  %18 = getelementptr inbounds i8, ptr %0, i64 272
  call void @_ZNSt18condition_variableC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %18) #11
  %19 = getelementptr inbounds i8, ptr %0, i64 320
  call void @_ZNSt18condition_variableC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #11
  %20 = getelementptr inbounds i8, ptr %0, i64 368
  call void @_ZNSt6vectorIP14BytePoolThreadSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #11
  %21 = getelementptr inbounds i8, ptr %0, i64 128
  call void @_ZNSt13__atomic_baseIiE5storeEiSt12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %21, i32 noundef 0, i32 noundef 5) #11
  %22 = getelementptr inbounds i8, ptr %0, i64 132
  call void @_ZNSt13__atomic_baseIiE5storeEiSt12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %22, i32 noundef 0, i32 noundef 5) #11
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %6) #11
  %23 = load i32, ptr %13, align 8, !tbaa !5
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %69, %12
  invoke void @_ZN14ByteThreadPool4StopEv(ptr noundef nonnull align 8 dereferenceable(392) %0)
          to label %74 unwind label %75

25:                                               ; preds = %4
  %26 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #11
  br label %79

27:                                               ; preds = %8
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %78

.lr.ph:                                           ; preds = %12, %69
  %indvars.iv = phi i64 [ %indvars.iv.next, %69 ], [ 0, %12 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %29 = trunc nuw nsw i64 %indvars.iv.next to i32
  %30 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %6, i64 noundef 255, ptr noundef nonnull @.str.12, ptr noundef %1, i32 noundef %29) #11
  %31 = icmp slt i32 %30, 0
  br i1 %31, label %32, label %52

32:                                               ; preds = %.lr.ph
  %33 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.13)
          to label %34 unwind label %50

34:                                               ; preds = %32
  %35 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull @.str.14)
          to label %36 unwind label %50

36:                                               ; preds = %34
  %37 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %38 unwind label %50

38:                                               ; preds = %36
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull @.str.15)
          to label %40 unwind label %50

40:                                               ; preds = %38
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %39, i32 noundef %29)
          to label %42 unwind label %50

42:                                               ; preds = %40
  %43 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull @.str.16)
          to label %44 unwind label %50

44:                                               ; preds = %42
  %45 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %43, i32 noundef %30)
          to label %46 unwind label %50

46:                                               ; preds = %44
  %47 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull @.str.17)
          to label %48 unwind label %50

48:                                               ; preds = %46
  %49 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %52 unwind label %50

50:                                               ; preds = %48, %46, %44, %42, %40, %38, %36, %34, %32
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %77

52:                                               ; preds = %48, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #11
  %53 = call noalias noundef dereferenceable_or_null(72) ptr @_ZnwmRKSt9nothrow_t(i64 noundef 72, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #12
  %54 = icmp eq ptr %53, null
  br i1 %54, label %56, label %55

55:                                               ; preds = %52
  invoke void @_ZN14BytePoolThreadC1EP14ByteThreadPoolPKcmm(ptr noundef nonnull align 8 dereferenceable(72) %53, ptr noundef nonnull %0, ptr noundef nonnull %6, i64 noundef %indvars.iv.next, i64 noundef 524288)
          to label %64 unwind label %60

56:                                               ; preds = %52
  store ptr null, ptr %7, align 8, !tbaa !34
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.18)
          to label %58 unwind label %62

58:                                               ; preds = %56
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %69 unwind label %62

60:                                               ; preds = %55
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvRKSt9nothrow_t(ptr noundef nonnull %53, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #13
  br label %73

62:                                               ; preds = %64, %58, %56
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %73

64:                                               ; preds = %55
  store ptr %53, ptr %7, align 8, !tbaa !34
  invoke void @_ZNSt6vectorIP14BytePoolThreadSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %65 unwind label %62

65:                                               ; preds = %64
  %66 = load <2 x i32>, ptr %13, align 8, !tbaa !35
  %67 = add nsw <2 x i32> %66, <i32 1, i32 1>
  store <2 x i32> %67, ptr %13, align 8, !tbaa !35
  %68 = call noundef i32 @_ZNSt13__atomic_baseIiE9fetch_addEiSt12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %21, i32 noundef 1, i32 noundef 5) #11
  br label %69

69:                                               ; preds = %58, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #11
  %70 = load i32, ptr %13, align 8, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = icmp slt i64 %indvars.iv.next, %71
  br i1 %72, label %.lr.ph, label %._crit_edge, !llvm.loop !36

73:                                               ; preds = %60, %62
  %.pn = phi { ptr, i32 } [ %63, %62 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #11
  br label %77

74:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %6) #11
  ret void

75:                                               ; preds = %._crit_edge
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %77

77:                                               ; preds = %50, %73, %75
  %.pn.pn.pn = phi { ptr, i32 } [ %76, %75 ], [ %.pn, %73 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %6) #11
  call void @_ZNSt6vectorIP14BytePoolThreadSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #11
  call void @_ZNSt18condition_variableD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #11
  call void @_ZNSt18condition_variableD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %18) #11
  call void @_ZNSt18condition_variableD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %17) #11
  call void @_ZNSt18condition_variableD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %16) #11
  call void @_ZNSt5queueIP8ByteTaskSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %11) #11
  br label %78

78:                                               ; preds = %77, %27
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %77 ], [ %28, %27 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #11
  br label %79

79:                                               ; preds = %78, %25
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %78 ], [ %26, %25 ]
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

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

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

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

; Function Attrs: nounwind
declare void @_ZNSt18condition_variableC1Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #6

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: nobuiltin nounwind allocsize(0)
declare noalias noundef ptr @_ZnwmRKSt9nothrow_t(i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #8

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvRKSt9nothrow_t(ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #9

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

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

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

; Function Attrs: nounwind
declare void @_ZNSt18condition_variableD1Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIP8ByteTaskSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #10 align 2

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

declare void @_ZN14BytePoolThreadC1EP14ByteThreadPoolPKcmm(ptr, ptr, ptr, i64, i64) local_unnamed_addr

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 = { "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 "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 #7 = { nofree 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 #8 = { nobuiltin nounwind allocsize(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 #9 = { nobuiltin 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 #10 = { 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 #11 = { nounwind }
attributes #12 = { builtin nounwind allocsize(0) }
attributes #13 = { builtin 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, !22, i64 120}
!6 = !{!"_ZTS14ByteThreadPool", !7, i64 0, !13, i64 32, !13, i64 33, !16, i64 40, !22, i64 120, !22, i64 124, !23, i64 128, !23, i64 132, !25, i64 136, !27, i64 176, !27, i64 224, !27, i64 272, !27, i64 320, !29, i64 368}
!7 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !8, i64 0, !12, i64 8, !10, i64 16}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"_ZTSSt6atomicIbE", !14, i64 0}
!14 = !{!"_ZTSSt13__atomic_baseIbE", !15, i64 0}
!15 = !{!"bool", !10, i64 0}
!16 = !{!"_ZTSSt5queueIP8ByteTaskSt5dequeIS1_SaIS1_EEE", !17, i64 0}
!17 = !{!"_ZTSSt5dequeIP8ByteTaskSaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSSt11_Deque_baseIP8ByteTaskSaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSNSt11_Deque_baseIP8ByteTaskSaIS1_EE11_Deque_implE", !20, i64 0}
!20 = !{!"_ZTSNSt11_Deque_baseIP8ByteTaskSaIS1_EE16_Deque_impl_dataE", !9, i64 0, !12, i64 8, !21, i64 16, !21, i64 48}
!21 = !{!"_ZTSSt15_Deque_iteratorIP8ByteTaskRS1_PS1_E", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24}
!22 = !{!"int", !10, i64 0}
!23 = !{!"_ZTSSt6atomicIiE", !24, i64 0}
!24 = !{!"_ZTSSt13__atomic_baseIiE", !22, i64 0}
!25 = !{!"_ZTSSt5mutex", !26, i64 0}
!26 = !{!"_ZTSSt12__mutex_base", !10, i64 0}
!27 = !{!"_ZTSSt18condition_variable", !28, i64 0}
!28 = !{!"_ZTSSt9__condvar", !10, i64 0}
!29 = !{!"_ZTSSt6vectorIP14BytePoolThreadSaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIP14BytePoolThreadSaIS1_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIP14BytePoolThreadSaIS1_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIP14BytePoolThreadSaIS1_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!33 = !{!6, !22, i64 124}
!34 = !{!9, !9, i64 0}
!35 = !{!22, !22, i64 0}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}


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