; LLVM IR from yinqiwen/ardb :: src/common/channel/socket/socket_channel.ll (ZN4ardb13SocketChannel15GetLocalAddressEv)

; 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::SocketInetAddress" = type <{ %"class.ardb::Address", %"union.ardb::SocketInetAddress::MyAddrUnion", [2 x i8] }>
%"class.ardb::Address" = type { ptr }
%"union.ardb::SocketInetAddress::MyAddrUnion" = type { %struct.sockaddr, [94 x i8] }
%struct.sockaddr = type { i16, [14 x i8] }
%"class.ardb::SocketUnixAddress" = type { %"class.ardb::Address", %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.ardb::SocketHostAddress" = type <{ %"class.ardb::Address", %"class.std::__cxx11::basic_string", i16, [6 x i8] }>
%"class.ardb::SocketChannel" = type <{ %"class.ardb::Channel", ptr, ptr, 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] }>

@_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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4ardb17SocketInetAddress6IsUnixEv(ptr noundef nonnull align 8 dereferenceable(118)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN4ardb13SocketChannel15GetLocalAddressEv(ptr noundef nonnull align 8 dereferenceable(276) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.ardb::SocketInetAddress", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.ardb::SocketUnixAddress", align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.ardb::SocketHostAddress", 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::SocketChannel", ptr %10, i32 0, i32 1
  %12 = load ptr, ptr %11, align 8, !tbaa !9
  %13 = icmp eq ptr null, %12
  br i1 %13, label %14, label %109

14:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 120, ptr %3) #8
  %15 = getelementptr inbounds %"class.ardb::Channel", ptr %10, i32 0, i32 8
  %16 = load i32, ptr %15, align 4, !tbaa !26
  invoke void @_ZN4ardb23get_socket_inet_addressEi(ptr dead_on_unwind writable sret(%"class.ardb::SocketInetAddress") align 8 %3, i32 noundef %16)
          to label %17 unwind label %27

17:                                               ; preds = %14
  %18 = invoke noundef zeroext i1 @_ZNK4ardb17SocketInetAddress6IsUnixEv(ptr noundef nonnull align 8 dereferenceable(118) %3)
          to label %19 unwind label %31

19:                                               ; preds = %17
  br i1 %18, label %20, label %65

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 40, ptr %6) #8
  invoke void @_ZN4ardb16get_unix_addressERKNS_17SocketInetAddressE(ptr dead_on_unwind writable sret(%"class.ardb::SocketUnixAddress") align 8 %6, ptr noundef nonnull align 8 dereferenceable(118) %3)
          to label %21 unwind label %35

21:                                               ; preds = %20
  br label %22

22:                                               ; preds = %21
  %23 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #9
          to label %24 unwind label %39

24:                                               ; preds = %22
  invoke void @_ZN4ardb17SocketUnixAddressC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %23, ptr noundef nonnull align 8 dereferenceable(40) %6)
          to label %25 unwind label %43

25:                                               ; preds = %24
  %26 = getelementptr inbounds %"class.ardb::SocketChannel", ptr %10, i32 0, i32 1
  store ptr %23, ptr %26, align 8, !tbaa !9
  br label %56

27:                                               ; preds = %14
  %28 = landingpad { ptr, i32 }
          catch ptr null
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %4, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %5, align 4
  br label %104

31:                                               ; preds = %17
  %32 = landingpad { ptr, i32 }
          catch ptr null
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %4, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %5, align 4
  br label %103

35:                                               ; preds = %20
  %36 = landingpad { ptr, i32 }
          catch ptr null
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %4, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %5, align 4
  br label %64

39:                                               ; preds = %22
  %40 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9bad_alloc
          catch ptr null
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %4, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %5, align 4
  br label %47

43:                                               ; preds = %24
  %44 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9bad_alloc
          catch ptr null
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %4, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %5, align 4
  call void @_ZdlPvm(ptr noundef %23, i64 noundef 40) #10
  br label %47

47:                                               ; preds = %43, %39
  %48 = load i32, ptr %5, align 4
  %49 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9bad_alloc) #8
  %50 = icmp eq i32 %48, %49
  br i1 %50, label %51, label %63

51:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %52 = load ptr, ptr %4, align 8
  %53 = call ptr @__cxa_begin_catch(ptr %52) #8
  store ptr %53, ptr %7, align 8
  %54 = getelementptr inbounds %"class.ardb::SocketChannel", ptr %10, i32 0, i32 1
  store ptr null, ptr %54, align 8, !tbaa !9
  invoke void @__cxa_end_catch()
          to label %55 unwind label %59

55:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %56

56:                                               ; preds = %55, %25
  br label %57

57:                                               ; preds = %56
  br label %58

58:                                               ; preds = %57
  call void @_ZN4ardb17SocketUnixAddressD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #8
  br label %102

59:                                               ; preds = %51
  %60 = landingpad { ptr, i32 }
          catch ptr null
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %4, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %63

63:                                               ; preds = %59, %47
  call void @_ZN4ardb17SocketUnixAddressD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #8
  br label %64

64:                                               ; preds = %63, %35
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #8
  br label %103

65:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 48, ptr %8) #8
  invoke void @_ZN4ardb16get_host_addressERKNS_17SocketInetAddressE(ptr dead_on_unwind writable sret(%"class.ardb::SocketHostAddress") align 8 %8, ptr noundef nonnull align 8 dereferenceable(118) %3)
          to label %66 unwind label %72

66:                                               ; preds = %65
  br label %67

67:                                               ; preds = %66
  %68 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 48) #9
          to label %69 unwind label %76

69:                                               ; preds = %67
  invoke void @_ZN4ardb17SocketHostAddressC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(42) %68, ptr noundef nonnull align 8 dereferenceable(42) %8)
          to label %70 unwind label %80

70:                                               ; preds = %69
  %71 = getelementptr inbounds %"class.ardb::SocketChannel", ptr %10, i32 0, i32 1
  store ptr %68, ptr %71, align 8, !tbaa !9
  br label %93

72:                                               ; preds = %65
  %73 = landingpad { ptr, i32 }
          catch ptr null
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %4, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %5, align 4
  br label %101

76:                                               ; preds = %67
  %77 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9bad_alloc
          catch ptr null
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %4, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %5, align 4
  br label %84

80:                                               ; preds = %69
  %81 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9bad_alloc
          catch ptr null
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %4, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %5, align 4
  call void @_ZdlPvm(ptr noundef %68, i64 noundef 48) #10
  br label %84

84:                                               ; preds = %80, %76
  %85 = load i32, ptr %5, align 4
  %86 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9bad_alloc) #8
  %87 = icmp eq i32 %85, %86
  br i1 %87, label %88, label %100

88:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %89 = load ptr, ptr %4, align 8
  %90 = call ptr @__cxa_begin_catch(ptr %89) #8
  store ptr %90, ptr %9, align 8
  %91 = getelementptr inbounds %"class.ardb::SocketChannel", ptr %10, i32 0, i32 1
  store ptr null, ptr %91, align 8, !tbaa !9
  invoke void @__cxa_end_catch()
          to label %92 unwind label %96

92:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %93

93:                                               ; preds = %92, %70
  br label %94

94:                                               ; preds = %93
  br label %95

95:                                               ; preds = %94
  call void @_ZN4ardb17SocketHostAddressD2Ev(ptr noundef nonnull align 8 dereferenceable(42) %8) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #8
  br label %102

96:                                               ; preds = %88
  %97 = landingpad { ptr, i32 }
          catch ptr null
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %4, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %100

100:                                              ; preds = %96, %84
  call void @_ZN4ardb17SocketHostAddressD2Ev(ptr noundef nonnull align 8 dereferenceable(42) %8) #8
  br label %101

101:                                              ; preds = %100, %72
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #8
  br label %103

102:                                              ; preds = %95, %58
  call void @_ZN4ardb7AddressD2Ev(ptr noundef nonnull align 8 dereferenceable(118) %3) #8
  call void @llvm.lifetime.end.p0(i64 120, ptr %3) #8
  br label %108

103:                                              ; preds = %101, %64, %31
  call void @_ZN4ardb7AddressD2Ev(ptr noundef nonnull align 8 dereferenceable(118) %3) #8
  br label %104

104:                                              ; preds = %103, %27
  call void @llvm.lifetime.end.p0(i64 120, ptr %3) #8
  br label %105

105:                                              ; preds = %104
  %106 = load ptr, ptr %4, align 8
  %107 = call ptr @__cxa_begin_catch(ptr %106) #8
  call void @__cxa_end_catch()
  br label %108

108:                                              ; preds = %105, %102
  br label %109

109:                                              ; preds = %108, %1
  %110 = getelementptr inbounds %"class.ardb::SocketChannel", ptr %10, i32 0, i32 1
  %111 = load ptr, ptr %110, align 8, !tbaa !9
  ret ptr %111
}

declare void @_ZN4ardb23get_socket_inet_addressEi(ptr dead_on_unwind writable sret(%"class.ardb::SocketInetAddress") align 8, i32 noundef) #3

