; LLVM IR from yinqiwen/ardb :: src/common/channel/socket (serversocket_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"

%"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] }
%"struct.ardb::InstanceOf" = type { i8 }
%"struct.ardb::InstanceOf.17" = type { i8 }
%"struct.ardb::InstanceOf.18" = type { 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.ardb::ServerSocketChannel" = type { %"class.ardb::SocketChannel.base", i32, i32, i32, %"class.std::__cxx11::basic_string" }
%"class.ardb::SocketChannel.base" = type <{ %"class.ardb::Channel", ptr, ptr, i32 }>
%"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] }
%struct.sockaddr_un = type { i16, [108 x i8] }

@.str = external hidden unnamed_addr constant [98 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@__FUNCTION__._ZN4ardb19ServerSocketChannel6DoBindEPNS_7AddressE = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [31 x i8], align 1

declare noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv() #0

declare noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv() #0

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4ardb19ServerSocketChannel6DoBindEPNS_7AddressE(ptr noundef nonnull align 8 dereferenceable(320) %0, ptr noundef %1) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.ardb::SocketInetAddress", align 8
  %8 = alloca %"struct.ardb::InstanceOf", align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"class.ardb::SocketInetAddress", align 8
  %13 = alloca [1024 x i8], align 16
  %14 = alloca %"struct.ardb::InstanceOf.17", align 1
  %15 = alloca ptr, align 8
  %16 = alloca %"struct.ardb::InstanceOf.18", align 1
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"class.ardb::SocketInetAddress", align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %29 = load ptr, ptr %4, align 8
  %30 = getelementptr inbounds %"class.ardb::Channel", ptr %29, i32 0, i32 8
  %31 = load i32, ptr %30, align 4, !tbaa !9
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %33, label %34

33:                                               ; preds = %2
  store i1 true, ptr %3, align 1
  br label %334

34:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 120, ptr %7) #7
  call void @_ZN4ardb17SocketInetAddressC2Ev(ptr noundef nonnull align 8 dereferenceable(118) %7)
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN4ardb10InstanceOfINS_17SocketHostAddressEEC2INS_7AddressEEEPKT_(ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef %35)
          to label %36 unwind label %64

36:                                               ; preds = %34
  %37 = getelementptr inbounds %"struct.ardb::InstanceOf", ptr %8, i32 0, i32 0
  %38 = load i8, ptr %37, align 1, !tbaa !25, !range !27, !noundef !28
  %39 = trunc i8 %38 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  br i1 %39, label %40, label %77

40:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %41, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 120, ptr %12) #7
  %42 = load ptr, ptr %11, align 8, !tbaa !5
  %43 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4ardb17SocketHostAddress7GetHostB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(42) %42)
          to label %44 unwind label %68

44:                                               ; preds = %40
  %45 = load ptr, ptr %11, align 8, !tbaa !5
  %46 = invoke noundef zeroext i16 @_ZNK4ardb17SocketHostAddress7GetPortEv(ptr noundef nonnull align 8 dereferenceable(42) %45)
          to label %47 unwind label %68

47:                                               ; preds = %44
  invoke void @_ZN4ardb16get_inet_addressERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEt(ptr dead_on_unwind writable sret(%"class.ardb::SocketInetAddress") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %43, i16 noundef zeroext %46)
          to label %48 unwind label %68

48:                                               ; preds = %47
  %49 = call noundef nonnull align 8 dereferenceable(118) ptr @_ZN4ardb17SocketInetAddressaSEOS0_(ptr noundef nonnull align 8 dereferenceable(118) %7, ptr noundef nonnull align 8 dereferenceable(118) %12) #7
  call void @_ZN4ardb7AddressD2Ev(ptr noundef nonnull align 8 dereferenceable(118) %12) #7
  call void @llvm.lifetime.end.p0(i64 120, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 1024, ptr %13) #7
  %50 = getelementptr inbounds [1024 x i8], ptr %13, i64 0, i64 0
  %51 = load ptr, ptr %11, align 8, !tbaa !5
  %52 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4ardb17SocketHostAddress7GetHostB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(42) %51)
          to label %53 unwind label %72

53:                                               ; preds = %48
  %54 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %52) #7
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = invoke noundef zeroext i16 @_ZNK4ardb17SocketHostAddress7GetPortEv(ptr noundef nonnull align 8 dereferenceable(42) %55)
          to label %57 unwind label %72

57:                                               ; preds = %53
  %58 = zext i16 %56 to i32
  %59 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %50, ptr noundef @.str.2, ptr noundef %54, i32 noundef %58) #7
  %60 = getelementptr inbounds [1024 x i8], ptr %13, i64 0, i64 0
  %61 = getelementptr inbounds %"class.ardb::ServerSocketChannel", ptr %29, i32 0, i32 4
  %62 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %61, ptr noundef %60)
          to label %63 unwind label %72

63:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 1024, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %157

64:                                               ; preds = %34
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %9, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  br label %333

68:                                               ; preds = %47, %44, %40
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %9, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 120, ptr %12) #7
  br label %76

72:                                               ; preds = %57, %53, %48
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %9, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %13) #7
  br label %76

76:                                               ; preds = %72, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %333

77:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #7
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN4ardb10InstanceOfINS_17SocketInetAddressEEC2INS_7AddressEEEPKT_(ptr noundef nonnull align 1 dereferenceable(1) %14, ptr noundef %78)
          to label %79 unwind label %87

79:                                               ; preds = %77
  %80 = getelementptr inbounds %"struct.ardb::InstanceOf.17", ptr %14, i32 0, i32 0
  %81 = load i8, ptr %80, align 1, !tbaa !29, !range !27, !noundef !28
  %82 = trunc i8 %81 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  br i1 %82, label %83, label %91

83:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %84, ptr %15, align 8, !tbaa !5
  %85 = load ptr, ptr %15, align 8, !tbaa !5
  %86 = call noundef nonnull align 8 dereferenceable(118) ptr @_ZN4ardb17SocketInetAddressaSERKS0_(ptr noundef nonnull align 8 dereferenceable(118) %7, ptr noundef nonnull align 8 dereferenceable(118) %85) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %156

87:                                               ; preds = %77
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %9, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  br label %333

91:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #7
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN4ardb10InstanceOfINS_17SocketUnixAddressEEC2INS_7AddressEEEPKT_(ptr noundef nonnull align 1 dereferenceable(1) %16, ptr noundef %92)
          to label %93 unwind label %124

93:                                               ; preds = %91
  %94 = getelementptr inbounds %"struct.ardb::InstanceOf.18", ptr %16, i32 0, i32 0
  %95 = load i8, ptr %94, align 1, !tbaa !31, !range !27, !noundef !28
  %96 = trunc i8 %95 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  br i1 %96, label %97, label %154

97:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %98, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %99 = load ptr, ptr %17, align 8, !tbaa !5
  %100 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4ardb17SocketUnixAddress7GetPathB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(40) %99)
          to label %101 unwind label %128

101:                                              ; preds = %97
  %102 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %100) #7
  %103 = call i32 @unlink(ptr noundef %102) #7
  store i32 %103, ptr %18, align 4, !tbaa !24
  %104 = load i32, ptr %18, align 4, !tbaa !24
  %105 = icmp eq i32 %104, -1
  br i1 %105, label %106, label %139

106:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %107 = call ptr @__errno_location() #8
  %108 = load i32, ptr %107, align 4, !tbaa !24
  store i32 %108, ptr %19, align 4, !tbaa !24
  br label %109

109:                                              ; preds = %106
  %110 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %111 unwind label %132

111:                                              ; preds = %109
  %112 = invoke noundef zeroext i1 %110(i32 noundef 2)
          to label %113 unwind label %132

113:                                              ; preds = %111
  br i1 %112, label %114, label %136

114:                                              ; preds = %113
  %115 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %116 unwind label %132

116:                                              ; preds = %114
  %117 = load ptr, ptr %17, align 8, !tbaa !5
  %118 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4ardb17SocketUnixAddress7GetPathB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(40) %117)
          to label %119 unwind label %132

119:                                              ; preds = %116
  %120 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %118) #7
  %121 = load i32, ptr %19, align 4, !tbaa !24
  %122 = call ptr @strerror(i32 noundef %121) #7
  invoke void (i32, ptr, ptr, i32, ptr, ...) %115(i32 noundef 2, ptr noundef @.str, ptr noundef @__FUNCTION__._ZN4ardb19ServerSocketChannel6DoBindEPNS_7AddressE, i32 noundef 88, ptr noundef @.str.3, ptr noundef %120, ptr noundef %122)
          to label %123 unwind label %132

123:                                              ; preds = %119
  br label %136

124:                                              ; preds = %91
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %9, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  br label %333

128:                                              ; preds = %145, %141, %97
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %9, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %10, align 4
  br label %153

132:                                              ; preds = %119, %116, %114, %111, %109
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %9, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %153

136:                                              ; preds = %123, %113
  br label %137

137:                                              ; preds = %136
  br label %138

138:                                              ; preds = %137
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %139

139:                                              ; preds = %138, %101
  call void @llvm.lifetime.start.p0(i64 120, ptr %20) #7
  %140 = load ptr, ptr %17, align 8, !tbaa !5
  invoke void @_ZN4ardb16get_inet_addressERKNS_17SocketUnixAddressE(ptr dead_on_unwind writable sret(%"class.ardb::SocketInetAddress") align 8 %20, ptr noundef nonnull align 8 dereferenceable(40) %140)
          to label %141 unwind label %149

141:                                              ; preds = %139
  %142 = call noundef nonnull align 8 dereferenceable(118) ptr @_ZN4ardb17SocketInetAddressaSEOS0_(ptr noundef nonnull align 8 dereferenceable(118) %7, ptr noundef nonnull align 8 dereferenceable(118) %20) #7
  call void @_ZN4ardb7AddressD2Ev(ptr noundef nonnull align 8 dereferenceable(118) %20) #7
  call void @llvm.lifetime.end.p0(i64 120, ptr %20) #7
  %143 = load ptr, ptr %17, align 8, !tbaa !5
  %144 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4ardb17SocketUnixAddress7GetPathB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(40) %143)
          to label %145 unwind label %128

145:                                              ; preds = %141
  %146 = getelementptr inbounds %"class.ardb::ServerSocketChannel", ptr %29, i32 0, i32 4
  %147 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %146, ptr noundef nonnull align 8 dereferenceable(32) %144)
          to label %148 unwind label %128

148:                                              ; preds = %145
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %155

149:                                              ; preds = %139
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %9, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 120, ptr %20) #7
  br label %153

153:                                              ; preds = %149, %132, %128
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %333

154:                                              ; preds = %93
  store i1 false, ptr %3, align 1
  store i32 1, ptr %21, align 4
  br label %332

155:                                              ; preds = %148
  br label %156

156:                                              ; preds = %155, %83
  br label %157

157:                                              ; preds = %156, %63
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %158 = invoke noundef nonnull align 2 dereferenceable(16) ptr @_ZNK4ardb17SocketInetAddress14GetRawSockAddrEv(ptr noundef nonnull align 8 dereferenceable(118) %7)
          to label %159 unwind label %168

159:                                              ; preds = %157
  %160 = getelementptr inbounds %struct.sockaddr, ptr %158, i32 0, i32 0
  %161 = load i16, ptr %160, align 2, !tbaa !33
  %162 = zext i16 %161 to i32
  store i32 %162, ptr %22, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %163 = load i32, ptr %22, align 4, !tbaa !24
  %164 = call i32 @socket(i32 noundef %163, i32 noundef 1, i32 noundef 0) #7
  store i32 %164, ptr %23, align 4, !tbaa !24
  %165 = load i32, ptr %23, align 4, !tbaa !24
  %166 = icmp slt i32 %165, 0
  br i1 %166, label %167, label %172

167:                                              ; preds = %159
  store i1 false, ptr %3, align 1
  store i32 1, ptr %21, align 4
  br label %329

168:                                              ; preds = %157
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %9, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %10, align 4
  br label %331

172:                                              ; preds = %159
  %173 = load i32, ptr %23, align 4, !tbaa !24
  %174 = invoke noundef i32 @_ZN4ardb19make_fd_nonblockingEi(i32 noundef %173)
          to label %175 unwind label %181

175:                                              ; preds = %172
  %176 = icmp slt i32 %174, 0
  br i1 %176, label %177, label %185

177:                                              ; preds = %175
  %178 = load i32, ptr %23, align 4, !tbaa !24
  %179 = invoke i32 @close(i32 noundef %178)
          to label %180 unwind label %181

180:                                              ; preds = %177
  store i1 false, ptr %3, align 1
  store i32 1, ptr %21, align 4
  br label %329

181:                                              ; preds = %192, %185, %177, %172
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %9, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %10, align 4
  br label %330

185:                                              ; preds = %175
  %186 = invoke noundef zeroext i1 @_ZNK4ardb17SocketInetAddress6IsUnixEv(ptr noundef nonnull align 8 dereferenceable(118) %7)
          to label %187 unwind label %181

187:                                              ; preds = %185
  br i1 %186, label %197, label %188

