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

; 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.ardb::Channel" = type { %"class.ardb::Runnable", %"struct.ardb::ChannelOptions", i8, i8, i32, %"class.ardb::ChannelPipeline", ptr, i32, i32, %"class.ardb::Buffer", %"class.ardb::Buffer", i32, ptr, ptr, ptr, ptr, i8, i8, i8, ptr, ptr, ptr }
%"class.ardb::Runnable" = type { ptr }
%"struct.ardb::ChannelOptions" = type <{ i32, i32, i8, [3 x i8], i32, i8, [3 x i8], i32, i32, i32, i8, i8, [2 x i8] }>
%"class.ardb::ChannelPipeline" = type { ptr, ptr, ptr, %"class.btree::btree_map.14" }
%"class.btree::btree_map.14" = type { %"class.btree::btree_map_container.15" }
%"class.btree::btree_map_container.15" = type { %"class.btree::btree_unique_container.16" }
%"class.btree::btree_unique_container.16" = type { %"class.btree::btree_container.17" }
%"class.btree::btree_container.17" = type { %"class.btree::btree.18" }
%"class.btree::btree.18" = type { %"struct.btree::btree<btree::btree_map_params<std::__cxx11::basic_string<char>, ardb::ChannelHandlerContext *, std::less<std::__cxx11::basic_string<char>>, std::allocator<std::pair<const std::__cxx11::basic_string<char>, ardb::ChannelHandlerContext *>>, 256>>::empty_base_handle" }
%"struct.btree::btree<btree::btree_map_params<std::__cxx11::basic_string<char>, ardb::ChannelHandlerContext *, std::less<std::__cxx11::basic_string<char>>, std::allocator<std::pair<const std::__cxx11::basic_string<char>, ardb::ChannelHandlerContext *>>, 256>>::empty_base_handle" = type { ptr }
%"class.ardb::Buffer" = type <{ ptr, i64, i64, i64, i8, [7 x i8] }>
%"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 }
%"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 }

@_ZTISt9bad_alloc = external constant 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 uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN5btree19btree_map_containerINS_5btreeINS_16btree_map_paramsIjPN4ardb7ChannelESt4lessIjESaISt4pairIKjS5_EELi256EEEEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

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

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

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #4

declare ptr @__cxa_begin_catch(ptr)

declare void @__cxa_end_catch()

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN4ardb7Channel11GetPipelineEv(ptr noundef nonnull align 8 dereferenceable(256)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4ardb15ChannelPipeline6AttachEPNS_7ChannelE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN4ardb14ChannelService14NewPipeChannelEii(ptr noundef nonnull align 8 dereferenceable(288) %0, i32 noundef %1, i32 noundef %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %12 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store ptr null, ptr %7, align 8, !tbaa !5
  br label %13

13:                                               ; preds = %3
  %14 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 264) #8
          to label %15 unwind label %19

15:                                               ; preds = %13
  %16 = load i32, ptr %5, align 4, !tbaa !9
  %17 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @_ZN4ardb11PipeChannelC1ERNS_14ChannelServiceEii(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef nonnull align 8 dereferenceable(288) %12, i32 noundef %16, i32 noundef %17)
          to label %18 unwind label %23

18:                                               ; preds = %15
  store ptr %14, ptr %7, align 8, !tbaa !5
  br label %34

19:                                               ; preds = %13
  %20 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9bad_alloc
  %21 = extractvalue { ptr, i32 } %20, 0
  store ptr %21, ptr %8, align 8
  %22 = extractvalue { ptr, i32 } %20, 1
  store i32 %22, ptr %9, align 4
  br label %27

23:                                               ; preds = %15
  %24 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9bad_alloc
  %25 = extractvalue { ptr, i32 } %24, 0
  store ptr %25, ptr %8, align 8
  %26 = extractvalue { ptr, i32 } %24, 1
  store i32 %26, ptr %9, align 4
  call void @_ZdlPvm(ptr noundef %14, i64 noundef 264) #9
  br label %27

27:                                               ; preds = %23, %19
  %28 = load i32, ptr %9, align 4
  %29 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9bad_alloc) #7
  %30 = icmp eq i32 %28, %29
  br i1 %30, label %31, label %58

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %32 = load ptr, ptr %8, align 8
  %33 = call ptr @__cxa_begin_catch(ptr %32) #7
  store ptr %33, ptr %10, align 8
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %34

34:                                               ; preds = %31, %18
  br label %35

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = icmp ne ptr null, %37
  br i1 %38, label %39, label %56

39:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %40, ptr %11, align 8, !tbaa !5
  %41 = load ptr, ptr %11, align 8, !tbaa !5
  %42 = getelementptr inbounds %"class.ardb::Channel", ptr %41, i32 0, i32 7
  %43 = load i32, ptr %42, align 8, !tbaa !11
  %44 = shl i32 %43, 4
  %45 = add i32 %44, 4
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  %47 = getelementptr inbounds %"class.ardb::Channel", ptr %46, i32 0, i32 7
  store i32 %45, ptr %47, align 8, !tbaa !11
  %48 = load ptr, ptr %11, align 8, !tbaa !5
  %49 = getelementptr inbounds %"class.ardb::ChannelService", ptr %12, i32 0, i32 2
  %50 = load ptr, ptr %11, align 8, !tbaa !5
  %51 = getelementptr inbounds %"class.ardb::Channel", ptr %50, i32 0, i32 7
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5btree19btree_map_containerINS_5btreeINS_16btree_map_paramsIjPN4ardb7ChannelESt4lessIjESaISt4pairIKjS5_EELi256EEEEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull align 4 dereferenceable(4) %51)
  store ptr %48, ptr %52, align 8, !tbaa !5
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN4ardb7Channel11GetPipelineEv(ptr noundef nonnull align 8 dereferenceable(256) %53)
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN4ardb15ChannelPipeline6AttachEPNS_7ChannelE(ptr noundef nonnull align 8 dereferenceable(32) %54, ptr noundef %55)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %56

56:                                               ; preds = %39, %36
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  ret ptr %57

58:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %59

59:                                               ; preds = %58
  %60 = load ptr, ptr %8, align 8
  %61 = load i32, ptr %9, align 4
  %62 = insertvalue { ptr, i32 } poison, ptr %60, 0
  %63 = insertvalue { ptr, i32 } %62, i32 %61, 1
  resume { ptr, i32 } %63
}

declare void @_ZN4ardb11PipeChannelC1ERNS_14ChannelServiceEii(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef nonnull align 8 dereferenceable(288), i32 noundef, i32 noundef) unnamed_addr #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { 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 #4 = { nounwind memory(none) }
attributes #5 = { 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 #6 = { "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 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { 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 96}
!12 = !{!"_ZTSN4ardb7ChannelE", !13, i64 0, !14, i64 8, !15, i64 44, !15, i64 45, !10, i64 48, !16, i64 56, !6, i64 88, !10, i64 96, !10, i64 100, !23, i64 104, !23, i64 144, !10, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !15, i64 224, !15, i64 225, !15, i64 226, !6, i64 232, !6, i64 240, !6, i64 248}
!13 = !{!"_ZTSN4ardb8RunnableE"}
!14 = !{!"_ZTSN4ardb14ChannelOptionsE", !10, i64 0, !10, i64 4, !15, i64 8, !10, i64 12, !15, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !15, i64 32, !15, i64 33}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN4ardb15ChannelPipelineE", !6, i64 0, !6, i64 8, !6, i64 16, !17, i64 24}
!17 = !{!"_ZTSN5btree9btree_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS6_ESaISt4pairIKS6_S9_EELi256EEE", !18, i64 0}
!18 = !{!"_ZTSN5btree19btree_map_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEE", !19, i64 0}
!19 = !{!"_ZTSN5btree22btree_unique_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEE", !20, i64 0}
!20 = !{!"_ZTSN5btree15btree_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEE", !21, i64 0}
!21 = !{!"_ZTSN5btree5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS7_ESaISt4pairIKS7_SA_EELi256EEEEE", !22, i64 0}
!22 = !{!"_ZTSN5btree5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS7_ESaISt4pairIKS7_SA_EELi256EEEE17empty_base_handleIS6_PNS_10btree_nodeISH_EEEE", !6, i64 0}
!23 = !{!"_ZTSN4ardb6BufferE", !6, i64 0, !24, i64 8, !24, i64 16, !24, i64 24, !15, i64 32}
!24 = !{!"long", !7, i64 0}


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