declare void @_ZN4ardb16get_unix_addressERKNS_17SocketInetAddressE(ptr dead_on_unwind writable sret(%"class.ardb::SocketUnixAddress") align 8, ptr noundef nonnull align 8 dereferenceable(118)) #3

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

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

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

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

declare ptr @__cxa_begin_catch(ptr)

declare void @__cxa_end_catch()

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

declare void @_ZN4ardb16get_host_addressERKNS_17SocketInetAddressE(ptr dead_on_unwind writable sret(%"class.ardb::SocketHostAddress") align 8, ptr noundef nonnull align 8 dereferenceable(118)) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4ardb17SocketHostAddressD2Ev(ptr noundef nonnull align 8 dereferenceable(42)) unnamed_addr #1 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 = { "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 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 #5 = { 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 #6 = { nounwind memory(none) }
attributes #7 = { 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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { 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 256}
!10 = !{!"_ZTSN4ardb13SocketChannelE", !11, i64 0, !6, i64 256, !6, i64 264, !25, i64 272}
!11 = !{!"_ZTSN4ardb7ChannelE", !12, i64 0, !13, i64 8, !15, i64 44, !15, i64 45, !14, i64 48, !16, i64 56, !6, i64 88, !14, i64 96, !14, i64 100, !23, i64 104, !23, i64 144, !14, 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}
!12 = !{!"_ZTSN4ardb8RunnableE"}
!13 = !{!"_ZTSN4ardb14ChannelOptionsE", !14, i64 0, !14, i64 4, !15, i64 8, !14, i64 12, !15, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !15, i64 32, !15, i64 33}
!14 = !{!"int", !7, i64 0}
!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}
!25 = !{!"_ZTSN4ardb18SocketChannelStateE", !7, i64 0}
!26 = !{!11, !14, i64 100}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.ardb::SocketInetAddress" = type <{ %"class.ardb::Address", %"union.ardb::SocketInetAddress::MyAddrUnion", [2 x i8] }>
%"class.ardb::Address" = type { ptr }
%"union.ardb::SocketInetAddress::MyAddrUnion" = type { %struct.sockaddr, [94 x i8] }
%struct.sockaddr = type { i16, [14 x i8] }
%"class.ardb::SocketUnixAddress" = type { %"class.ardb::Address", %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.ardb::SocketHostAddress" = type <{ %"class.ardb::Address", %"class.std::__cxx11::basic_string", i16, [6 x i8] }>

@_ZTISt9bad_alloc = external constant 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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4ardb17SocketInetAddress6IsUnixEv(ptr noundef nonnull align 8 dereferenceable(118)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN4ardb13SocketChannel15GetLocalAddressEv(ptr nocapture noundef nonnull align 8 dereferenceable(276) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.ardb::SocketInetAddress", align 8
  %3 = alloca %"class.ardb::SocketUnixAddress", align 8
  %4 = alloca %"class.ardb::SocketHostAddress", align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 256
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = icmp eq ptr %6, null
  br i1 %7, label %8, label %70

8:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %2) #8
  %9 = getelementptr inbounds i8, ptr %0, i64 100
  %10 = load i32, ptr %9, align 4, !tbaa !25
  invoke void @_ZN4ardb23get_socket_inet_addressEi(ptr dead_on_unwind nonnull writable sret(%"class.ardb::SocketInetAddress") align 8 %2, i32 noundef %10)
          to label %11 unwind label %19

11:                                               ; preds = %8
  %12 = invoke noundef zeroext i1 @_ZNK4ardb17SocketInetAddress6IsUnixEv(ptr noundef nonnull align 8 dereferenceable(118) %2)
          to label %13 unwind label %22

13:                                               ; preds = %11
  br i1 %12, label %14, label %43

14:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #8
  invoke void @_ZN4ardb16get_unix_addressERKNS_17SocketInetAddressE(ptr dead_on_unwind nonnull writable sret(%"class.ardb::SocketUnixAddress") align 8 %3, ptr noundef nonnull align 8 dereferenceable(118) %2)
          to label %15 unwind label %25

15:                                               ; preds = %14
  %16 = invoke noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #9
          to label %17 unwind label %28

17:                                               ; preds = %15
  invoke void @_ZN4ardb17SocketUnixAddressC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %16, ptr noundef nonnull align 8 dereferenceable(40) %3)
          to label %18 unwind label %30

18:                                               ; preds = %17
  store ptr %16, ptr %5, align 8, !tbaa !5
  br label %37

19:                                               ; preds = %8
  %20 = landingpad { ptr, i32 }
          catch ptr null
  %21 = extractvalue { ptr, i32 } %20, 0
  br label %68

22:                                               ; preds = %11
  %23 = landingpad { ptr, i32 }
          catch ptr null
  %24 = extractvalue { ptr, i32 } %23, 0
  br label %67

25:                                               ; preds = %14
  %26 = landingpad { ptr, i32 }
          catch ptr null
  %27 = extractvalue { ptr, i32 } %26, 0
  br label %42

28:                                               ; preds = %15
  %29 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9bad_alloc
          catch ptr null
  br label %32

30:                                               ; preds = %17
  %31 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9bad_alloc
          catch ptr null
  call void @_ZdlPvm(ptr noundef nonnull %16, i64 noundef 40) #10
  br label %32

32:                                               ; preds = %30, %28
  %.pn8 = phi { ptr, i32 } [ %31, %30 ], [ %29, %28 ]
  %.0 = extractvalue { ptr, i32 } %.pn8, 0
  %.05 = extractvalue { ptr, i32 } %.pn8, 1
  %33 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9bad_alloc) #8
  %34 = icmp eq i32 %.05, %33
  br i1 %34, label %35, label %41