188:                                              ; preds = %187
  %189 = load i32, ptr %23, align 4, !tbaa !24
  %190 = call i32 @setsockopt(i32 noundef %189, i32 noundef 1, i32 noundef 2, ptr noundef %6, i32 noundef 4) #7
  %191 = icmp eq i32 %190, -1
  br i1 %191, label %192, label %196

192:                                              ; preds = %188
  %193 = load i32, ptr %23, align 4, !tbaa !24
  %194 = invoke i32 @close(i32 noundef %193)
          to label %195 unwind label %181

195:                                              ; preds = %192
  store i1 false, ptr %3, align 1
  store i32 1, ptr %21, align 4
  br label %329

196:                                              ; preds = %188
  br label %219

197:                                              ; preds = %187
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %198 = invoke noundef nonnull align 2 dereferenceable(16) ptr @_ZNK4ardb17SocketInetAddress14GetRawSockAddrEv(ptr noundef nonnull align 8 dereferenceable(118) %7)
          to label %199 unwind label %212

199:                                              ; preds = %197
  store ptr %198, ptr %24, align 8, !tbaa !5
  br label %200

200:                                              ; preds = %199
  %201 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %202 unwind label %212

202:                                              ; preds = %200
  %203 = invoke noundef zeroext i1 %201(i32 noundef 5)
          to label %204 unwind label %212

204:                                              ; preds = %202
  br i1 %203, label %205, label %216

205:                                              ; preds = %204
  %206 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %207 unwind label %212

207:                                              ; preds = %205
  %208 = load ptr, ptr %24, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.sockaddr_un, ptr %208, i32 0, i32 1
  %210 = getelementptr inbounds [108 x i8], ptr %209, i64 0, i64 0
  invoke void (i32, ptr, ptr, i32, ptr, ...) %206(i32 noundef 5, ptr noundef @.str, ptr noundef @__FUNCTION__._ZN4ardb19ServerSocketChannel6DoBindEPNS_7AddressE, i32 noundef 120, ptr noundef @.str.4, ptr noundef %210)
          to label %211 unwind label %212

211:                                              ; preds = %207
  br label %216

212:                                              ; preds = %207, %205, %202, %200, %197
  %213 = landingpad { ptr, i32 }
          cleanup
  %214 = extractvalue { ptr, i32 } %213, 0
  store ptr %214, ptr %9, align 8
  %215 = extractvalue { ptr, i32 } %213, 1
  store i32 %215, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %330

216:                                              ; preds = %211, %204
  br label %217

217:                                              ; preds = %216
  br label %218

218:                                              ; preds = %217
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %219

219:                                              ; preds = %218, %196
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  store i32 1, ptr %25, align 4, !tbaa !24
  %220 = getelementptr inbounds %"class.ardb::Channel", ptr %29, i32 0, i32 1
  %221 = getelementptr inbounds %"struct.ardb::ChannelOptions", ptr %220, i32 0, i32 5
  %222 = load i8, ptr %221, align 8, !tbaa !36, !range !27, !noundef !28
  %223 = trunc i8 %222 to i1
  br i1 %223, label %224, label %247

224:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %225 = load i32, ptr %23, align 4, !tbaa !24
  %226 = call i32 @setsockopt(i32 noundef %225, i32 noundef 1, i32 noundef 2, ptr noundef %25, i32 noundef 4) #7
  store i32 %226, ptr %26, align 4, !tbaa !24
  %227 = load i32, ptr %26, align 4, !tbaa !24
  %228 = icmp ne i32 %227, 0
  br i1 %228, label %229, label %246

229:                                              ; preds = %224
  br label %230

230:                                              ; preds = %229
  %231 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %232 unwind label %239

232:                                              ; preds = %230
  %233 = invoke noundef zeroext i1 %231(i32 noundef 3)
          to label %234 unwind label %239

234:                                              ; preds = %232
  br i1 %233, label %235, label %243

235:                                              ; preds = %234
  %236 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %237 unwind label %239

237:                                              ; preds = %235
  invoke void (i32, ptr, ptr, i32, ptr, ...) %236(i32 noundef 3, ptr noundef @.str, ptr noundef @__FUNCTION__._ZN4ardb19ServerSocketChannel6DoBindEPNS_7AddressE, i32 noundef 129, ptr noundef @.str.5)
          to label %238 unwind label %239

238:                                              ; preds = %237
  br label %243

239:                                              ; preds = %237, %235, %232, %230
  %240 = landingpad { ptr, i32 }
          cleanup
  %241 = extractvalue { ptr, i32 } %240, 0
  store ptr %241, ptr %9, align 8
  %242 = extractvalue { ptr, i32 } %240, 1
  store i32 %242, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %328

243:                                              ; preds = %238, %234
  br label %244

244:                                              ; preds = %243
  br label %245

245:                                              ; preds = %244
  br label %246

246:                                              ; preds = %245, %224
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %247

247:                                              ; preds = %246, %219
  %248 = load i32, ptr %23, align 4, !tbaa !24
  %249 = invoke noundef nonnull align 2 dereferenceable(16) ptr @_ZNK4ardb17SocketInetAddress14GetRawSockAddrEv(ptr noundef nonnull align 8 dereferenceable(118) %7)
          to label %250 unwind label %269

250:                                              ; preds = %247
  %251 = invoke noundef i32 @_ZNK4ardb17SocketInetAddress18GetRawSockAddrSizeEv(ptr noundef nonnull align 8 dereferenceable(118) %7)
          to label %252 unwind label %269

252:                                              ; preds = %250
  %253 = call i32 @bind(i32 noundef %248, ptr noundef %249, i32 noundef %251) #7
  %254 = icmp eq i32 %253, -1
  br i1 %254, label %255, label %283

255:                                              ; preds = %252
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %256 = call ptr @__errno_location() #8
  %257 = load i32, ptr %256, align 4, !tbaa !24
  store i32 %257, ptr %27, align 4, !tbaa !24
  br label %258

258:                                              ; preds = %255
  %259 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %260 unwind label %273

260:                                              ; preds = %258
  %261 = invoke noundef zeroext i1 %259(i32 noundef 2)
          to label %262 unwind label %273

262:                                              ; preds = %260
  br i1 %261, label %263, label %277

263:                                              ; preds = %262
  %264 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %265 unwind label %273

265:                                              ; preds = %263
  %266 = load i32, ptr %27, align 4, !tbaa !24
  %267 = call ptr @strerror(i32 noundef %266) #7
  invoke void (i32, ptr, ptr, i32, ptr, ...) %264(i32 noundef 2, ptr noundef @.str, ptr noundef @__FUNCTION__._ZN4ardb19ServerSocketChannel6DoBindEPNS_7AddressE, i32 noundef 136, ptr noundef @.str.6, ptr noundef %267)
          to label %268 unwind label %273

