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

; 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::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 }

@_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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #1

declare void @_ZN4ardb21ChannelHandlerContextC1ERNS_15ChannelPipelineEPS0_S3_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_14ChannelHandlerE(ptr noundef nonnull align 8 dereferenceable(66), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) unnamed_addr #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: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN5btree19btree_map_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEixERSF_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK5btree22btree_unique_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEE5countERSF_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4ardb21ChannelHandlerContext7SetPrevEPS0_(ptr noundef nonnull align 8 dereferenceable(66), ptr noundef) #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4ardb21ChannelHandlerContext7SetNextEPS0_(ptr noundef nonnull align 8 dereferenceable(66), ptr noundef) #6 align 2

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

19:                                               ; preds = %4
  %20 = load ptr, ptr %10, align 8, !tbaa !5
  %21 = icmp eq ptr null, %20
  br i1 %21, label %22, label %23

22:                                               ; preds = %19
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %91

23:                                               ; preds = %19
  br label %24

24:                                               ; preds = %23
  br label %25

25:                                               ; preds = %24
  %26 = load ptr, ptr %10, align 8, !tbaa !5
  %27 = getelementptr inbounds %"class.ardb::ChannelPipeline", ptr %16, i32 0, i32 1
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  %29 = icmp eq ptr %26, %28
  br i1 %29, label %30, label %34

30:                                               ; preds = %25
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = call noundef ptr @_ZN4ardb15ChannelPipeline11PriAddFirstERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_14ChannelHandlerE(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef %32)
  store ptr %33, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %91

34:                                               ; preds = %25
  br label %35

35:                                               ; preds = %34
  %36 = getelementptr inbounds %"class.ardb::ChannelPipeline", ptr %16, i32 0, i32 3
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = call noundef i64 @_ZNK5btree22btree_unique_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEE5countERSF_(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(32) %37)
  %39 = icmp sgt i64 %38, 0
  br i1 %39, label %40, label %41

40:                                               ; preds = %35
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %91

41:                                               ; preds = %35
  br label %42

42:                                               ; preds = %41
  br label %43

43:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store ptr null, ptr %12, align 8, !tbaa !5
  br label %44

44:                                               ; preds = %43
  %45 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 72) #8
          to label %46 unwind label %54

46:                                               ; preds = %44
  %47 = load ptr, ptr %10, align 8, !tbaa !5
  %48 = invoke noundef ptr @_ZN4ardb21ChannelHandlerContext7GetPrevEv(ptr noundef nonnull align 8 dereferenceable(66) %47)
          to label %49 unwind label %58

49:                                               ; preds = %46
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  invoke void @_ZN4ardb21ChannelHandlerContextC1ERNS_15ChannelPipelineEPS0_S3_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_14ChannelHandlerE(ptr noundef nonnull align 8 dereferenceable(66) %45, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef %48, ptr noundef %50, ptr noundef nonnull align 8 dereferenceable(32) %51, ptr noundef %52)
          to label %53 unwind label %58

53:                                               ; preds = %49
  store ptr %45, ptr %12, align 8, !tbaa !5
  br label %69

54:                                               ; preds = %44
  %55 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9bad_alloc
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %13, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %14, align 4
  br label %62

58:                                               ; preds = %49, %46
  %59 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9bad_alloc
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %13, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %14, align 4
  call void @_ZdlPvm(ptr noundef %45, i64 noundef 72) #9
  br label %62

62:                                               ; preds = %58, %54
  %63 = load i32, ptr %14, align 4
  %64 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9bad_alloc) #7
  %65 = icmp eq i32 %63, %64
  br i1 %65, label %66, label %90

66:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %67 = load ptr, ptr %13, align 8
  %68 = call ptr @__cxa_begin_catch(ptr %67) #7
  store ptr %68, ptr %15, align 8
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %69

69:                                               ; preds = %66, %53
  br label %70

70:                                               ; preds = %69
  br label %71

71:                                               ; preds = %70
  br label %72