35:                                               ; preds = %32
  %36 = call ptr @__cxa_begin_catch(ptr %.0) #8
  store ptr null, ptr %5, align 8, !tbaa !5
  invoke void @__cxa_end_catch()
          to label %37 unwind label %38

37:                                               ; preds = %35, %18
  call void @_ZN4ardb17SocketUnixAddressD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #8
  br label %66

38:                                               ; preds = %35
  %39 = landingpad { ptr, i32 }
          catch ptr null
  %40 = extractvalue { ptr, i32 } %39, 0
  br label %41

41:                                               ; preds = %38, %32
  %.1 = phi ptr [ %40, %38 ], [ %.0, %32 ]
  call void @_ZN4ardb17SocketUnixAddressD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #8
  br label %42

42:                                               ; preds = %41, %25
  %.2 = phi ptr [ %.1, %41 ], [ %27, %25 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #8
  br label %67

43:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #8
  invoke void @_ZN4ardb16get_host_addressERKNS_17SocketInetAddressE(ptr dead_on_unwind nonnull writable sret(%"class.ardb::SocketHostAddress") align 8 %4, ptr noundef nonnull align 8 dereferenceable(118) %2)
          to label %44 unwind label %48

44:                                               ; preds = %43
  %45 = invoke noalias noundef nonnull dereferenceable(48) ptr @_Znwm(i64 noundef 48) #9
          to label %46 unwind label %51

46:                                               ; preds = %44
  invoke void @_ZN4ardb17SocketHostAddressC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(42) %45, ptr noundef nonnull align 8 dereferenceable(42) %4)
          to label %47 unwind label %53

47:                                               ; preds = %46
  store ptr %45, ptr %5, align 8, !tbaa !5
  br label %60

48:                                               ; preds = %43
  %49 = landingpad { ptr, i32 }
          catch ptr null
  %50 = extractvalue { ptr, i32 } %49, 0
  br label %65

51:                                               ; preds = %44
  %52 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9bad_alloc
          catch ptr null
  br label %55

53:                                               ; preds = %46
  %54 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9bad_alloc
          catch ptr null
  call void @_ZdlPvm(ptr noundef nonnull %45, i64 noundef 48) #10
  br label %55

55:                                               ; preds = %53, %51
  %.pn = phi { ptr, i32 } [ %54, %53 ], [ %52, %51 ]
  %.3 = extractvalue { ptr, i32 } %.pn, 0
  %.16 = extractvalue { ptr, i32 } %.pn, 1
  %56 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9bad_alloc) #8
  %57 = icmp eq i32 %.16, %56
  br i1 %57, label %58, label %64

58:                                               ; preds = %55
  %59 = call ptr @__cxa_begin_catch(ptr %.3) #8
  store ptr null, ptr %5, align 8, !tbaa !5
  invoke void @__cxa_end_catch()
          to label %60 unwind label %61

60:                                               ; preds = %58, %47
  call void @_ZN4ardb17SocketHostAddressD2Ev(ptr noundef nonnull align 8 dereferenceable(42) %4) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #8
  br label %66

61:                                               ; preds = %58
  %62 = landingpad { ptr, i32 }
          catch ptr null
  %63 = extractvalue { ptr, i32 } %62, 0
  br label %64

64:                                               ; preds = %61, %55
  %.4 = phi ptr [ %63, %61 ], [ %.3, %55 ]
  call void @_ZN4ardb17SocketHostAddressD2Ev(ptr noundef nonnull align 8 dereferenceable(42) %4) #8
  br label %65