268:                                              ; preds = %265
  br label %277

269:                                              ; preds = %320, %315, %313, %311, %250, %247
  %270 = landingpad { ptr, i32 }
          cleanup
  %271 = extractvalue { ptr, i32 } %270, 0
  store ptr %271, ptr %9, align 8
  %272 = extractvalue { ptr, i32 } %270, 1
  store i32 %272, ptr %10, align 4
  br label %328

273:                                              ; preds = %279, %265, %263, %260, %258
  %274 = landingpad { ptr, i32 }
          cleanup
  %275 = extractvalue { ptr, i32 } %274, 0
  store ptr %275, ptr %9, align 8
  %276 = extractvalue { ptr, i32 } %274, 1
  store i32 %276, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %328

277:                                              ; preds = %268, %262
  br label %278

278:                                              ; preds = %277
  br label %279

279:                                              ; preds = %278
  %280 = load i32, ptr %23, align 4, !tbaa !24
  %281 = invoke i32 @close(i32 noundef %280)
          to label %282 unwind label %273

282:                                              ; preds = %279
  store i1 false, ptr %3, align 1
  store i32 1, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %327

283:                                              ; preds = %252
  %284 = load i32, ptr %23, align 4, !tbaa !24
  %285 = call i32 @listen(i32 noundef %284, i32 noundef 511) #7
  %286 = icmp eq i32 %285, -1
  br i1 %286, label %287, label %311

287:                                              ; preds = %283
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  %288 = call ptr @__errno_location() #8
  %289 = load i32, ptr %288, align 4, !tbaa !24
  store i32 %289, ptr %28, align 4, !tbaa !24
  br label %290

290:                                              ; preds = %287
  %291 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %292 unwind label %301

292:                                              ; preds = %290
  %293 = invoke noundef zeroext i1 %291(i32 noundef 2)
          to label %294 unwind label %301

294:                                              ; preds = %292
  br i1 %293, label %295, label %305

295:                                              ; preds = %294
  %296 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %297 unwind label %301

297:                                              ; preds = %295
  %298 = load i32, ptr %28, align 4, !tbaa !24
  %299 = call ptr @strerror(i32 noundef %298) #7
  invoke void (i32, ptr, ptr, i32, ptr, ...) %296(i32 noundef 2, ptr noundef @.str, ptr noundef @__FUNCTION__._ZN4ardb19ServerSocketChannel6DoBindEPNS_7AddressE, i32 noundef 143, ptr noundef @.str.7, ptr noundef %299)
          to label %300 unwind label %301

300:                                              ; preds = %297
  br label %305

301:                                              ; preds = %307, %297, %295, %292, %290
  %302 = landingpad { ptr, i32 }
          cleanup
  %303 = extractvalue { ptr, i32 } %302, 0
  store ptr %303, ptr %9, align 8
  %304 = extractvalue { ptr, i32 } %302, 1
  store i32 %304, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %328

305:                                              ; preds = %300, %294
  br label %306

306:                                              ; preds = %305
  br label %307

307:                                              ; preds = %306
  %308 = load i32, ptr %23, align 4, !tbaa !24
  %309 = invoke i32 @close(i32 noundef %308)
          to label %310 unwind label %301

310:                                              ; preds = %307
  store i1 false, ptr %3, align 1
  store i32 1, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %327

311:                                              ; preds = %283
  %312 = invoke noundef nonnull align 8 dereferenceable(288) ptr @_ZN4ardb7Channel10GetServiceEv(ptr noundef nonnull align 8 dereferenceable(256) %29)
          to label %313 unwind label %269

313:                                              ; preds = %311
  %314 = invoke noundef ptr @_ZN4ardb14ChannelService15GetRawEventLoopEv(ptr noundef nonnull align 8 dereferenceable(288) %312)
          to label %315 unwind label %269

315:                                              ; preds = %313
  %316 = load i32, ptr %23, align 4, !tbaa !24
  %317 = invoke i32 @aeCreateFileEvent(ptr noundef %314, i32 noundef %316, i32 noundef 1, ptr noundef @_ZN4ardb7Channel15IOEventCallbackEP11aeEventLoopiPvi, ptr noundef %29)
          to label %318 unwind label %269

318:                                              ; preds = %315
  %319 = icmp eq i32 %317, -1
  br i1 %319, label %320, label %324

320:                                              ; preds = %318
  %321 = load i32, ptr %23, align 4, !tbaa !24
  %322 = invoke i32 @close(i32 noundef %321)
          to label %323 unwind label %269

323:                                              ; preds = %320
  store i1 false, ptr %3, align 1
  store i32 1, ptr %21, align 4
  br label %327

324:                                              ; preds = %318
  %325 = load i32, ptr %23, align 4, !tbaa !24
  %326 = getelementptr inbounds %"class.ardb::Channel", ptr %29, i32 0, i32 8
  store i32 %325, ptr %326, align 4, !tbaa !9
  store i1 true, ptr %3, align 1
  store i32 1, ptr %21, align 4
  br label %327

327:                                              ; preds = %324, %323, %310, %282
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %329

328:                                              ; preds = %301, %273, %269, %239
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %330

329:                                              ; preds = %327, %195, %180, %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %332

330:                                              ; preds = %328, %212, %181
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %331

331:                                              ; preds = %330, %168
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %333

332:                                              ; preds = %329, %154
  call void @_ZN4ardb7AddressD2Ev(ptr noundef nonnull align 8 dereferenceable(118) %7) #7
  call void @llvm.lifetime.end.p0(i64 120, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %334

333:                                              ; preds = %331, %153, %124, %87, %76, %64
  call void @_ZN4ardb7AddressD2Ev(ptr noundef nonnull align 8 dereferenceable(118) %7) #7
  call void @llvm.lifetime.end.p0(i64 120, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %336

334:                                              ; preds = %332, %33
  %335 = load i1, ptr %3, align 1
  ret i1 %335

336:                                              ; preds = %333
  %337 = load ptr, ptr %9, align 8
  %338 = load i32, ptr %10, align 4
  %339 = insertvalue { ptr, i32 } poison, ptr %337, 0
  %340 = insertvalue { ptr, i32 } %339, i32 %338, 1
  resume { ptr, i32 } %340
}

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

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

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

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) #2

