; LLVM IR from yinqiwen/ardb :: src/common/channel/signal (signal_channel)

; 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.btree::btree_iterator" = type <{ ptr, i32, [4 x i8] }>
%"struct.btree::btree_iterator.33" = type <{ ptr, i32, [4 x i8] }>
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.41" = type { ptr }
%"class.ardb::SignalChannel" = type <{ %"class.ardb::Channel", %"class.btree::btree_map.0", i32, i32, i32, [4 x i8] }>
%"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" }
%"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<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.btree::btree_map.0" = type { %"class.btree::btree_map_container.1" }
%"class.btree::btree_map_container.1" = type { %"class.btree::btree_unique_container.2" }
%"class.btree::btree_unique_container.2" = type { %"class.btree::btree_container.3" }
%"class.btree::btree_container.3" = type { %"class.btree::btree.4" }
%"class.btree::btree.4" = type { %"struct.btree::btree<btree::btree_map_params<unsigned int, std::vector<ardb::SignalHandler *>, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, std::vector<ardb::SignalHandler *>>>, 256>>::empty_base_handle" }
%"struct.btree::btree<btree::btree_map_params<unsigned int, std::vector<ardb::SignalHandler *>, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, std::vector<ardb::SignalHandler *>>>, 256>>::empty_base_handle" = type { ptr }
%"struct.std::pair" = type { i32, %"class.std::vector.35" }
%"class.std::vector.35" = type { %"struct.std::_Vector_base.36" }
%"struct.std::_Vector_base.36" = type { %"struct.std::_Vector_base<ardb::SignalHandler *, std::allocator<ardb::SignalHandler *>>::_Vector_impl" }
%"struct.std::_Vector_base<ardb::SignalHandler *, std::allocator<ardb::SignalHandler *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ardb::SignalHandler *, std::allocator<ardb::SignalHandler *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ardb::SignalHandler *, std::allocator<ardb::SignalHandler *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5btree15btree_containerINS_5btreeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEEE3endEv(ptr dead_on_unwind noalias writable sret(%"struct.btree::btree_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK5btree14btree_iteratorINS_10btree_nodeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEERSD_PSD_EptEv(ptr noundef nonnull align 8 dereferenceable(12)) #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPPN4ardb13SignalHandlerESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4ardb13SignalChannel10UnregisterEPNS_13SignalHandlerE(ptr noundef nonnull align 8 dereferenceable(276) %0, ptr noundef %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.btree::btree_iterator", align 8
  %6 = alloca %"struct.btree::btree_iterator.33", align 8
  %7 = alloca %"struct.btree::btree_iterator", align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.41", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"struct.btree::btree_iterator", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #4
  %16 = getelementptr inbounds %"class.ardb::SignalChannel", ptr %15, i32 0, i32 1
  call void @_ZN5btree15btree_containerINS_5btreeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEEE5beginEv(ptr dead_on_unwind writable sret(%"struct.btree::btree_iterator") align 8 %5, ptr noundef nonnull align 8 dereferenceable(8) %16)
  br label %17

17:                                               ; preds = %45, %2
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #4
  %18 = getelementptr inbounds %"class.ardb::SignalChannel", ptr %15, i32 0, i32 1
  call void @_ZN5btree15btree_containerINS_5btreeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEEE3endEv(ptr dead_on_unwind writable sret(%"struct.btree::btree_iterator") align 8 %7, ptr noundef nonnull align 8 dereferenceable(8) %18)
  call void @_ZN5btree14btree_iteratorIKNS_10btree_nodeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEERKSD_PSI_EC2ERKNS0_ISG_RSD_PSD_EE(ptr noundef nonnull align 8 dereferenceable(12) %6, ptr noundef nonnull align 8 dereferenceable(12) %7)
  %19 = call noundef zeroext i1 @_ZNK5btree14btree_iteratorINS_10btree_nodeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEERSD_PSD_EneERKNS0_IKSG_RKSD_PSL_EE(ptr noundef nonnull align 8 dereferenceable(12) %5, ptr noundef nonnull align 8 dereferenceable(12) %6)
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #4
  br i1 %19, label %20, label %46

20:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %21 = call noundef ptr @_ZNK5btree14btree_iteratorINS_10btree_nodeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEERSD_PSD_EptEv(ptr noundef nonnull align 8 dereferenceable(12) %5)
  %22 = getelementptr inbounds %"struct.std::pair", ptr %21, i32 0, i32 1
  store ptr %22, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = call ptr @_ZNSt6vectorIPN4ardb13SignalHandlerESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #4
  %25 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %24, ptr %25, align 8
  br label %26

26:                                               ; preds = %42, %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = call ptr @_ZNSt6vectorIPN4ardb13SignalHandlerESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #4
  %29 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %28, ptr %29, align 8
  %30 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN4ardb13SignalHandlerESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br i1 %30, label %31, label %45

31:                                               ; preds = %26
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN4ardb13SignalHandlerESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %34 = load ptr, ptr %33, align 8, !tbaa !5
  %35 = icmp eq ptr %32, %34
  br i1 %35, label %36, label %42

36:                                               ; preds = %31
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKPN4ardb13SignalHandlerESt6vectorIS3_SaIS3_EEEC2IPS3_vEERKNS0_IT_S8_EE(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %38 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.41", ptr %11, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8
  %40 = call ptr @_ZNSt6vectorIPN4ardb13SignalHandlerESaIS2_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS2_S4_EE(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr %39)
  %41 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %40, ptr %41, align 8
  br label %45

42:                                               ; preds = %31
  %43 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN4ardb13SignalHandlerESt6vectorIS3_SaIS3_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %9, i32 noundef 0) #4
  %44 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %43, ptr %44, align 8
  br label %26, !llvm.loop !9