65:                                               ; preds = %64, %48
  %.5 = phi ptr [ %.4, %64 ], [ %50, %48 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #8
  br label %67

66:                                               ; preds = %60, %37
  call void @_ZN4ardb7AddressD2Ev(ptr noundef nonnull align 8 dereferenceable(118) %2) #8
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %2) #8
  br label %70

67:                                               ; preds = %65, %42, %22
  %.6 = phi ptr [ %.2, %42 ], [ %.5, %65 ], [ %24, %22 ]
  call void @_ZN4ardb7AddressD2Ev(ptr noundef nonnull align 8 dereferenceable(118) %2) #8
  br label %68

68:                                               ; preds = %67, %19
  %.7 = phi ptr [ %.6, %67 ], [ %21, %19 ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %2) #8
  %69 = call ptr @__cxa_begin_catch(ptr %.7) #8
  call void @__cxa_end_catch()
  br label %70

70:                                               ; preds = %66, %68, %1
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  ret ptr %71
}

declare void @_ZN4ardb23get_socket_inet_addressEi(ptr dead_on_unwind writable sret(%"class.ardb::SocketInetAddress") align 8, i32 noundef) local_unnamed_addr #3

declare void @_ZN4ardb16get_unix_addressERKNS_17SocketInetAddressE(ptr dead_on_unwind writable sret(%"class.ardb::SocketUnixAddress") align 8, ptr noundef nonnull align 8 dereferenceable(118)) local_unnamed_addr #3

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

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

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

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

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 void @_ZN4ardb17SocketUnixAddressD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #7 align 2

declare void @_ZN4ardb16get_host_addressERKNS_17SocketInetAddressE(ptr dead_on_unwind writable sret(%"class.ardb::SocketHostAddress") align 8, ptr noundef nonnull align 8 dereferenceable(118)) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4ardb17SocketHostAddressD2Ev(ptr noundef nonnull align 8 dereferenceable(42)) unnamed_addr #1 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 = { "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 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 #5 = { 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 #6 = { nofree nosync nounwind memory(none) }
attributes #7 = { 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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { 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, !15, i64 256}
!6 = !{!"_ZTSN4ardb13SocketChannelE", !7, i64 0, !15, i64 256, !15, i64 264, !24, i64 272}
!7 = !{!"_ZTSN4ardb7ChannelE", !8, i64 0, !9, i64 8, !13, i64 44, !13, i64 45, !10, i64 48, !14, i64 56, !15, i64 88, !10, i64 96, !10, i64 100, !22, i64 104, !22, i64 144, !10, i64 184, !15, i64 192, !15, i64 200, !15, i64 208, !15, i64 216, !13, i64 224, !13, i64 225, !13, i64 226, !15, i64 232, !15, i64 240, !15, i64 248}
!8 = !{!"_ZTSN4ardb8RunnableE"}
!9 = !{!"_ZTSN4ardb14ChannelOptionsE", !10, i64 0, !10, i64 4, !13, i64 8, !10, i64 12, !13, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !13, i64 32, !13, i64 33}
!10 = !{!"int", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"bool", !11, i64 0}
!14 = !{!"_ZTSN4ardb15ChannelPipelineE", !15, i64 0, !15, i64 8, !15, i64 16, !16, i64 24}
!15 = !{!"any pointer", !11, i64 0}
!16 = !{!"_ZTSN5btree9btree_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS6_ESaISt4pairIKS6_S9_EELi256EEE", !17, i64 0}
!17 = !{!"_ZTSN5btree19btree_map_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEE", !18, i64 0}
!18 = !{!"_ZTSN5btree22btree_unique_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEE", !19, i64 0}
!19 = !{!"_ZTSN5btree15btree_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEE", !20, i64 0}
!20 = !{!"_ZTSN5btree5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS7_ESaISt4pairIKS7_SA_EELi256EEEEE", !21, i64 0}
!21 = !{!"_ZTSN5btree5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS7_ESaISt4pairIKS7_SA_EELi256EEEE17empty_base_handleIS6_PNS_10btree_nodeISH_EEEE", !15, i64 0}
!22 = !{!"_ZTSN4ardb6BufferE", !15, i64 0, !23, i64 8, !23, i64 16, !23, i64 24, !13, i64 32}
!23 = !{!"long", !11, i64 0}
!24 = !{!"_ZTSN4ardb18SocketChannelStateE", !11, i64 0}
!25 = !{!7, !10, i64 100}


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