declare void @_ZN4ardb16get_inet_addressERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEt(ptr dead_on_unwind writable sret(%"class.ardb::SocketInetAddress") align 8, ptr noundef nonnull align 8 dereferenceable(32), i16 noundef zeroext) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4ardb17SocketHostAddress7GetHostB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(42)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZNK4ardb17SocketHostAddress7GetPortEv(ptr noundef nonnull align 8 dereferenceable(42)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(118) ptr @_ZN4ardb17SocketInetAddressaSEOS0_(ptr noundef nonnull align 8 dereferenceable(118), ptr noundef nonnull align 8 dereferenceable(118)) #4 align 2

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

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #5

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(118) ptr @_ZN4ardb17SocketInetAddressaSERKS0_(ptr noundef nonnull align 8 dereferenceable(118), ptr noundef nonnull align 8 dereferenceable(118)) #4 align 2

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

; Function Attrs: nounwind
declare i32 @unlink(ptr noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4ardb17SocketUnixAddress7GetPathB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(40)) #3 align 2

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #6

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) #5

declare void @_ZN4ardb16get_inet_addressERKNS_17SocketUnixAddressE(ptr dead_on_unwind writable sret(%"class.ardb::SocketInetAddress") align 8, ptr noundef nonnull align 8 dereferenceable(40)) #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 2 dereferenceable(16) ptr @_ZNK4ardb17SocketInetAddress14GetRawSockAddrEv(ptr noundef nonnull align 8 dereferenceable(118)) #3 align 2

; Function Attrs: nounwind
declare i32 @socket(i32 noundef, i32 noundef, i32 noundef) #5

declare noundef i32 @_ZN4ardb19make_fd_nonblockingEi(i32 noundef) #0

declare i32 @close(i32 noundef) #0

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

; Function Attrs: nounwind
declare i32 @setsockopt(i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) #5

; Function Attrs: nounwind
declare i32 @bind(i32 noundef, ptr noundef, i32 noundef) #5

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

; Function Attrs: nounwind
declare i32 @listen(i32 noundef, i32 noundef) #5

declare i32 @aeCreateFileEvent(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #0

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4ardb14ChannelService15GetRawEventLoopEv(ptr noundef nonnull align 8 dereferenceable(288)) #4 align 2

declare void @_ZN4ardb7Channel15IOEventCallbackEP11aeEventLoopiPvi(ptr noundef, i32 noundef, ptr noundef, i32 noundef) #0

attributes #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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 willreturn memory(none) "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 = { nounwind willreturn memory(none) }

!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, !13, i64 100}
!10 = !{!"_ZTSN4ardb7ChannelE", !11, i64 0, !12, i64 8, !14, i64 44, !14, i64 45, !13, i64 48, !15, i64 56, !6, i64 88, !13, i64 96, !13, i64 100, !22, i64 104, !22, i64 144, !13, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !14, i64 224, !14, i64 225, !14, i64 226, !6, i64 232, !6, i64 240, !6, i64 248}
!11 = !{!"_ZTSN4ardb8RunnableE"}
!12 = !{!"_ZTSN4ardb14ChannelOptionsE", !13, i64 0, !13, i64 4, !14, i64 8, !13, i64 12, !14, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !14, i64 32, !14, i64 33}
!13 = !{!"int", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSN4ardb15ChannelPipelineE", !6, i64 0, !6, i64 8, !6, i64 16, !16, i64 24}
!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", !6, i64 0}
!22 = !{!"_ZTSN4ardb6BufferE", !6, i64 0, !23, i64 8, !23, i64 16, !23, i64 24, !14, i64 32}
!23 = !{!"long", !7, i64 0}
!24 = !{!13, !13, i64 0}
!25 = !{!26, !14, i64 0}
!26 = !{!"_ZTSN4ardb10InstanceOfINS_17SocketHostAddressEEE", !14, i64 0}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = !{!30, !14, i64 0}
!30 = !{!"_ZTSN4ardb10InstanceOfINS_17SocketInetAddressEEE", !14, i64 0}
!31 = !{!32, !14, i64 0}
!32 = !{!"_ZTSN4ardb10InstanceOfINS_17SocketUnixAddressEEE", !14, i64 0}
!33 = !{!34, !35, i64 0}
!34 = !{!"_ZTS8sockaddr", !35, i64 0, !7, i64 2}
!35 = !{!"short", !7, i64 0}
!36 = !{!10, !14, i64 24}


; 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] }
%"struct.ardb::InstanceOf" = type { i8 }
%"struct.ardb::InstanceOf.17" = type { i8 }
%"struct.ardb::InstanceOf.18" = type { i8 }

@.str = external hidden unnamed_addr constant [98 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@__FUNCTION__._ZN4ardb19ServerSocketChannel6DoBindEPNS_7AddressE = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [31 x i8], align 1

declare noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv() local_unnamed_addr #0

declare noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv() local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4ardb19ServerSocketChannel6DoBindEPNS_7AddressE(ptr noundef nonnull align 8 dereferenceable(320) %0, ptr noundef %1) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %"class.ardb::SocketInetAddress", align 8
  %5 = alloca %"struct.ardb::InstanceOf", align 1
  %6 = alloca %"class.ardb::SocketInetAddress", align 8
  %7 = alloca [1024 x i8], align 16
  %8 = alloca %"struct.ardb::InstanceOf.17", align 1
  %9 = alloca %"struct.ardb::InstanceOf.18", align 1
  %10 = alloca %"class.ardb::SocketInetAddress", align 8
  %11 = alloca i32, align 4
  %12 = getelementptr inbounds i8, ptr %0, i64 100
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %173, label %15

15:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 1, ptr %3, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %4) #8
  call void @_ZN4ardb17SocketInetAddressC2Ev(ptr noundef nonnull align 8 dereferenceable(118) %4)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #8
  call void @_ZN4ardb10InstanceOfINS_17SocketHostAddressEEC2INS_7AddressEEEPKT_(ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef %1)
  %16 = load i8, ptr %5, align 1, !tbaa !24, !range !26, !noundef !27
  %17 = trunc nuw i8 %16 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #8
  br i1 %17, label %18, label %35

18:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %6) #8
  %19 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4ardb17SocketHostAddress7GetHostB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(42) %1)
  %20 = call noundef zeroext i16 @_ZNK4ardb17SocketHostAddress7GetPortEv(ptr noundef nonnull align 8 dereferenceable(42) %1)
  invoke void @_ZN4ardb16get_inet_addressERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEt(ptr dead_on_unwind nonnull writable sret(%"class.ardb::SocketInetAddress") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %19, i16 noundef zeroext %20)
          to label %21 unwind label %31

