; LLVM IR from yinqiwen/ardb :: src/common/channel/channel_service.ll (ZN4ardb14ChannelService12StartSubPoolEv)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.ardb::ThreadOptions" = type { i64 }
%"class.ardb::ChannelService" = type { %"class.ardb::Runnable", %"struct.ardb::SoftSignalHandler", %"class.btree::btree_map", i32, ptr, ptr, ptr, ptr, %"class.std::__cxx11::list", %"class.ardb::MPSCQueue", i8, i32, %"class.std::vector", %"class.std::vector.6", i64, %"class.ardb::SPSCQueue", ptr, i32, ptr }
%"class.ardb::Runnable" = type { ptr }
%"struct.ardb::SoftSignalHandler" = type { ptr }
%"class.btree::btree_map" = type { %"class.btree::btree_map_container" }
%"class.btree::btree_map_container" = type { %"class.btree::btree_unique_container" }
%"class.btree::btree_unique_container" = type { %"class.btree::btree_container" }
%"class.btree::btree_container" = type { %"class.btree::btree" }
%"class.btree::btree" = type { %"struct.btree::btree<btree::btree_map_params<unsigned int, ardb::Channel *, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, ardb::Channel *>>, 256>>::empty_base_handle" }
%"struct.btree::btree<btree::btree_map_params<unsigned int, ardb::Channel *, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, ardb::Channel *>>, 256>>::empty_base_handle" = type { ptr }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<unsigned int, std::allocator<unsigned int>>::_List_impl" }
%"struct.std::__cxx11::_List_base<unsigned int, std::allocator<unsigned int>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.ardb::MPSCQueue" = type { ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ardb::ChannelService *, std::allocator<ardb::ChannelService *>>::_Vector_impl" }
%"struct.std::_Vector_base<ardb::ChannelService *, std::allocator<ardb::ChannelService *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ardb::ChannelService *, std::allocator<ardb::ChannelService *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ardb::ChannelService *, std::allocator<ardb::ChannelService *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<ardb::Thread *, std::allocator<ardb::Thread *>>::_Vector_impl" }
%"struct.std::_Vector_base<ardb::Thread *, std::allocator<ardb::Thread *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ardb::Thread *, std::allocator<ardb::Thread *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ardb::Thread *, std::allocator<ardb::Thread *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ardb::SPSCQueue" = type { ptr, [64 x i8], ptr, ptr, ptr }

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

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: mustprogress nounwind uwtable
declare dso_local void @_ZN4ardb14ChannelService25RegisterLifecycleCallbackEPNS_23ChannelServiceLifeCycleE(ptr noundef nonnull align 8 dereferenceable(288), ptr noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4ardb14ChannelService12StartSubPoolEv(ptr noundef nonnull align 8 dereferenceable(288) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca %"struct.ardb::ThreadOptions", align 8
  %9 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  %11 = getelementptr inbounds %"class.ardb::ChannelService", ptr %10, i32 0, i32 11
  %12 = load i32, ptr %11, align 4, !tbaa !9
  %13 = icmp ugt i32 %12, 1
  br i1 %13, label %14, label %54

14:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !37
  br label %15

15:                                               ; preds = %41, %14
  %16 = load i32, ptr %3, align 4, !tbaa !37
  %17 = getelementptr inbounds %"class.ardb::ChannelService", ptr %10, i32 0, i32 11
  %18 = load i32, ptr %17, align 4, !tbaa !9
  %19 = icmp ult i32 %16, %18
  br i1 %19, label %21, label %20

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

21:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %22 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 288) #7
  %23 = getelementptr inbounds %"class.ardb::ChannelService", ptr %10, i32 0, i32 3
  %24 = load i32, ptr %23, align 8, !tbaa !38
  invoke void @_ZN4ardb14ChannelServiceC1Ej(ptr noundef nonnull align 8 dereferenceable(288) %22, i32 noundef %24)
          to label %25 unwind label %44

25:                                               ; preds = %21
  store ptr %22, ptr %4, align 8, !tbaa !5
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN4ardb14ChannelService9SetParentEPS0_(ptr noundef nonnull align 8 dereferenceable(288) %26, ptr noundef %10)
  %27 = load i32, ptr %3, align 4, !tbaa !37
  %28 = add i32 %27, 1
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %"class.ardb::ChannelService", ptr %29, i32 0, i32 17
  store i32 %28, ptr %30, align 8, !tbaa !39
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %"class.ardb::ChannelService", ptr %10, i32 0, i32 16
  %33 = load ptr, ptr %32, align 8, !tbaa !40
  call void @_ZN4ardb14ChannelService25RegisterLifecycleCallbackEPNS_23ChannelServiceLifeCycleE(ptr noundef nonnull align 8 dereferenceable(288) %31, ptr noundef %33)
  %34 = getelementptr inbounds %"class.ardb::ChannelService", ptr %10, i32 0, i32 12
  call void @_ZNSt6vectorIPN4ardb14ChannelServiceESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %34, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %35 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #7
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZZN4ardb14ChannelService12StartSubPoolEvEN12LaunchThreadC2EPS0_(ptr noundef nonnull align 8 dereferenceable(40) %35, ptr noundef %36)
          to label %37 unwind label %48

37:                                               ; preds = %25
  store ptr %35, ptr %7, align 8, !tbaa !5
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @_ZN4ardb13ThreadOptionsC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @_ZN4ardb6Thread5StartERKNS_13ThreadOptionsE(ptr noundef nonnull align 8 dereferenceable(28) %38, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %39 = getelementptr inbounds %"class.ardb::ChannelService", ptr %10, i32 0, i32 13
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %40, ptr %9, align 8, !tbaa !5
  call void @_ZNSt6vectorIPN4ardb6ThreadESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %41

41:                                               ; preds = %37
  %42 = load i32, ptr %3, align 4, !tbaa !37
  %43 = add i32 %42, 1
  store i32 %43, ptr %3, align 4, !tbaa !37
  br label %15, !llvm.loop !41

44:                                               ; preds = %21
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %5, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %6, align 4
  call void @_ZdlPvm(ptr noundef %22, i64 noundef 288) #8
  br label %52

48:                                               ; preds = %25
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %5, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %6, align 4
  call void @_ZdlPvm(ptr noundef %35, i64 noundef 40) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %52

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

53:                                               ; preds = %20
  br label %54

54:                                               ; preds = %53, %1
  ret void

55:                                               ; preds = %52
  %56 = load ptr, ptr %5, align 8
  %57 = load i32, ptr %6, align 4
  %58 = insertvalue { ptr, i32 } poison, ptr %56, 0
  %59 = insertvalue { ptr, i32 } %58, i32 %57, 1
  resume { ptr, i32 } %59
}

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #3

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #4

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZZN4ardb14ChannelService12StartSubPoolEvEN12LaunchThreadC2EPS0_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) unnamed_addr #2 align 2