72:                                               ; preds = %71
  %73 = load ptr, ptr %12, align 8, !tbaa !5
  %74 = icmp eq ptr null, %73
  br i1 %74, label %75, label %76

75:                                               ; preds = %72
  store ptr null, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %89

76:                                               ; preds = %72
  br label %77

77:                                               ; preds = %76
  br label %78

78:                                               ; preds = %77
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  %80 = call noundef ptr @_ZN4ardb21ChannelHandlerContext7GetPrevEv(ptr noundef nonnull align 8 dereferenceable(66) %79)
  %81 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN4ardb21ChannelHandlerContext7SetNextEPS0_(ptr noundef nonnull align 8 dereferenceable(66) %80, ptr noundef %81)
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  %83 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN4ardb21ChannelHandlerContext7SetPrevEPS0_(ptr noundef nonnull align 8 dereferenceable(66) %82, ptr noundef %83)
  %84 = load ptr, ptr %12, align 8, !tbaa !5
  %85 = getelementptr inbounds %"class.ardb::ChannelPipeline", ptr %16, i32 0, i32 3
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5btree19btree_map_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEixERSF_(ptr noundef nonnull align 8 dereferenceable(8) %85, ptr noundef nonnull align 8 dereferenceable(32) %86)
  store ptr %84, ptr %87, align 8, !tbaa !5
  %88 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %88, ptr %5, align 8
  store i32 1, ptr %11, align 4
  br label %89

89:                                               ; preds = %78, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %91

90:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %93

91:                                               ; preds = %89, %40, %30, %22
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %92 = load ptr, ptr %5, align 8
  ret ptr %92

93:                                               ; preds = %90
  %94 = load ptr, ptr %13, align 8
  %95 = load i32, ptr %14, align 4
  %96 = insertvalue { ptr, i32 } poison, ptr %94, 0
  %97 = insertvalue { ptr, i32 } %96, i32 %95, 1
  resume { ptr, i32 } %97
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4ardb21ChannelHandlerContext7GetPrevEv(ptr noundef nonnull align 8 dereferenceable(66)) #6 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { 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 #6 = { 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 #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, !6, i64 8}
!10 = !{!"_ZTSN4ardb15ChannelPipelineE", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24}
!11 = !{!"_ZTSN5btree9btree_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS6_ESaISt4pairIKS6_S9_EELi256EEE", !12, i64 0}
!12 = !{!"_ZTSN5btree19btree_map_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEE", !13, i64 0}
!13 = !{!"_ZTSN5btree22btree_unique_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEE", !14, i64 0}
!14 = !{!"_ZTSN5btree15btree_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEE", !15, i64 0}
!15 = !{!"_ZTSN5btree5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS7_ESaISt4pairIKS7_SA_EELi256EEEEE", !16, i64 0}
!16 = !{!"_ZTSN5btree5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS7_ESaISt4pairIKS7_SA_EELi256EEEE17empty_base_handleIS6_PNS_10btree_nodeISH_EEEE", !6, 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #0

declare void @_ZN4ardb21ChannelHandlerContextC1ERNS_15ChannelPipelineEPS0_S3_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_14ChannelHandlerE(ptr noundef nonnull align 8 dereferenceable(66), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) 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: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN5btree19btree_map_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEixERSF_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN4ardb15ChannelPipeline12PriAddBeforeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_PNS_14ChannelHandlerE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef %3) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = tail call noundef ptr @_ZN4ardb15ChannelPipeline10GetContextERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1)
  %6 = icmp eq ptr %5, null
  br i1 %6, label %33, label %7

7:                                                ; preds = %4
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = icmp eq ptr %5, %9
  br i1 %10, label %11, label %13

11:                                               ; preds = %7
  %12 = tail call noundef ptr @_ZN4ardb15ChannelPipeline11PriAddFirstERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_14ChannelHandlerE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef %3)
  br label %33