21:                                               ; preds = %18
  %22 = call noundef nonnull align 8 dereferenceable(118) ptr @_ZN4ardb17SocketInetAddressaSEOS0_(ptr noundef nonnull align 8 dereferenceable(118) %4, ptr noundef nonnull align 8 dereferenceable(118) %6) #8
  call void @_ZN4ardb7AddressD2Ev(ptr noundef nonnull align 8 dereferenceable(118) %6) #8
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %7) #8
  %23 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4ardb17SocketHostAddress7GetHostB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(42) %1)
  %24 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %23) #8
  %25 = call noundef zeroext i16 @_ZNK4ardb17SocketHostAddress7GetPortEv(ptr noundef nonnull align 8 dereferenceable(42) %1)
  %26 = zext i16 %25 to i32
  %27 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef %24, i32 noundef %26) #8
  %28 = getelementptr inbounds i8, ptr %0, i64 288
  %29 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef nonnull %7)
          to label %30 unwind label %33

30:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %7) #8
  br label %73

31:                                               ; preds = %18
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %6) #8
  br label %172

33:                                               ; preds = %21
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %7) #8
  br label %172

35:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #8
  call void @_ZN4ardb10InstanceOfINS_17SocketInetAddressEEC2INS_7AddressEEEPKT_(ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef %1)
  %36 = load i8, ptr %8, align 1, !tbaa !28, !range !26, !noundef !27
  %37 = trunc nuw i8 %36 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  br i1 %37, label %38, label %40

38:                                               ; preds = %35
  %39 = call noundef nonnull align 8 dereferenceable(118) ptr @_ZN4ardb17SocketInetAddressaSERKS0_(ptr noundef nonnull align 8 dereferenceable(118) %4, ptr noundef nonnull align 8 dereferenceable(118) %1) #8
  br label %73

40:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #8
  call void @_ZN4ardb10InstanceOfINS_17SocketUnixAddressEEC2INS_7AddressEEEPKT_(ptr noundef nonnull align 1 dereferenceable(1) %9, ptr noundef %1)
  %41 = load i8, ptr %9, align 1, !tbaa !30, !range !26, !noundef !27
  %42 = trunc nuw i8 %41 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #8
  br i1 %42, label %43, label %171

43:                                               ; preds = %40
  %44 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4ardb17SocketUnixAddress7GetPathB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(40) %1)
  %45 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %44) #8
  %46 = call i32 @unlink(ptr noundef %45) #8
  %47 = icmp eq i32 %46, -1
  br i1 %47, label %48, label %65

48:                                               ; preds = %43
  %49 = tail call ptr @__errno_location() #9
  %50 = load i32, ptr %49, align 4, !tbaa !23
  %51 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %52 unwind label %63

52:                                               ; preds = %48
  %53 = invoke noundef zeroext i1 %51(i32 noundef 2)
          to label %54 unwind label %63

54:                                               ; preds = %52
  br i1 %53, label %55, label %65

55:                                               ; preds = %54
  %56 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %57 unwind label %63

57:                                               ; preds = %55
  %58 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4ardb17SocketUnixAddress7GetPathB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(40) %1)
  %59 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %58) #8
  %60 = call ptr @strerror(i32 noundef %50) #8
  invoke void (i32, ptr, ptr, i32, ptr, ...) %56(i32 noundef 2, ptr noundef nonnull @.str, ptr noundef nonnull @__FUNCTION__._ZN4ardb19ServerSocketChannel6DoBindEPNS_7AddressE, i32 noundef 88, ptr noundef nonnull @.str.3, ptr noundef %59, ptr noundef %60)
          to label %65 unwind label %63

61:                                               ; preds = %66
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %172

63:                                               ; preds = %57, %55, %52, %48
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %172

65:                                               ; preds = %54, %57, %43
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %10) #8
  invoke void @_ZN4ardb16get_inet_addressERKNS_17SocketUnixAddressE(ptr dead_on_unwind nonnull writable sret(%"class.ardb::SocketInetAddress") align 8 %10, ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %66 unwind label %71

66:                                               ; preds = %65
  %67 = call noundef nonnull align 8 dereferenceable(118) ptr @_ZN4ardb17SocketInetAddressaSEOS0_(ptr noundef nonnull align 8 dereferenceable(118) %4, ptr noundef nonnull align 8 dereferenceable(118) %10) #8
  call void @_ZN4ardb7AddressD2Ev(ptr noundef nonnull align 8 dereferenceable(118) %10) #8
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %10) #8
  %68 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4ardb17SocketUnixAddress7GetPathB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(40) %1)
  %69 = getelementptr inbounds i8, ptr %0, i64 288
  %70 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %69, ptr noundef nonnull align 8 dereferenceable(32) %68)
          to label %73 unwind label %61

71:                                               ; preds = %65
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %10) #8
  br label %172

73:                                               ; preds = %66, %38, %30
  %74 = call noundef nonnull align 2 dereferenceable(16) ptr @_ZNK4ardb17SocketInetAddress14GetRawSockAddrEv(ptr noundef nonnull align 8 dereferenceable(118) %4)
  %75 = load i16, ptr %74, align 2, !tbaa !32
  %76 = zext i16 %75 to i32
  %77 = call i32 @socket(i32 noundef %76, i32 noundef 1, i32 noundef 0) #8
  %78 = icmp slt i32 %77, 0
  br i1 %78, label %171, label %79

79:                                               ; preds = %73
  %80 = invoke noundef i32 @_ZN4ardb19make_fd_nonblockingEi(i32 noundef %77)
          to label %81 unwind label %83

81:                                               ; preds = %79
  %82 = icmp slt i32 %80, 0
  br i1 %82, label %.invoke, label %85

83:                                               ; preds = %.invoke, %79
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %172

85:                                               ; preds = %81
  %86 = call noundef zeroext i1 @_ZNK4ardb17SocketInetAddress6IsUnixEv(ptr noundef nonnull align 8 dereferenceable(118) %4)
  br i1 %86, label %91, label %87

87:                                               ; preds = %85
  %88 = call i32 @setsockopt(i32 noundef %77, i32 noundef 1, i32 noundef 2, ptr noundef nonnull %3, i32 noundef 4) #8
  %89 = icmp eq i32 %88, -1
  br i1 %89, label %.invoke, label %103

.invoke:                                          ; preds = %81, %87
  %90 = invoke i32 @close(i32 noundef %77)
          to label %171 unwind label %83

91:                                               ; preds = %85
  %92 = call noundef nonnull align 2 dereferenceable(16) ptr @_ZNK4ardb17SocketInetAddress14GetRawSockAddrEv(ptr noundef nonnull align 8 dereferenceable(118) %4)
  %93 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %94 unwind label %101