45:                                               ; preds = %36, %26
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #4
  call void @_ZN5btree14btree_iteratorINS_10btree_nodeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEERSD_PSD_EppEi(ptr dead_on_unwind writable sret(%"struct.btree::btree_iterator") align 8 %14, ptr noundef nonnull align 8 dereferenceable(12) %5, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %17, !llvm.loop !11

46:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #4
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5btree15btree_containerINS_5btreeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEEE5beginEv(ptr dead_on_unwind noalias writable sret(%"struct.btree::btree_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5btree14btree_iteratorINS_10btree_nodeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEERSD_PSD_EppEi(ptr dead_on_unwind noalias writable sret(%"struct.btree::btree_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(12), i32 noundef) #2 align 2

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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


; 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.btree::btree_iterator" = type <{ ptr, i32, [4 x i8] }>
%"struct.btree::btree_iterator.33" = type <{ ptr, i32, [4 x i8] }>
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.41" = type { ptr }

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5btree15btree_containerINS_5btreeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEEE3endEv(ptr dead_on_unwind noalias writable sret(%"struct.btree::btree_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPPN4ardb13SignalHandlerESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4ardb13SignalChannel10UnregisterEPNS_13SignalHandlerE(ptr noundef nonnull align 8 dereferenceable(276) %0, ptr noundef readnone %1) local_unnamed_addr #2 align 2 {
  %3 = alloca %"struct.btree::btree_iterator", align 8
  %4 = alloca %"struct.btree::btree_iterator.33", align 8
  %5 = alloca %"struct.btree::btree_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.41", align 8
  %9 = alloca %"struct.btree::btree_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  %10 = getelementptr inbounds i8, ptr %0, i64 256
  call void @_ZN5btree15btree_containerINS_5btreeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEEE5beginEv(ptr dead_on_unwind nonnull writable sret(%"struct.btree::btree_iterator") align 8 %3, ptr noundef nonnull align 8 dereferenceable(8) %10)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  call void @_ZN5btree15btree_containerINS_5btreeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEEE3endEv(ptr dead_on_unwind nonnull writable sret(%"struct.btree::btree_iterator") align 8 %5, ptr noundef nonnull align 8 dereferenceable(8) %10)
  call void @_ZN5btree14btree_iteratorIKNS_10btree_nodeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEERKSD_PSI_EC2ERKNS0_ISG_RSD_PSD_EE(ptr noundef nonnull align 8 dereferenceable(12) %4, ptr noundef nonnull align 8 dereferenceable(12) %5)
  %11 = call noundef zeroext i1 @_ZNK5btree14btree_iteratorINS_10btree_nodeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEERSD_PSD_EneERKNS0_IKSG_RKSD_PSL_EE(ptr noundef nonnull align 8 dereferenceable(12) %3, ptr noundef nonnull align 8 dereferenceable(12) %4)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  br i1 %11, label %.lr.ph6, label %._crit_edge

.lr.ph6:                                          ; preds = %2, %.loopexit
  %12 = call noundef ptr @_ZNK5btree14btree_iteratorINS_10btree_nodeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEERSD_PSD_EptEv(ptr noundef nonnull align 8 dereferenceable(12) %3)
  %13 = getelementptr inbounds i8, ptr %12, i64 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %14 = call ptr @_ZNSt6vectorIPN4ardb13SignalHandlerESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  store ptr %14, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %15 = call ptr @_ZNSt6vectorIPN4ardb13SignalHandlerESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  store ptr %15, ptr %7, align 8
  %16 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN4ardb13SignalHandlerESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br i1 %16, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.lr.ph6, %23
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN4ardb13SignalHandlerESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %18 = load ptr, ptr %17, align 8, !tbaa !5
  %19 = icmp eq ptr %18, %1
  br i1 %19, label %20, label %23

20:                                               ; preds = %.lr.ph
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKPN4ardb13SignalHandlerESt6vectorIS3_SaIS3_EEEC2IPS3_vEERKNS0_IT_S8_EE(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %21 = load ptr, ptr %8, align 8
  %22 = call ptr @_ZNSt6vectorIPN4ardb13SignalHandlerESaIS2_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS2_S4_EE(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr %21)
  br label %.loopexit

23:                                               ; preds = %.lr.ph
  %24 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN4ardb13SignalHandlerESt6vectorIS3_SaIS3_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef 0) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %25 = call ptr @_ZNSt6vectorIPN4ardb13SignalHandlerESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  store ptr %25, ptr %7, align 8
  %26 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN4ardb13SignalHandlerESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br i1 %26, label %.lr.ph, label %.loopexit, !llvm.loop !9

.loopexit:                                        ; preds = %23, %.lr.ph6, %20
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #4
  call void @_ZN5btree14btree_iteratorINS_10btree_nodeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEERSD_PSD_EppEi(ptr dead_on_unwind nonnull writable sret(%"struct.btree::btree_iterator") align 8 %9, ptr noundef nonnull align 8 dereferenceable(12) %3, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  call void @_ZN5btree15btree_containerINS_5btreeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEEE3endEv(ptr dead_on_unwind nonnull writable sret(%"struct.btree::btree_iterator") align 8 %5, ptr noundef nonnull align 8 dereferenceable(8) %10)
  call void @_ZN5btree14btree_iteratorIKNS_10btree_nodeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEERKSD_PSI_EC2ERKNS0_ISG_RSD_PSD_EE(ptr noundef nonnull align 8 dereferenceable(12) %4, ptr noundef nonnull align 8 dereferenceable(12) %5)
  %27 = call noundef zeroext i1 @_ZNK5btree14btree_iteratorINS_10btree_nodeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEERSD_PSD_EneERKNS0_IKSG_RKSD_PSL_EE(ptr noundef nonnull align 8 dereferenceable(12) %3, ptr noundef nonnull align 8 dereferenceable(12) %4)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  br i1 %27, label %.lr.ph6, label %._crit_edge, !llvm.loop !11

._crit_edge:                                      ; preds = %.loopexit, %2
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5btree15btree_containerINS_5btreeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEEE5beginEv(ptr dead_on_unwind noalias writable sret(%"struct.btree::btree_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5btree14btree_iteratorINS_10btree_nodeINS_16btree_map_paramsIjSt6vectorIPN4ardb13SignalHandlerESaIS6_EESt4lessIjESaISt4pairIKjS8_EELi256EEEEERSD_PSD_EppEi(ptr dead_on_unwind noalias writable sret(%"struct.btree::btree_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(12), i32 noundef) local_unnamed_addr #2 align 2

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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


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