13:                                               ; preds = %7
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  %15 = tail call noundef i64 @_ZNK5btree22btree_unique_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEE5countERSF_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(32) %2)
  %16 = icmp sgt i64 %15, 0
  br i1 %16, label %33, label %17

17:                                               ; preds = %13
  %18 = invoke noalias noundef nonnull dereferenceable(72) ptr @_Znwm(i64 noundef 72) #6
          to label %19 unwind label %21

19:                                               ; preds = %17
  %20 = tail call noundef ptr @_ZN4ardb21ChannelHandlerContext7GetPrevEv(ptr noundef nonnull align 8 dereferenceable(66) %5)
  invoke void @_ZN4ardb21ChannelHandlerContextC1ERNS_15ChannelPipelineEPS0_S3_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_14ChannelHandlerE(ptr noundef nonnull align 8 dereferenceable(66) %18, ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %20, ptr noundef nonnull %5, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef %3)
          to label %29 unwind label %23

21:                                               ; preds = %17
  %22 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9bad_alloc
  br label %25

23:                                               ; preds = %19
  %24 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9bad_alloc
  tail call void @_ZdlPvm(ptr noundef nonnull %18, i64 noundef 72) #7
  br label %25

25:                                               ; preds = %23, %21
  %.pn = phi { ptr, i32 } [ %24, %23 ], [ %22, %21 ]
  %.023 = extractvalue { ptr, i32 } %.pn, 1
  %26 = tail call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9bad_alloc) #8
  %27 = icmp eq i32 %.023, %26
  br i1 %27, label %.thread, label %32

.thread:                                          ; preds = %25
  %.024 = extractvalue { ptr, i32 } %.pn, 0
  %28 = tail call ptr @__cxa_begin_catch(ptr %.024) #8
  tail call void @__cxa_end_catch()
  br label %33

29:                                               ; preds = %19
  %30 = tail call noundef ptr @_ZN4ardb21ChannelHandlerContext7GetPrevEv(ptr noundef nonnull align 8 dereferenceable(66) %5)
  tail call void @_ZN4ardb21ChannelHandlerContext7SetNextEPS0_(ptr noundef nonnull align 8 dereferenceable(66) %30, ptr noundef nonnull %18)
  tail call void @_ZN4ardb21ChannelHandlerContext7SetPrevEPS0_(ptr noundef nonnull align 8 dereferenceable(66) %5, ptr noundef nonnull %18)
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5btree19btree_map_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEixERSF_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(32) %2)
  store ptr %18, ptr %31, align 8, !tbaa !16
  br label %33

32:                                               ; preds = %25
  resume { ptr, i32 } %.pn

33:                                               ; preds = %.thread, %29, %13, %4, %11
  %.1 = phi ptr [ %12, %11 ], [ null, %4 ], [ null, %13 ], [ %18, %29 ], [ null, %.thread ]
  ret ptr %.1
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4ardb21ChannelHandlerContext7GetPrevEv(ptr noundef nonnull align 8 dereferenceable(66)) local_unnamed_addr #5 align 2

attributes #0 = { 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 #1 = { "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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = { 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, !7, i64 8}
!6 = !{!"_ZTSN4ardb15ChannelPipelineE", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN5btree9btree_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS6_ESaISt4pairIKS6_S9_EELi256EEE", !11, i64 0}
!11 = !{!"_ZTSN5btree19btree_map_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEE", !12, i64 0}
!12 = !{!"_ZTSN5btree22btree_unique_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEE", !13, i64 0}
!13 = !{!"_ZTSN5btree15btree_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEE", !14, i64 0}
!14 = !{!"_ZTSN5btree5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS7_ESaISt4pairIKS7_SA_EELi256EEEEE", !15, i64 0}
!15 = !{!"_ZTSN5btree5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS7_ESaISt4pairIKS7_SA_EELi256EEEE17empty_base_handleIS6_PNS_10btree_nodeISH_EEEE", !7, i64 0}
!16 = !{!7, !7, i64 0}


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