94:                                               ; preds = %91
  %95 = invoke noundef zeroext i1 %93(i32 noundef 5)
          to label %96 unwind label %101

96:                                               ; preds = %94
  br i1 %95, label %97, label %103

97:                                               ; preds = %96
  %98 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %99 unwind label %101

99:                                               ; preds = %97
  %100 = getelementptr inbounds i8, ptr %92, i64 2
  invoke void (i32, ptr, ptr, i32, ptr, ...) %98(i32 noundef 5, ptr noundef nonnull @.str, ptr noundef nonnull @__FUNCTION__._ZN4ardb19ServerSocketChannel6DoBindEPNS_7AddressE, i32 noundef 120, ptr noundef nonnull @.str.4, ptr noundef nonnull %100)
          to label %103 unwind label %101

101:                                              ; preds = %99, %97, %94, %91
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %172

103:                                              ; preds = %96, %99, %87
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  store i32 1, ptr %11, align 4, !tbaa !23
  %104 = getelementptr inbounds i8, ptr %0, i64 24
  %105 = load i8, ptr %104, align 8, !tbaa !35, !range !26, !noundef !27
  %106 = trunc nuw i8 %105 to i1
  br i1 %106, label %107, label %119

107:                                              ; preds = %103
  %108 = call i32 @setsockopt(i32 noundef %77, i32 noundef 1, i32 noundef 2, ptr noundef nonnull %11, i32 noundef 4) #8
  %.not = icmp eq i32 %108, 0
  br i1 %.not, label %119, label %109

109:                                              ; preds = %107
  %110 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %111 unwind label %117

111:                                              ; preds = %109
  %112 = invoke noundef zeroext i1 %110(i32 noundef 3)
          to label %113 unwind label %117

113:                                              ; preds = %111
  br i1 %112, label %114, label %119

114:                                              ; preds = %113
  %115 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %116 unwind label %117

116:                                              ; preds = %114
  invoke void (i32, ptr, ptr, i32, ptr, ...) %115(i32 noundef 3, ptr noundef nonnull @.str, ptr noundef nonnull @__FUNCTION__._ZN4ardb19ServerSocketChannel6DoBindEPNS_7AddressE, i32 noundef 129, ptr noundef nonnull @.str.5)
          to label %119 unwind label %117

117:                                              ; preds = %116, %114, %111, %109
  %118 = landingpad { ptr, i32 }
          cleanup
  br label %170

119:                                              ; preds = %107, %116, %113, %103
  %120 = call noundef nonnull align 2 dereferenceable(16) ptr @_ZNK4ardb17SocketInetAddress14GetRawSockAddrEv(ptr noundef nonnull align 8 dereferenceable(118) %4)
  %121 = invoke noundef i32 @_ZNK4ardb17SocketInetAddress18GetRawSockAddrSizeEv(ptr noundef nonnull align 8 dereferenceable(118) %4)
          to label %122 unwind label %136

122:                                              ; preds = %119
  %123 = call i32 @bind(i32 noundef %77, ptr noundef nonnull %120, i32 noundef %121) #8
  %124 = icmp eq i32 %123, -1
  br i1 %124, label %125, label %142

125:                                              ; preds = %122
  %126 = tail call ptr @__errno_location() #9
  %127 = load i32, ptr %126, align 4, !tbaa !23
  %128 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %129 unwind label %138

129:                                              ; preds = %125
  %130 = invoke noundef zeroext i1 %128(i32 noundef 2)
          to label %131 unwind label %138

131:                                              ; preds = %129
  br i1 %130, label %132, label %140

132:                                              ; preds = %131
  %133 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %134 unwind label %138

134:                                              ; preds = %132
  %135 = call ptr @strerror(i32 noundef %127) #8
  invoke void (i32, ptr, ptr, i32, ptr, ...) %133(i32 noundef 2, ptr noundef nonnull @.str, ptr noundef nonnull @__FUNCTION__._ZN4ardb19ServerSocketChannel6DoBindEPNS_7AddressE, i32 noundef 136, ptr noundef nonnull @.str.6, ptr noundef %135)
          to label %140 unwind label %138

136:                                              ; preds = %166, %160, %119
  %137 = landingpad { ptr, i32 }
          cleanup
  br label %170

138:                                              ; preds = %140, %134, %132, %129, %125
  %139 = landingpad { ptr, i32 }
          cleanup
  br label %170

140:                                              ; preds = %134, %131
  %141 = invoke i32 @close(i32 noundef %77)
          to label %169 unwind label %138

142:                                              ; preds = %122
  %143 = call i32 @listen(i32 noundef %77, i32 noundef 511) #8
  %144 = icmp eq i32 %143, -1
  br i1 %144, label %145, label %160

145:                                              ; preds = %142
  %146 = tail call ptr @__errno_location() #9
  %147 = load i32, ptr %146, align 4, !tbaa !23
  %148 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogCheckerEv()
          to label %149 unwind label %156

149:                                              ; preds = %145
  %150 = invoke noundef zeroext i1 %148(i32 noundef 2)
          to label %151 unwind label %156

151:                                              ; preds = %149
  br i1 %150, label %152, label %158

152:                                              ; preds = %151
  %153 = invoke noundef ptr @_ZN4ardb10ArdbLogger13GetLogHandlerEv()
          to label %154 unwind label %156

154:                                              ; preds = %152
  %155 = call ptr @strerror(i32 noundef %147) #8
  invoke void (i32, ptr, ptr, i32, ptr, ...) %153(i32 noundef 2, ptr noundef nonnull @.str, ptr noundef nonnull @__FUNCTION__._ZN4ardb19ServerSocketChannel6DoBindEPNS_7AddressE, i32 noundef 143, ptr noundef nonnull @.str.7, ptr noundef %155)
          to label %158 unwind label %156

156:                                              ; preds = %158, %154, %152, %149, %145
  %157 = landingpad { ptr, i32 }
          cleanup
  br label %170

158:                                              ; preds = %154, %151
  %159 = invoke i32 @close(i32 noundef %77)
          to label %169 unwind label %156

160:                                              ; preds = %142
  %161 = call noundef nonnull align 8 dereferenceable(288) ptr @_ZN4ardb7Channel10GetServiceEv(ptr noundef nonnull align 8 dereferenceable(256) %0)
  %162 = call noundef ptr @_ZN4ardb14ChannelService15GetRawEventLoopEv(ptr noundef nonnull align 8 dereferenceable(288) %161)
  %163 = invoke i32 @aeCreateFileEvent(ptr noundef %162, i32 noundef %77, i32 noundef 1, ptr noundef nonnull @_ZN4ardb7Channel15IOEventCallbackEP11aeEventLoopiPvi, ptr noundef nonnull %0)
          to label %164 unwind label %136

164:                                              ; preds = %160
  %165 = icmp eq i32 %163, -1
  br i1 %165, label %166, label %168

166:                                              ; preds = %164
  %167 = invoke i32 @close(i32 noundef %77)
          to label %169 unwind label %136

168:                                              ; preds = %164
  store i32 %77, ptr %12, align 4, !tbaa !5
  br label %169

169:                                              ; preds = %166, %158, %140, %168
  %.0 = phi i1 [ true, %168 ], [ false, %140 ], [ false, %158 ], [ false, %166 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  br label %171

170:                                              ; preds = %156, %138, %136, %117
  %.pn51 = phi { ptr, i32 } [ %139, %138 ], [ %157, %156 ], [ %137, %136 ], [ %118, %117 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  br label %172

171:                                              ; preds = %.invoke, %169, %73, %40
  %.2 = phi i1 [ false, %40 ], [ %.0, %169 ], [ false, %73 ], [ false, %.invoke ]
  call void @_ZN4ardb7AddressD2Ev(ptr noundef nonnull align 8 dereferenceable(118) %4) #8
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  br label %173

172:                                              ; preds = %83, %101, %170, %61, %63, %71, %31, %33
  %.pn53.pn = phi { ptr, i32 } [ %34, %33 ], [ %32, %31 ], [ %62, %61 ], [ %72, %71 ], [ %64, %63 ], [ %84, %83 ], [ %.pn51, %170 ], [ %102, %101 ]
  call void @_ZN4ardb7AddressD2Ev(ptr noundef nonnull align 8 dereferenceable(118) %4) #8
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  resume { ptr, i32 } %.pn53.pn

173:                                              ; preds = %2, %171
  %.3 = phi i1 [ %.2, %171 ], [ true, %2 ]
  ret i1 %.3
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN4ardb16get_inet_addressERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEt(ptr dead_on_unwind writable sret(%"class.ardb::SocketInetAddress") align 8, ptr noundef nonnull align 8 dereferenceable(32), i16 noundef zeroext) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4ardb17SocketHostAddress7GetHostB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(42)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZNK4ardb17SocketHostAddress7GetPortEv(ptr noundef nonnull align 8 dereferenceable(42)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @unlink(ptr nocapture noundef readonly) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4ardb17SocketUnixAddress7GetPathB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #6

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) local_unnamed_addr #7

declare void @_ZN4ardb16get_inet_addressERKNS_17SocketUnixAddressE(ptr dead_on_unwind writable sret(%"class.ardb::SocketInetAddress") align 8, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 2 dereferenceable(16) ptr @_ZNK4ardb17SocketInetAddress14GetRawSockAddrEv(ptr noundef nonnull align 8 dereferenceable(118)) local_unnamed_addr #3 align 2

; Function Attrs: nounwind
declare i32 @socket(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #7

declare noundef i32 @_ZN4ardb19make_fd_nonblockingEi(i32 noundef) local_unnamed_addr #0

declare i32 @close(i32 noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind
declare i32 @setsockopt(i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #7

; Function Attrs: nounwind
declare i32 @bind(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #7

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

; Function Attrs: nounwind
declare i32 @listen(i32 noundef, i32 noundef) local_unnamed_addr #7

declare i32 @aeCreateFileEvent(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

declare void @_ZN4ardb7Channel15IOEventCallbackEP11aeEventLoopiPvi(ptr noundef, i32 noundef, ptr noundef, i32 noundef) #0

attributes #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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nofree 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 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 "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 = { nounwind willreturn memory(none) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !9, i64 100}
!6 = !{!"_ZTSN4ardb7ChannelE", !7, i64 0, !8, i64 8, !12, i64 44, !12, i64 45, !9, i64 48, !13, i64 56, !14, i64 88, !9, i64 96, !9, i64 100, !21, i64 104, !21, i64 144, !9, i64 184, !14, i64 192, !14, i64 200, !14, i64 208, !14, i64 216, !12, i64 224, !12, i64 225, !12, i64 226, !14, i64 232, !14, i64 240, !14, i64 248}
!7 = !{!"_ZTSN4ardb8RunnableE"}
!8 = !{!"_ZTSN4ardb14ChannelOptionsE", !9, i64 0, !9, i64 4, !12, i64 8, !9, i64 12, !12, i64 16, !9, i64 20, !9, i64 24, !9, i64 28, !12, i64 32, !12, i64 33}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"bool", !10, i64 0}
!13 = !{!"_ZTSN4ardb15ChannelPipelineE", !14, i64 0, !14, i64 8, !14, i64 16, !15, i64 24}
!14 = !{!"any pointer", !10, i64 0}
!15 = !{!"_ZTSN5btree9btree_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS6_ESaISt4pairIKS6_S9_EELi256EEE", !16, i64 0}
!16 = !{!"_ZTSN5btree19btree_map_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEE", !17, i64 0}
!17 = !{!"_ZTSN5btree22btree_unique_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEE", !18, i64 0}
!18 = !{!"_ZTSN5btree15btree_containerINS_5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS8_ESaISt4pairIKS8_SB_EELi256EEEEEEE", !19, i64 0}
!19 = !{!"_ZTSN5btree5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS7_ESaISt4pairIKS7_SA_EELi256EEEEE", !20, i64 0}
!20 = !{!"_ZTSN5btree5btreeINS_16btree_map_paramsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN4ardb21ChannelHandlerContextESt4lessIS7_ESaISt4pairIKS7_SA_EELi256EEEE17empty_base_handleIS6_PNS_10btree_nodeISH_EEEE", !14, i64 0}
!21 = !{!"_ZTSN4ardb6BufferE", !14, i64 0, !22, i64 8, !22, i64 16, !22, i64 24, !12, i64 32}
!22 = !{!"long", !10, i64 0}
!23 = !{!9, !9, i64 0}
!24 = !{!25, !12, i64 0}
!25 = !{!"_ZTSN4ardb10InstanceOfINS_17SocketHostAddressEEE", !12, i64 0}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!29, !12, i64 0}
!29 = !{!"_ZTSN4ardb10InstanceOfINS_17SocketInetAddressEEE", !12, i64 0}
!30 = !{!31, !12, i64 0}
!31 = !{!"_ZTSN4ardb10InstanceOfINS_17SocketUnixAddressEEE", !12, i64 0}
!32 = !{!33, !34, i64 0}
!33 = !{!"_ZTS8sockaddr", !34, i64 0, !10, i64 2}
!34 = !{!"short", !10, i64 0}
!35 = !{!6, !12, i64 24}


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