declare void @_ZN4ardb6Thread5StartERKNS_13ThreadOptionsE(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

declare void @_ZN4ardb14ChannelServiceC1Ej(ptr, i32)

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 = { nobuiltin 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 #4 = { 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 #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 = { builtin allocsize(0) }
attributes #8 = { 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, !19, i64 108}
!10 = !{!"_ZTSN4ardb14ChannelServiceE", !11, i64 0, !12, i64 8, !13, i64 16, !19, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !20, i64 64, !26, i64 88, !27, i64 104, !19, i64 108, !28, i64 112, !32, i64 136, !25, i64 160, !36, i64 168, !6, i64 264, !19, i64 272, !6, i64 280}
!11 = !{!"_ZTSN4ardb8RunnableE"}
!12 = !{!"_ZTSN4ardb17SoftSignalHandlerE"}
!13 = !{!"_ZTSN5btree9btree_mapIjPN4ardb7ChannelESt4lessIjESaISt4pairIKjS3_EELi256EEE", !14, i64 0}
!14 = !{!"_ZTSN5btree19btree_map_containerINS_5btreeINS_16btree_map_paramsIjPN4ardb7ChannelESt4lessIjESaISt4pairIKjS5_EELi256EEEEEEE", !15, i64 0}
!15 = !{!"_ZTSN5btree22btree_unique_containerINS_5btreeINS_16btree_map_paramsIjPN4ardb7ChannelESt4lessIjESaISt4pairIKjS5_EELi256EEEEEEE", !16, i64 0}
!16 = !{!"_ZTSN5btree15btree_containerINS_5btreeINS_16btree_map_paramsIjPN4ardb7ChannelESt4lessIjESaISt4pairIKjS5_EELi256EEEEEEE", !17, i64 0}
!17 = !{!"_ZTSN5btree5btreeINS_16btree_map_paramsIjPN4ardb7ChannelESt4lessIjESaISt4pairIKjS4_EELi256EEEEE", !18, i64 0}
!18 = !{!"_ZTSN5btree5btreeINS_16btree_map_paramsIjPN4ardb7ChannelESt4lessIjESaISt4pairIKjS4_EELi256EEEE17empty_base_handleISaIcEPNS_10btree_nodeISB_EEEE", !6, i64 0}
!19 = !{!"int", !7, i64 0}
!20 = !{!"_ZTSNSt7__cxx114listIjSaIjEEE", !21, i64 0}
!21 = !{!"_ZTSNSt7__cxx1110_List_baseIjSaIjEEE", !22, i64 0}
!22 = !{!"_ZTSNSt7__cxx1110_List_baseIjSaIjEE10_List_implE", !23, i64 0}
!23 = !{!"_ZTSNSt8__detail17_List_node_headerE", !24, i64 0, !25, i64 16}
!24 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!25 = !{!"long", !7, i64 0}
!26 = !{!"_ZTSN4ardb9MPSCQueueINS_21ChannelAsyncIOContextEEE", !6, i64 0, !6, i64 8}
!27 = !{!"bool", !7, i64 0}
!28 = !{!"_ZTSSt6vectorIPN4ardb14ChannelServiceESaIS2_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseIPN4ardb14ChannelServiceESaIS2_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIPN4ardb14ChannelServiceESaIS2_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIPN4ardb14ChannelServiceESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!"_ZTSSt6vectorIPN4ardb6ThreadESaIS2_EE", !33, i64 0}
!33 = !{!"_ZTSSt12_Vector_baseIPN4ardb6ThreadESaIS2_EE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIPN4ardb6ThreadESaIS2_EE12_Vector_implE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIPN4ardb6ThreadESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!36 = !{!"_ZTSN4ardb9SPSCQueueIPNS_8RunnableEEE", !6, i64 0, !7, i64 8, !6, i64 72, !6, i64 80, !6, i64 88}
!37 = !{!19, !19, i64 0}
!38 = !{!10, !19, i64 24}
!39 = !{!10, !19, i64 272}
!40 = !{!10, !6, i64 264}
!41 = distinct !{!41, !42}
!42 = !{!"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"

%"struct.ardb::ThreadOptions" = type { i64 }

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

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: mustprogress nounwind uwtable
declare dso_local void @_ZN4ardb14ChannelService25RegisterLifecycleCallbackEPNS_23ChannelServiceLifeCycleE(ptr noundef nonnull align 8 dereferenceable(288), ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4ardb14ChannelService12StartSubPoolEv(ptr noundef nonnull align 8 dereferenceable(288) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"struct.ardb::ThreadOptions", align 8
  %4 = alloca ptr, align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 108
  %6 = load i32, ptr %5, align 4
  %7 = icmp ugt i32 %6, 1
  br i1 %7, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %1
  %8 = getelementptr inbounds i8, ptr %0, i64 24
  %9 = getelementptr inbounds i8, ptr %0, i64 264
  %10 = getelementptr inbounds i8, ptr %0, i64 112
  %11 = getelementptr inbounds i8, ptr %0, i64 136
  br label %12

12:                                               ; preds = %.lr.ph, %22
  %.012 = phi i32 [ 0, %.lr.ph ], [ %16, %22 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %13 = call noalias noundef nonnull dereferenceable(288) ptr @_Znwm(i64 noundef 288) #7
  %14 = load i32, ptr %8, align 8, !tbaa !5
  invoke void @_ZN4ardb14ChannelServiceC1Ej(ptr noundef nonnull align 8 dereferenceable(288) %13, i32 noundef %14)
          to label %15 unwind label %25

15:                                               ; preds = %12
  store ptr %13, ptr %2, align 8, !tbaa !36
  call void @_ZN4ardb14ChannelService9SetParentEPS0_(ptr noundef nonnull align 8 dereferenceable(288) %13, ptr noundef nonnull %0)
  %16 = add nuw i32 %.012, 1
  %17 = load ptr, ptr %2, align 8, !tbaa !36
  %18 = getelementptr inbounds i8, ptr %17, i64 272
  store i32 %16, ptr %18, align 8, !tbaa !37
  %19 = load ptr, ptr %9, align 8, !tbaa !38
  call void @_ZN4ardb14ChannelService25RegisterLifecycleCallbackEPNS_23ChannelServiceLifeCycleE(ptr noundef nonnull align 8 dereferenceable(288) %17, ptr noundef %19)
  call void @_ZNSt6vectorIPN4ardb14ChannelServiceESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %20 = call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #7
  %21 = load ptr, ptr %2, align 8, !tbaa !36
  invoke void @_ZZN4ardb14ChannelService12StartSubPoolEvEN12LaunchThreadC2EPS0_(ptr noundef nonnull align 8 dereferenceable(40) %20, ptr noundef %21)
          to label %22 unwind label %27

22:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @_ZN4ardb13ThreadOptionsC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @_ZN4ardb6Thread5StartERKNS_13ThreadOptionsE(ptr noundef nonnull align 8 dereferenceable(28) %20, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  store ptr %20, ptr %4, align 8, !tbaa !36
  call void @_ZNSt6vectorIPN4ardb6ThreadESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  %23 = load i32, ptr %5, align 4, !tbaa !39
  %24 = icmp ult i32 %16, %23
  br i1 %24, label %12, label %.loopexit, !llvm.loop !40

25:                                               ; preds = %12
  %26 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %13, i64 noundef 288) #8
  br label %29

27:                                               ; preds = %15
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %20, i64 noundef 40) #8
  br label %29

29:                                               ; preds = %27, %25
  %.pn = phi { ptr, i32 } [ %28, %27 ], [ %26, %25 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn

.loopexit:                                        ; preds = %22, %1
  ret void
}

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #3

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIPN4ardb14ChannelServiceESaIS2_EE9push_backERKS2_(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 hidden void @_ZZN4ardb14ChannelService12StartSubPoolEvEN12LaunchThreadC2EPS0_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) unnamed_addr #2 align 2

declare void @_ZN4ardb6Thread5StartERKNS_13ThreadOptionsE(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

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

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

declare void @_ZN4ardb14ChannelServiceC1Ej(ptr, i32) 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 = { nobuiltin 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 #4 = { 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 #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 = { builtin allocsize(0) }
attributes #8 = { 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, !18, i64 24}
!6 = !{!"_ZTSN4ardb14ChannelServiceE", !7, i64 0, !8, i64 8, !9, i64 16, !18, i64 24, !15, i64 32, !15, i64 40, !15, i64 48, !15, i64 56, !19, i64 64, !25, i64 88, !26, i64 104, !18, i64 108, !27, i64 112, !31, i64 136, !24, i64 160, !35, i64 168, !15, i64 264, !18, i64 272, !15, i64 280}
!7 = !{!"_ZTSN4ardb8RunnableE"}
!8 = !{!"_ZTSN4ardb17SoftSignalHandlerE"}
!9 = !{!"_ZTSN5btree9btree_mapIjPN4ardb7ChannelESt4lessIjESaISt4pairIKjS3_EELi256EEE", !10, i64 0}
!10 = !{!"_ZTSN5btree19btree_map_containerINS_5btreeINS_16btree_map_paramsIjPN4ardb7ChannelESt4lessIjESaISt4pairIKjS5_EELi256EEEEEEE", !11, i64 0}
!11 = !{!"_ZTSN5btree22btree_unique_containerINS_5btreeINS_16btree_map_paramsIjPN4ardb7ChannelESt4lessIjESaISt4pairIKjS5_EELi256EEEEEEE", !12, i64 0}
!12 = !{!"_ZTSN5btree15btree_containerINS_5btreeINS_16btree_map_paramsIjPN4ardb7ChannelESt4lessIjESaISt4pairIKjS5_EELi256EEEEEEE", !13, i64 0}
!13 = !{!"_ZTSN5btree5btreeINS_16btree_map_paramsIjPN4ardb7ChannelESt4lessIjESaISt4pairIKjS4_EELi256EEEEE", !14, i64 0}
!14 = !{!"_ZTSN5btree5btreeINS_16btree_map_paramsIjPN4ardb7ChannelESt4lessIjESaISt4pairIKjS4_EELi256EEEE17empty_base_handleISaIcEPNS_10btree_nodeISB_EEEE", !15, i64 0}
!15 = !{!"any pointer", !16, i64 0}
!16 = !{!"omnipotent char", !17, i64 0}
!17 = !{!"Simple C++ TBAA"}
!18 = !{!"int", !16, i64 0}
!19 = !{!"_ZTSNSt7__cxx114listIjSaIjEEE", !20, i64 0}
!20 = !{!"_ZTSNSt7__cxx1110_List_baseIjSaIjEEE", !21, i64 0}
!21 = !{!"_ZTSNSt7__cxx1110_List_baseIjSaIjEE10_List_implE", !22, i64 0}
!22 = !{!"_ZTSNSt8__detail17_List_node_headerE", !23, i64 0, !24, i64 16}
!23 = !{!"_ZTSNSt8__detail15_List_node_baseE", !15, i64 0, !15, i64 8}
!24 = !{!"long", !16, i64 0}
!25 = !{!"_ZTSN4ardb9MPSCQueueINS_21ChannelAsyncIOContextEEE", !15, i64 0, !15, i64 8}
!26 = !{!"bool", !16, i64 0}
!27 = !{!"_ZTSSt6vectorIPN4ardb14ChannelServiceESaIS2_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseIPN4ardb14ChannelServiceESaIS2_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIPN4ardb14ChannelServiceESaIS2_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIPN4ardb14ChannelServiceESaIS2_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!31 = !{!"_ZTSSt6vectorIPN4ardb6ThreadESaIS2_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIPN4ardb6ThreadESaIS2_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIPN4ardb6ThreadESaIS2_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIPN4ardb6ThreadESaIS2_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!35 = !{!"_ZTSN4ardb9SPSCQueueIPNS_8RunnableEEE", !15, i64 0, !16, i64 8, !15, i64 72, !15, i64 80, !15, i64 88}
!36 = !{!15, !15, i64 0}
!37 = !{!6, !18, i64 272}
!38 = !{!6, !15, i64 264}
!39 = !{!6, !18, i64 108}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}


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