@_ZTISt9bad_alloc = external constant ptr

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #3

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN4ardb7Channel11GetPipelineEv(ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4ardb15ChannelPipeline6AttachEPNS_7ChannelE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN4ardb14ChannelService14NewPipeChannelEii(ptr noundef nonnull align 8 dereferenceable(288) %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = invoke noalias noundef nonnull dereferenceable(264) ptr @_Znwm(i64 noundef 264) #6
          to label %5 unwind label %6

5:                                                ; preds = %3
  invoke void @_ZN4ardb11PipeChannelC1ERNS_14ChannelServiceEii(ptr noundef nonnull align 8 dereferenceable(264) %4, ptr noundef nonnull align 8 dereferenceable(288) %0, i32 noundef %1, i32 noundef %2)
          to label %14 unwind label %8

6:                                                ; preds = %3
  %7 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9bad_alloc
  br label %10

8:                                                ; preds = %5
  %9 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9bad_alloc
  tail call void @_ZdlPvm(ptr noundef nonnull %4, i64 noundef 264) #7
  br label %10

10:                                               ; preds = %8, %6
  %.pn = phi { ptr, i32 } [ %9, %8 ], [ %7, %6 ]
  %.016 = extractvalue { ptr, i32 } %.pn, 1
  %11 = tail call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9bad_alloc) #8
  %12 = icmp eq i32 %.016, %11
  br i1 %12, label %.thread, label %23

.thread:                                          ; preds = %10
  %.015 = extractvalue { ptr, i32 } %.pn, 0
  %13 = tail call ptr @__cxa_begin_catch(ptr %.015) #8
  tail call void @__cxa_end_catch()
  br label %22

14:                                               ; preds = %5
  %15 = getelementptr inbounds i8, ptr %4, i64 96
  %16 = load i32, ptr %15, align 8, !tbaa !5
  %17 = shl i32 %16, 4
  %18 = or disjoint i32 %17, 4
  store i32 %18, ptr %15, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %0, i64 16
  %20 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5btree19btree_map_containerINS_5btreeINS_16btree_map_paramsIjPN4ardb7ChannelESt4lessIjESaISt4pairIKjS5_EELi256EEEEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(4) %15)
  store ptr %4, ptr %20, align 8, !tbaa !23
  %21 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN4ardb7Channel11GetPipelineEv(ptr noundef nonnull align 8 dereferenceable(256) %4)
  tail call void @_ZN4ardb15ChannelPipeline6AttachEPNS_7ChannelE(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull %4)
  br label %22

22:                                               ; preds = %.thread, %14
  %.020 = phi ptr [ null, %.thread ], [ %4, %14 ]
  ret ptr %.020

23:                                               ; preds = %10
  resume { ptr, i32 } %.pn
}

declare void @_ZN4ardb11PipeChannelC1ERNS_14ChannelServiceEii(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef nonnull align 8 dereferenceable(288), i32 noundef, i32 noundef) unnamed_addr #5

attributes #0 = { 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 #1 = { 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 #2 = { 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 #3 = { nofree nosync nounwind memory(none) }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 = { builtin allocsize(0) }
attributes #7 = { builtin nounwind }
attributes #8 = { 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, !9, i64 96}
!6 = !{!"_ZTSN4ardb7ChannelE", !7, i64 0, !8, i64 8, !12, i64 44, !12, i64 45, !9, i64 48, !13, i64 56, !14, i64 88, !9, i64 96, !9, i64 100, !21, i64 104, !21, i64 144, !9, i64 184, !14, i64 192, !14, i64 200, !14, i64 208, !14, i64 216, !12, i64 224, !12, i64 225, !12, i64 226, !14, i64 232, !14, i64 240, !14, i64 248}
!7 = !{!"_ZTSN4ardb8RunnableE"}
!8 = !{!"_ZTSN4ardb14ChannelOptionsE", !9, i64 0, !9, i64 4, !12, i64 8, !9, i64 12, !12, i64 16, !9, i64 20, !9, i64 24, !9, i64 28, !12, i64 32, !12, i64 33}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"bool", !10, i64 0}
!13 = !{!"_ZTSN4ardb15ChannelPipelineE", !14, i64 0, !14, i64 8, !14, i64 16, !15, i64 24}
!14 = !{!"any pointer", !10, i64 0}
!15 = !{!"_ZTSN5btree9btree_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS6_ESaISt4pairIKS6_S9_EELi256EEE", !16, i64 0}
!16 = !{!"_ZTSN5btree19btree_map_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEE", !17, i64 0}
!17 = !{!"_ZTSN5btree22btree_unique_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEE", !18, i64 0}
!18 = !{!"_ZTSN5btree15btree_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEE", !19, i64 0}
!19 = !{!"_ZTSN5btree5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS7_ESaISt4pairIKS7_SA_EELi256EEEEE", !20, i64 0}
!20 = !{!"_ZTSN5btree5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS7_ESaISt4pairIKS7_SA_EELi256EEEE17empty_base_handleIS6_PNS_10btree_nodeISH_EEEE", !14, i64 0}
!21 = !{!"_ZTSN4ardb6BufferE", !14, i64 0, !22, i64 8, !22, i64 16, !22, i64 24, !12, i64 32}
!22 = !{!"long", !10, i64 0}
!23 = !{!14, !14, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass