; LLVM IR from turi-code/SFrame :: oss_src/rpc/dc_tcp_comm.ll (ZN8graphlab7dc_impl11dc_tcp_comm5closeEv)

; 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.graphlab::dc_impl::dc_tcp_comm" = type <{ %"class.graphlab::dc_impl::dc_comm_base", i16, i16, i8, [3 x i8], %"class.std::__cxx11::basic_string", %"class.std::vector.8", %"class.std::map", %"class.std::vector.16", %"class.std::vector", %"class.std::vector.0", %"class.graphlab::atomic", %"class.graphlab::mutex", %"class.graphlab::conditional", %"class.std::vector.21", %"class.graphlab::atomic", %"class.graphlab::atomic", %"class.graphlab::thread_group", ptr, %"class.graphlab::thread_group", ptr, ptr, ptr, %"struct.graphlab::dc_impl::dc_tcp_comm::timeout_event", %"struct.graphlab::dc_impl::dc_tcp_comm::timeout_event", %"class.graphlab::fixed_dense_bitset", i32, [4 x i8], %"class.graphlab::thread", i8, [7 x i8] }>
%"class.graphlab::dc_impl::dc_comm_base" = type { ptr }
%"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.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, unsigned short>, std::_Select1st<std::pair<const unsigned int, unsigned short>>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, unsigned short>, std::_Select1st<std::pair<const unsigned int, unsigned short>>, std::less<unsigned int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.16" = type { %"struct.std::_Vector_base.17" }
%"struct.std::_Vector_base.17" = type { %"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned short, std::allocator<unsigned short>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<graphlab::dc_impl::dc_receive *, std::allocator<graphlab::dc_impl::dc_receive *>>::_Vector_impl" }
%"struct.std::_Vector_base<graphlab::dc_impl::dc_receive *, std::allocator<graphlab::dc_impl::dc_receive *>>::_Vector_impl" = type { %"struct.std::_Vector_base<graphlab::dc_impl::dc_receive *, std::allocator<graphlab::dc_impl::dc_receive *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<graphlab::dc_impl::dc_receive *, std::allocator<graphlab::dc_impl::dc_receive *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<graphlab::dc_impl::dc_send *, std::allocator<graphlab::dc_impl::dc_send *>>::_Vector_impl" }
%"struct.std::_Vector_base<graphlab::dc_impl::dc_send *, std::allocator<graphlab::dc_impl::dc_send *>>::_Vector_impl" = type { %"struct.std::_Vector_base<graphlab::dc_impl::dc_send *, std::allocator<graphlab::dc_impl::dc_send *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<graphlab::dc_impl::dc_send *, std::allocator<graphlab::dc_impl::dc_send *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.graphlab::mutex" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.graphlab::conditional" = type { %union.pthread_cond_t }
%union.pthread_cond_t = type { %struct.__pthread_cond_s }
%struct.__pthread_cond_s = type { %union.__atomic_wide_counter, %union.__atomic_wide_counter, [2 x i32], [2 x i32], i32, i32, [2 x i32] }
%union.__atomic_wide_counter = type { i64 }
%"class.std::vector.21" = type { %"struct.std::_Vector_base.22" }
%"struct.std::_Vector_base.22" = type { %"struct.std::_Vector_base<graphlab::dc_impl::dc_tcp_comm::socket_info, std::allocator<graphlab::dc_impl::dc_tcp_comm::socket_info>>::_Vector_impl" }
%"struct.std::_Vector_base<graphlab::dc_impl::dc_tcp_comm::socket_info, std::allocator<graphlab::dc_impl::dc_tcp_comm::socket_info>>::_Vector_impl" = type { %"struct.std::_Vector_base<graphlab::dc_impl::dc_tcp_comm::socket_info, std::allocator<graphlab::dc_impl::dc_tcp_comm::socket_info>>::_Vector_impl_data" }
%"struct.std::_Vector_base<graphlab::dc_impl::dc_tcp_comm::socket_info, std::allocator<graphlab::dc_impl::dc_tcp_comm::socket_info>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.graphlab::atomic" = type { %"class.graphlab::graphlab_impl::atomic_impl" }
%"class.graphlab::graphlab_impl::atomic_impl" = type { i64 }
%"class.graphlab::thread_group" = type { i64, i64, %"class.graphlab::mutex", %"class.graphlab::conditional", %"class.std::queue" }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<unsigned long, const char *>, std::allocator<std::pair<unsigned long, const char *>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<unsigned long, const char *>, std::allocator<std::pair<unsigned long, const char *>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<unsigned long, const char *>, std::allocator<std::pair<unsigned long, const char *>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<unsigned long, const char *>, std::allocator<std::pair<unsigned long, const char *>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.graphlab::dc_impl::dc_tcp_comm::timeout_event" = type { i8, ptr }
%"class.graphlab::fixed_dense_bitset" = type { [4 x i64] }
%"class.graphlab::thread" = type <{ i64, i64, i64, i8, [7 x i8] }>
%"struct.graphlab::dc_impl::dc_tcp_comm::socket_info" = type { i64, ptr, i32, i32, ptr, ptr, i8, %"class.graphlab::mutex", %"struct.graphlab::dc_impl::circular_iovec_buffer", %struct.msghdr }
%"struct.graphlab::dc_impl::circular_iovec_buffer" = type { %"class.std::vector.34", %"class.std::vector.34", i64, i64, i64 }
%"class.std::vector.34" = type { %"struct.std::_Vector_base.35" }
%"struct.std::_Vector_base.35" = type { %"struct.std::_Vector_base<iovec, std::allocator<iovec>>::_Vector_impl" }
%"struct.std::_Vector_base<iovec, std::allocator<iovec>>::_Vector_impl" = type { %"struct.std::_Vector_base<iovec, std::allocator<iovec>>::_Vector_impl_data" }
%"struct.std::_Vector_base<iovec, std::allocator<iovec>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.msghdr = type { ptr, i32, ptr, i64, ptr, i64, i32 }

@.str.6 = external hidden unnamed_addr constant [78 x i8], align 1
@__func__._ZN8graphlab7dc_impl11dc_tcp_comm5closeEv = external hidden unnamed_addr constant [6 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [25 x i8], align 1

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

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

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

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

declare noundef nonnull align 8 dereferenceable(896) ptr @_Z13global_loggerv() #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(896) ptr @_ZN19log_stream_dispatchILb1EE4execEiPKcS2_ib(i32 noundef, ptr noundef, ptr noundef, i32 noundef, i1 noundef zeroext) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(896) ptr @_ZN11file_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(896), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(896) ptr @_ZN11file_loggerlsEPFRSoS0_E(ptr noundef nonnull align 8 dereferenceable(896), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8graphlab7dc_impl11dc_tcp_comm5closeEv(ptr noundef nonnull align 8 dereferenceable(833) %0) unnamed_addr #4 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %7 = load ptr, ptr %2, align 8
  %8 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 3
  %9 = load i8, ptr %8, align 4, !tbaa !9, !range !60, !noundef !61
  %10 = trunc i8 %9 to i1
  br i1 %10, label %11, label %12

11:                                               ; preds = %1
  br label %154

12:                                               ; preds = %1
  %13 = call noundef nonnull align 8 dereferenceable(896) ptr @_Z13global_loggerv()
  %14 = call noundef i32 @_ZN11file_logger13get_log_levelEv(ptr noundef nonnull align 8 dereferenceable(896) %13)
  %15 = icmp sge i32 2, %14
  br i1 %15, label %16, label %20

16:                                               ; preds = %12
  %17 = call noundef nonnull align 8 dereferenceable(896) ptr @_ZN19log_stream_dispatchILb1EE4execEiPKcS2_ib(i32 noundef 2, ptr noundef @.str.6, ptr noundef @__func__._ZN8graphlab7dc_impl11dc_tcp_comm5closeEv, i32 noundef 274, i1 noundef zeroext true)
  %18 = call noundef nonnull align 8 dereferenceable(896) ptr @_ZN11file_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(896) %17, ptr noundef @.str.15)
  %19 = call noundef nonnull align 8 dereferenceable(896) ptr @_ZN11file_loggerlsEPFRSoS0_E(ptr noundef nonnull align 8 dereferenceable(896) %18, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %20

20:                                               ; preds = %16, %12
  %21 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 26
  %22 = load i32, ptr %21, align 8, !tbaa !62
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %24, label %29

24:                                               ; preds = %20
  %25 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 26
  %26 = load i32, ptr %25, align 8, !tbaa !62
  %27 = call i32 @close(i32 noundef %26)
  %28 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 26
  store i32 -1, ptr %28, align 8, !tbaa !62
  br label %29

29:                                               ; preds = %24, %20
  %30 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 28
  call void @_ZN8graphlab6thread4joinEv(ptr noundef nonnull align 8 dereferenceable(25) %30)
  %31 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 20
  %32 = load ptr, ptr %31, align 8, !tbaa !63
  %33 = call i32 @gl_event_base_loopbreak(ptr noundef %32)
  %34 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 19
  call void @_ZN8graphlab12thread_group4joinEv(ptr noundef nonnull align 8 dereferenceable(184) %34)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store i64 0, ptr %3, align 8, !tbaa !64
  br label %35

35:                                               ; preds = %47, %29
  %36 = load i64, ptr %3, align 8, !tbaa !64
  %37 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 14
  %38 = call noundef i64 @_ZNKSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #5
  %39 = icmp ult i64 %36, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %50

41:                                               ; preds = %35
  %42 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 14
  %43 = load i64, ptr %3, align 8, !tbaa !64
  %44 = call noundef nonnull align 8 dereferenceable(216) ptr @_ZNSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %43) #5
  %45 = getelementptr inbounds %"struct.graphlab::dc_impl::dc_tcp_comm::socket_info", ptr %44, i32 0, i32 5
  %46 = load ptr, ptr %45, align 8, !tbaa !65
  call void @gl_event_free(ptr noundef %46)
  br label %47

47:                                               ; preds = %41
  %48 = load i64, ptr %3, align 8, !tbaa !64
  %49 = add i64 %48, 1
  store i64 %49, ptr %3, align 8, !tbaa !64
  br label %35, !llvm.loop !73

50:                                               ; preds = %40
  %51 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 21
  %52 = load ptr, ptr %51, align 8, !tbaa !75
  call void @gl_event_free(ptr noundef %52)
  %53 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 22
  %54 = load ptr, ptr %53, align 8, !tbaa !76
  call void @gl_event_free(ptr noundef %54)
  %55 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 20
  %56 = load ptr, ptr %55, align 8, !tbaa !63
  call void @gl_event_base_free(ptr noundef %56)
  %57 = call noundef nonnull align 8 dereferenceable(896) ptr @_Z13global_loggerv()
  %58 = call noundef i32 @_ZN11file_logger13get_log_levelEv(ptr noundef nonnull align 8 dereferenceable(896) %57)
  %59 = icmp sge i32 2, %58
  br i1 %59, label %60, label %64

60:                                               ; preds = %50
  %61 = call noundef nonnull align 8 dereferenceable(896) ptr @_ZN19log_stream_dispatchILb1EE4execEiPKcS2_ib(i32 noundef 2, ptr noundef @.str.6, ptr noundef @__func__._ZN8graphlab7dc_impl11dc_tcp_comm5closeEv, i32 noundef 294, i1 noundef zeroext true)
  %62 = call noundef nonnull align 8 dereferenceable(896) ptr @_ZN11file_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(896) %61, ptr noundef @.str.16)
  %63 = call noundef nonnull align 8 dereferenceable(896) ptr @_ZN11file_loggerlsEPFRSoS0_E(ptr noundef nonnull align 8 dereferenceable(896) %62, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %64

64:                                               ; preds = %60, %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store i64 0, ptr %4, align 8, !tbaa !64
  br label %65

65:                                               ; preds = %90, %64
  %66 = load i64, ptr %4, align 8, !tbaa !64
  %67 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 14
  %68 = call noundef i64 @_ZNKSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %67) #5
  %69 = icmp ult i64 %66, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %93

71:                                               ; preds = %65
  %72 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 14
  %73 = load i64, ptr %4, align 8, !tbaa !64
  %74 = call noundef nonnull align 8 dereferenceable(216) ptr @_ZNSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %72, i64 noundef %73) #5
  %75 = getelementptr inbounds %"struct.graphlab::dc_impl::dc_tcp_comm::socket_info", ptr %74, i32 0, i32 2
  %76 = load i32, ptr %75, align 8, !tbaa !77
  %77 = icmp sgt i32 %76, 0
  br i1 %77, label %78, label %89

78:                                               ; preds = %71
  %79 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 14
  %80 = load i64, ptr %4, align 8, !tbaa !64
  %81 = call noundef nonnull align 8 dereferenceable(216) ptr @_ZNSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %79, i64 noundef %80) #5
  %82 = getelementptr inbounds %"struct.graphlab::dc_impl::dc_tcp_comm::socket_info", ptr %81, i32 0, i32 2
  %83 = load i32, ptr %82, align 8, !tbaa !77
  %84 = call i32 @close(i32 noundef %83)
  %85 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 14
  %86 = load i64, ptr %4, align 8, !tbaa !64
  %87 = call noundef nonnull align 8 dereferenceable(216) ptr @_ZNSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %85, i64 noundef %86) #5
  %88 = getelementptr inbounds %"struct.graphlab::dc_impl::dc_tcp_comm::socket_info", ptr %87, i32 0, i32 2
  store i32 -1, ptr %88, align 8, !tbaa !77
  br label %89

89:                                               ; preds = %78, %71
  br label %90

90:                                               ; preds = %89
  %91 = load i64, ptr %4, align 8, !tbaa !64
  %92 = add i64 %91, 1
  store i64 %92, ptr %4, align 8, !tbaa !64
  br label %65, !llvm.loop !78

93:                                               ; preds = %70
  %94 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 18
  %95 = load ptr, ptr %94, align 8, !tbaa !79
  %96 = call i32 @gl_event_base_loopbreak(ptr noundef %95)
  %97 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 17
  call void @_ZN8graphlab12thread_group4joinEv(ptr noundef nonnull align 8 dereferenceable(184) %97)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store i64 0, ptr %5, align 8, !tbaa !64
  br label %98

98:                                               ; preds = %110, %93
  %99 = load i64, ptr %5, align 8, !tbaa !64
  %100 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 14
  %101 = call noundef i64 @_ZNKSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %100) #5
  %102 = icmp ult i64 %99, %101
  br i1 %102, label %104, label %103

103:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %113

104:                                              ; preds = %98
  %105 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 14
  %106 = load i64, ptr %5, align 8, !tbaa !64
  %107 = call noundef nonnull align 8 dereferenceable(216) ptr @_ZNSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %105, i64 noundef %106) #5
  %108 = getelementptr inbounds %"struct.graphlab::dc_impl::dc_tcp_comm::socket_info", ptr %107, i32 0, i32 4
  %109 = load ptr, ptr %108, align 8, !tbaa !80
  call void @gl_event_free(ptr noundef %109)
  br label %110

110:                                              ; preds = %104
  %111 = load i64, ptr %5, align 8, !tbaa !64
  %112 = add i64 %111, 1
  store i64 %112, ptr %5, align 8, !tbaa !64
  br label %98, !llvm.loop !81

113:                                              ; preds = %103
  %114 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 18
  %115 = load ptr, ptr %114, align 8, !tbaa !79
  call void @gl_event_base_free(ptr noundef %115)
  %116 = call noundef nonnull align 8 dereferenceable(896) ptr @_Z13global_loggerv()
  %117 = call noundef i32 @_ZN11file_logger13get_log_levelEv(ptr noundef nonnull align 8 dereferenceable(896) %116)
  %118 = icmp sge i32 2, %117
  br i1 %118, label %119, label %123

119:                                              ; preds = %113
  %120 = call noundef nonnull align 8 dereferenceable(896) ptr @_ZN19log_stream_dispatchILb1EE4execEiPKcS2_ib(i32 noundef 2, ptr noundef @.str.6, ptr noundef @__func__._ZN8graphlab7dc_impl11dc_tcp_comm5closeEv, i32 noundef 312, i1 noundef zeroext true)
  %121 = call noundef nonnull align 8 dereferenceable(896) ptr @_ZN11file_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(896) %120, ptr noundef @.str.17)
  %122 = call noundef nonnull align 8 dereferenceable(896) ptr @_ZN11file_loggerlsEPFRSoS0_E(ptr noundef nonnull align 8 dereferenceable(896) %121, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %123

123:                                              ; preds = %119, %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store i64 0, ptr %6, align 8, !tbaa !64
  br label %124

124:                                              ; preds = %149, %123
  %125 = load i64, ptr %6, align 8, !tbaa !64
  %126 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 14
  %127 = call noundef i64 @_ZNKSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %126) #5
  %128 = icmp ult i64 %125, %127
  br i1 %128, label %130, label %129

129:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %152

130:                                              ; preds = %124
  %131 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 14
  %132 = load i64, ptr %6, align 8, !tbaa !64
  %133 = call noundef nonnull align 8 dereferenceable(216) ptr @_ZNSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %131, i64 noundef %132) #5
  %134 = getelementptr inbounds %"struct.graphlab::dc_impl::dc_tcp_comm::socket_info", ptr %133, i32 0, i32 3
  %135 = load i32, ptr %134, align 4, !tbaa !82
  %136 = icmp sgt i32 %135, 0
  br i1 %136, label %137, label %148

137:                                              ; preds = %130
  %138 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 14
  %139 = load i64, ptr %6, align 8, !tbaa !64
  %140 = call noundef nonnull align 8 dereferenceable(216) ptr @_ZNSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %138, i64 noundef %139) #5
  %141 = getelementptr inbounds %"struct.graphlab::dc_impl::dc_tcp_comm::socket_info", ptr %140, i32 0, i32 3
  %142 = load i32, ptr %141, align 4, !tbaa !82
  %143 = call i32 @close(i32 noundef %142)
  %144 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 14
  %145 = load i64, ptr %6, align 8, !tbaa !64
  %146 = call noundef nonnull align 8 dereferenceable(216) ptr @_ZNSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %144, i64 noundef %145) #5
  %147 = getelementptr inbounds %"struct.graphlab::dc_impl::dc_tcp_comm::socket_info", ptr %146, i32 0, i32 3
  store i32 -1, ptr %147, align 4, !tbaa !82
  br label %148

148:                                              ; preds = %137, %130
  br label %149

149:                                              ; preds = %148
  %150 = load i64, ptr %6, align 8, !tbaa !64
  %151 = add i64 %150, 1
  store i64 %151, ptr %6, align 8, !tbaa !64
  br label %124, !llvm.loop !83

152:                                              ; preds = %129
  %153 = getelementptr inbounds %"class.graphlab::dc_impl::dc_tcp_comm", ptr %7, i32 0, i32 3
  store i8 1, ptr %153, align 4, !tbaa !9
  br label %154

154:                                              ; preds = %152, %11
  ret void
}

declare i32 @close(i32 noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8graphlab6thread4joinEv(ptr noundef nonnull align 8 dereferenceable(25)) #3 align 2

declare i32 @gl_event_base_loopbreak(ptr noundef) #2

declare void @_ZN8graphlab12thread_group4joinEv(ptr noundef nonnull align 8 dereferenceable(184)) #2

declare void @gl_event_free(ptr noundef) #2

declare void @gl_event_base_free(ptr noundef) #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !13, i64 12}
!10 = !{!"_ZTSN8graphlab7dc_impl11dc_tcp_commE", !11, i64 0, !12, i64 8, !12, i64 10, !13, i64 12, !14, i64 16, !17, i64 48, !21, i64 72, !29, i64 120, !33, i64 144, !37, i64 168, !41, i64 192, !43, i64 200, !44, i64 240, !45, i64 288, !41, i64 312, !41, i64 320, !49, i64 328, !6, i64 512, !49, i64 520, !6, i64 704, !6, i64 712, !6, i64 720, !56, i64 728, !56, i64 744, !57, i64 760, !58, i64 792, !59, i64 800, !13, i64 832}
!11 = !{!"_ZTSN8graphlab7dc_impl12dc_comm_baseE"}
!12 = !{!"short", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !16, i64 8, !7, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_ZTSSt6vectorIjSaIjEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSSt3mapIjtSt4lessIjESaISt4pairIKjtEEE", !22, i64 0}
!22 = !{!"_ZTSSt8_Rb_treeIjSt4pairIKjtESt10_Select1stIS2_ESt4lessIjESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSNSt8_Rb_treeIjSt4pairIKjtESt10_Select1stIS2_ESt4lessIjESaIS2_EE13_Rb_tree_implIS6_Lb1EEE", !24, i64 0, !26, i64 8}
!24 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIjEE", !25, i64 0}
!25 = !{!"_ZTSSt4lessIjE"}
!26 = !{!"_ZTSSt15_Rb_tree_header", !27, i64 0, !16, i64 32}
!27 = !{!"_ZTSSt18_Rb_tree_node_base", !28, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!28 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!29 = !{!"_ZTSSt6vectorItSaItEE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseItSaItEE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseItSaItEE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseItSaItEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = !{!"_ZTSSt6vectorIPN8graphlab7dc_impl10dc_receiveESaIS3_EE", !34, i64 0}
!34 = !{!"_ZTSSt12_Vector_baseIPN8graphlab7dc_impl10dc_receiveESaIS3_EE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIPN8graphlab7dc_impl10dc_receiveESaIS3_EE12_Vector_implE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIPN8graphlab7dc_impl10dc_receiveESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!37 = !{!"_ZTSSt6vectorIPN8graphlab7dc_impl7dc_sendESaIS3_EE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseIPN8graphlab7dc_impl7dc_sendESaIS3_EE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIPN8graphlab7dc_impl7dc_sendESaIS3_EE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIPN8graphlab7dc_impl7dc_sendESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!41 = !{!"_ZTSN8graphlab6atomicImEE", !42, i64 0}
!42 = !{!"_ZTSN8graphlab13graphlab_impl11atomic_implImLb1EEE", !16, i64 0}
!43 = !{!"_ZTSN8graphlab5mutexE", !7, i64 0}
!44 = !{!"_ZTSN8graphlab11conditionalE", !7, i64 0}
!45 = !{!"_ZTSSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EE", !46, i64 0}
!46 = !{!"_ZTSSt12_Vector_baseIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EE12_Vector_implE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!49 = !{!"_ZTSN8graphlab12thread_groupE", !16, i64 0, !16, i64 8, !43, i64 16, !44, i64 56, !50, i64 104}
!50 = !{!"_ZTSSt5queueISt4pairImPKcESt5dequeIS3_SaIS3_EEE", !51, i64 0}
!51 = !{!"_ZTSSt5dequeISt4pairImPKcESaIS3_EE", !52, i64 0}
!52 = !{!"_ZTSSt11_Deque_baseISt4pairImPKcESaIS3_EE", !53, i64 0}
!53 = !{!"_ZTSNSt11_Deque_baseISt4pairImPKcESaIS3_EE11_Deque_implE", !54, i64 0}
!54 = !{!"_ZTSNSt11_Deque_baseISt4pairImPKcESaIS3_EE16_Deque_impl_dataE", !6, i64 0, !16, i64 8, !55, i64 16, !55, i64 48}
!55 = !{!"_ZTSSt15_Deque_iteratorISt4pairImPKcERS3_PS3_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!56 = !{!"_ZTSN8graphlab7dc_impl11dc_tcp_comm13timeout_eventE", !13, i64 0, !6, i64 8}
!57 = !{!"_ZTSN8graphlab18fixed_dense_bitsetILi256EEE", !7, i64 0}
!58 = !{!"int", !7, i64 0}
!59 = !{!"_ZTSN8graphlab6threadE", !16, i64 0, !16, i64 8, !16, i64 16, !13, i64 24}
!60 = !{i8 0, i8 2}
!61 = !{}
!62 = !{!10, !58, i64 792}
!63 = !{!10, !6, i64 704}
!64 = !{!16, !16, i64 0}
!65 = !{!66, !6, i64 32}
!66 = !{!"_ZTSN8graphlab7dc_impl11dc_tcp_comm11socket_infoE", !16, i64 0, !6, i64 8, !58, i64 16, !58, i64 20, !6, i64 24, !6, i64 32, !13, i64 40, !43, i64 48, !67, i64 88, !72, i64 160}
!67 = !{!"_ZTSN8graphlab7dc_impl21circular_iovec_bufferE", !68, i64 0, !68, i64 24, !16, i64 48, !16, i64 56, !16, i64 64}
!68 = !{!"_ZTSSt6vectorI5iovecSaIS0_EE", !69, i64 0}
!69 = !{!"_ZTSSt12_Vector_baseI5iovecSaIS0_EE", !70, i64 0}
!70 = !{!"_ZTSNSt12_Vector_baseI5iovecSaIS0_EE12_Vector_implE", !71, i64 0}
!71 = !{!"_ZTSNSt12_Vector_baseI5iovecSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!72 = !{!"_ZTS6msghdr", !6, i64 0, !58, i64 8, !6, i64 16, !16, i64 24, !6, i64 32, !16, i64 40, !58, i64 48}
!73 = distinct !{!73, !74}
!74 = !{!"llvm.loop.mustprogress"}
!75 = !{!10, !6, i64 712}
!76 = !{!10, !6, i64 720}
!77 = !{!66, !58, i64 16}
!78 = distinct !{!78, !74}
!79 = !{!10, !6, i64 512}
!80 = !{!66, !6, i64 24}
!81 = distinct !{!81, !74}
!82 = !{!66, !58, i64 20}
!83 = distinct !{!83, !74}


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

@.str.6 = external hidden unnamed_addr constant [78 x i8], align 1
@__func__._ZN8graphlab7dc_impl11dc_tcp_comm5closeEv = external hidden unnamed_addr constant [6 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZNSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

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

declare noundef nonnull align 8 dereferenceable(896) ptr @_Z13global_loggerv() local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN11file_logger13get_log_levelEv(ptr noundef nonnull align 8 dereferenceable(896)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(896) ptr @_ZN19log_stream_dispatchILb1EE4execEiPKcS2_ib(i32 noundef, ptr noundef, ptr noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #2 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8graphlab7dc_impl11dc_tcp_comm5closeEv(ptr noundef nonnull align 8 dereferenceable(833) %0) unnamed_addr #3 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 12
  %3 = load i8, ptr %2, align 4, !tbaa !5, !range !59, !noundef !60
  %4 = trunc nuw i8 %3 to i1
  br i1 %4, label %98, label %5

5:                                                ; preds = %1
  %6 = tail call noundef nonnull align 8 dereferenceable(896) ptr @_Z13global_loggerv()
  %7 = tail call noundef i32 @_ZN11file_logger13get_log_levelEv(ptr noundef nonnull align 8 dereferenceable(896) %6)
  %8 = icmp slt i32 %7, 3
  br i1 %8, label %9, label %13

9:                                                ; preds = %5
  %10 = tail call noundef nonnull align 8 dereferenceable(896) ptr @_ZN19log_stream_dispatchILb1EE4execEiPKcS2_ib(i32 noundef 2, ptr noundef nonnull @.str.6, ptr noundef nonnull @__func__._ZN8graphlab7dc_impl11dc_tcp_comm5closeEv, i32 noundef 274, i1 noundef zeroext true)
  %11 = tail call noundef nonnull align 8 dereferenceable(896) ptr @_ZN11file_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(896) %10, ptr noundef nonnull @.str.15)
  %12 = tail call noundef nonnull align 8 dereferenceable(896) ptr @_ZN11file_loggerlsEPFRSoS0_E(ptr noundef nonnull align 8 dereferenceable(896) %11, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %13

13:                                               ; preds = %9, %5
  %14 = getelementptr inbounds i8, ptr %0, i64 792
  %15 = load i32, ptr %14, align 8, !tbaa !61
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %17, label %19

17:                                               ; preds = %13
  %18 = tail call i32 @close(i32 noundef %15)
  store i32 -1, ptr %14, align 8, !tbaa !61
  br label %19

19:                                               ; preds = %17, %13
  %20 = getelementptr inbounds i8, ptr %0, i64 800
  tail call void @_ZN8graphlab6thread4joinEv(ptr noundef nonnull align 8 dereferenceable(25) %20)
  %21 = getelementptr inbounds i8, ptr %0, i64 704
  %22 = load ptr, ptr %21, align 8, !tbaa !62
  %23 = tail call i32 @gl_event_base_loopbreak(ptr noundef %22)
  %24 = getelementptr inbounds i8, ptr %0, i64 520
  tail call void @_ZN8graphlab12thread_group4joinEv(ptr noundef nonnull align 8 dereferenceable(184) %24)
  %25 = getelementptr inbounds i8, ptr %0, i64 288
  %26 = tail call noundef i64 @_ZNKSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  %.not = icmp eq i64 %26, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %19
  %27 = getelementptr inbounds i8, ptr %0, i64 712
  %28 = load ptr, ptr %27, align 8, !tbaa !63
  tail call void @gl_event_free(ptr noundef %28)
  %29 = getelementptr inbounds i8, ptr %0, i64 720
  %30 = load ptr, ptr %29, align 8, !tbaa !64
  tail call void @gl_event_free(ptr noundef %30)
  %31 = load ptr, ptr %21, align 8, !tbaa !62
  tail call void @gl_event_base_free(ptr noundef %31)
  %32 = tail call noundef nonnull align 8 dereferenceable(896) ptr @_Z13global_loggerv()
  %33 = tail call noundef i32 @_ZN11file_logger13get_log_levelEv(ptr noundef nonnull align 8 dereferenceable(896) %32)
  %34 = icmp slt i32 %33, 3
  br i1 %34, label %41, label %45

.lr.ph:                                           ; preds = %19, %.lr.ph
  %.01820 = phi i64 [ %38, %.lr.ph ], [ 0, %19 ]
  %35 = tail call noundef nonnull align 8 dereferenceable(216) ptr @_ZNSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %.01820) #4
  %36 = getelementptr inbounds i8, ptr %35, i64 32
  %37 = load ptr, ptr %36, align 8, !tbaa !65
  tail call void @gl_event_free(ptr noundef %37)
  %38 = add nuw i64 %.01820, 1
  %39 = tail call noundef i64 @_ZNKSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  %40 = icmp ult i64 %38, %39
  br i1 %40, label %.lr.ph, label %._crit_edge, !llvm.loop !73

41:                                               ; preds = %._crit_edge
  %42 = tail call noundef nonnull align 8 dereferenceable(896) ptr @_ZN19log_stream_dispatchILb1EE4execEiPKcS2_ib(i32 noundef 2, ptr noundef nonnull @.str.6, ptr noundef nonnull @__func__._ZN8graphlab7dc_impl11dc_tcp_comm5closeEv, i32 noundef 294, i1 noundef zeroext true)
  %43 = tail call noundef nonnull align 8 dereferenceable(896) ptr @_ZN11file_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(896) %42, ptr noundef nonnull @.str.16)
  %44 = tail call noundef nonnull align 8 dereferenceable(896) ptr @_ZN11file_loggerlsEPFRSoS0_E(ptr noundef nonnull align 8 dereferenceable(896) %43, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %45

45:                                               ; preds = %41, %._crit_edge
  %46 = tail call noundef i64 @_ZNKSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  %.not33 = icmp eq i64 %46, 0
  br i1 %.not33, label %._crit_edge24, label %.lr.ph23

._crit_edge24:                                    ; preds = %63, %45
  %47 = getelementptr inbounds i8, ptr %0, i64 512
  %48 = load ptr, ptr %47, align 8, !tbaa !75
  %49 = tail call i32 @gl_event_base_loopbreak(ptr noundef %48)
  %50 = getelementptr inbounds i8, ptr %0, i64 328
  tail call void @_ZN8graphlab12thread_group4joinEv(ptr noundef nonnull align 8 dereferenceable(184) %50)
  %51 = tail call noundef i64 @_ZNKSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  %.not34 = icmp eq i64 %51, 0
  br i1 %.not34, label %._crit_edge28, label %.lr.ph27

.lr.ph23:                                         ; preds = %45, %63
  %.01721 = phi i64 [ %64, %63 ], [ 0, %45 ]
  %52 = tail call noundef nonnull align 8 dereferenceable(216) ptr @_ZNSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %.01721) #4
  %53 = getelementptr inbounds i8, ptr %52, i64 16
  %54 = load i32, ptr %53, align 8, !tbaa !76
  %55 = icmp sgt i32 %54, 0
  br i1 %55, label %56, label %63

56:                                               ; preds = %.lr.ph23
  %57 = tail call noundef nonnull align 8 dereferenceable(216) ptr @_ZNSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %.01721) #4
  %58 = getelementptr inbounds i8, ptr %57, i64 16
  %59 = load i32, ptr %58, align 8, !tbaa !76
  %60 = tail call i32 @close(i32 noundef %59)
  %61 = tail call noundef nonnull align 8 dereferenceable(216) ptr @_ZNSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %.01721) #4
  %62 = getelementptr inbounds i8, ptr %61, i64 16
  store i32 -1, ptr %62, align 8, !tbaa !76
  br label %63

63:                                               ; preds = %.lr.ph23, %56
  %64 = add nuw i64 %.01721, 1
  %65 = tail call noundef i64 @_ZNKSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  %66 = icmp ult i64 %64, %65
  br i1 %66, label %.lr.ph23, label %._crit_edge24, !llvm.loop !77

._crit_edge28:                                    ; preds = %.lr.ph27, %._crit_edge24
  %67 = load ptr, ptr %47, align 8, !tbaa !75
  tail call void @gl_event_base_free(ptr noundef %67)
  %68 = tail call noundef nonnull align 8 dereferenceable(896) ptr @_Z13global_loggerv()
  %69 = tail call noundef i32 @_ZN11file_logger13get_log_levelEv(ptr noundef nonnull align 8 dereferenceable(896) %68)
  %70 = icmp slt i32 %69, 3
  br i1 %70, label %77, label %81

.lr.ph27:                                         ; preds = %._crit_edge24, %.lr.ph27
  %.01625 = phi i64 [ %74, %.lr.ph27 ], [ 0, %._crit_edge24 ]
  %71 = tail call noundef nonnull align 8 dereferenceable(216) ptr @_ZNSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %.01625) #4
  %72 = getelementptr inbounds i8, ptr %71, i64 24
  %73 = load ptr, ptr %72, align 8, !tbaa !78
  tail call void @gl_event_free(ptr noundef %73)
  %74 = add nuw i64 %.01625, 1
  %75 = tail call noundef i64 @_ZNKSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  %76 = icmp ult i64 %74, %75
  br i1 %76, label %.lr.ph27, label %._crit_edge28, !llvm.loop !79

77:                                               ; preds = %._crit_edge28
  %78 = tail call noundef nonnull align 8 dereferenceable(896) ptr @_ZN19log_stream_dispatchILb1EE4execEiPKcS2_ib(i32 noundef 2, ptr noundef nonnull @.str.6, ptr noundef nonnull @__func__._ZN8graphlab7dc_impl11dc_tcp_comm5closeEv, i32 noundef 312, i1 noundef zeroext true)
  %79 = tail call noundef nonnull align 8 dereferenceable(896) ptr @_ZN11file_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(896) %78, ptr noundef nonnull @.str.17)
  %80 = tail call noundef nonnull align 8 dereferenceable(896) ptr @_ZN11file_loggerlsEPFRSoS0_E(ptr noundef nonnull align 8 dereferenceable(896) %79, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %81

81:                                               ; preds = %77, %._crit_edge28
  %82 = tail call noundef i64 @_ZNKSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  %.not35 = icmp eq i64 %82, 0
  br i1 %.not35, label %._crit_edge32, label %.lr.ph31

._crit_edge32:                                    ; preds = %94, %81
  store i8 1, ptr %2, align 4, !tbaa !5
  br label %98

.lr.ph31:                                         ; preds = %81, %94
  %.029 = phi i64 [ %95, %94 ], [ 0, %81 ]
  %83 = tail call noundef nonnull align 8 dereferenceable(216) ptr @_ZNSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %.029) #4
  %84 = getelementptr inbounds i8, ptr %83, i64 20
  %85 = load i32, ptr %84, align 4, !tbaa !80
  %86 = icmp sgt i32 %85, 0
  br i1 %86, label %87, label %94

87:                                               ; preds = %.lr.ph31
  %88 = tail call noundef nonnull align 8 dereferenceable(216) ptr @_ZNSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %.029) #4
  %89 = getelementptr inbounds i8, ptr %88, i64 20
  %90 = load i32, ptr %89, align 4, !tbaa !80
  %91 = tail call i32 @close(i32 noundef %90)
  %92 = tail call noundef nonnull align 8 dereferenceable(216) ptr @_ZNSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %.029) #4
  %93 = getelementptr inbounds i8, ptr %92, i64 20
  store i32 -1, ptr %93, align 4, !tbaa !80
  br label %94

94:                                               ; preds = %.lr.ph31, %87
  %95 = add nuw i64 %.029, 1
  %96 = tail call noundef i64 @_ZNKSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  %97 = icmp ult i64 %95, %96
  br i1 %97, label %.lr.ph31, label %._crit_edge32, !llvm.loop !81

98:                                               ; preds = %1, %._crit_edge32
  ret void
}

declare i32 @close(i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8graphlab6thread4joinEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #2 align 2

declare i32 @gl_event_base_loopbreak(ptr noundef) local_unnamed_addr #1

declare void @_ZN8graphlab12thread_group4joinEv(ptr noundef nonnull align 8 dereferenceable(184)) local_unnamed_addr #1

declare void @gl_event_free(ptr noundef) local_unnamed_addr #1

declare void @gl_event_base_free(ptr noundef) local_unnamed_addr #1

attributes #0 = { 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint 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 = { 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 #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 12}
!6 = !{!"_ZTSN8graphlab7dc_impl11dc_tcp_commE", !7, i64 0, !8, i64 8, !8, i64 10, !11, i64 12, !12, i64 16, !16, i64 48, !20, i64 72, !28, i64 120, !32, i64 144, !36, i64 168, !40, i64 192, !42, i64 200, !43, i64 240, !44, i64 288, !40, i64 312, !40, i64 320, !48, i64 328, !14, i64 512, !48, i64 520, !14, i64 704, !14, i64 712, !14, i64 720, !55, i64 728, !55, i64 744, !56, i64 760, !57, i64 792, !58, i64 800, !11, i64 832}
!7 = !{!"_ZTSN8graphlab7dc_impl12dc_comm_baseE"}
!8 = !{!"short", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"bool", !9, i64 0}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !15, i64 8, !9, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !14, i64 0}
!14 = !{!"any pointer", !9, i64 0}
!15 = !{!"long", !9, i64 0}
!16 = !{!"_ZTSSt6vectorIjSaIjEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!20 = !{!"_ZTSSt3mapIjtSt4lessIjESaISt4pairIKjtEEE", !21, i64 0}
!21 = !{!"_ZTSSt8_Rb_treeIjSt4pairIKjtESt10_Select1stIS2_ESt4lessIjESaIS2_EE", !22, i64 0}
!22 = !{!"_ZTSNSt8_Rb_treeIjSt4pairIKjtESt10_Select1stIS2_ESt4lessIjESaIS2_EE13_Rb_tree_implIS6_Lb1EEE", !23, i64 0, !25, i64 8}
!23 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIjEE", !24, i64 0}
!24 = !{!"_ZTSSt4lessIjE"}
!25 = !{!"_ZTSSt15_Rb_tree_header", !26, i64 0, !15, i64 32}
!26 = !{!"_ZTSSt18_Rb_tree_node_base", !27, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!27 = !{!"_ZTSSt14_Rb_tree_color", !9, i64 0}
!28 = !{!"_ZTSSt6vectorItSaItEE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseItSaItEE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseItSaItEE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseItSaItEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!32 = !{!"_ZTSSt6vectorIPN8graphlab7dc_impl10dc_receiveESaIS3_EE", !33, i64 0}
!33 = !{!"_ZTSSt12_Vector_baseIPN8graphlab7dc_impl10dc_receiveESaIS3_EE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIPN8graphlab7dc_impl10dc_receiveESaIS3_EE12_Vector_implE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIPN8graphlab7dc_impl10dc_receiveESaIS3_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!36 = !{!"_ZTSSt6vectorIPN8graphlab7dc_impl7dc_sendESaIS3_EE", !37, i64 0}
!37 = !{!"_ZTSSt12_Vector_baseIPN8graphlab7dc_impl7dc_sendESaIS3_EE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIPN8graphlab7dc_impl7dc_sendESaIS3_EE12_Vector_implE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIPN8graphlab7dc_impl7dc_sendESaIS3_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!40 = !{!"_ZTSN8graphlab6atomicImEE", !41, i64 0}
!41 = !{!"_ZTSN8graphlab13graphlab_impl11atomic_implImLb1EEE", !15, i64 0}
!42 = !{!"_ZTSN8graphlab5mutexE", !9, i64 0}
!43 = !{!"_ZTSN8graphlab11conditionalE", !9, i64 0}
!44 = !{!"_ZTSSt6vectorIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EE", !45, i64 0}
!45 = !{!"_ZTSSt12_Vector_baseIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EE", !46, i64 0}
!46 = !{!"_ZTSNSt12_Vector_baseIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EE12_Vector_implE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseIN8graphlab7dc_impl11dc_tcp_comm11socket_infoESaIS3_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!48 = !{!"_ZTSN8graphlab12thread_groupE", !15, i64 0, !15, i64 8, !42, i64 16, !43, i64 56, !49, i64 104}
!49 = !{!"_ZTSSt5queueISt4pairImPKcESt5dequeIS3_SaIS3_EEE", !50, i64 0}
!50 = !{!"_ZTSSt5dequeISt4pairImPKcESaIS3_EE", !51, i64 0}
!51 = !{!"_ZTSSt11_Deque_baseISt4pairImPKcESaIS3_EE", !52, i64 0}
!52 = !{!"_ZTSNSt11_Deque_baseISt4pairImPKcESaIS3_EE11_Deque_implE", !53, i64 0}
!53 = !{!"_ZTSNSt11_Deque_baseISt4pairImPKcESaIS3_EE16_Deque_impl_dataE", !14, i64 0, !15, i64 8, !54, i64 16, !54, i64 48}
!54 = !{!"_ZTSSt15_Deque_iteratorISt4pairImPKcERS3_PS3_E", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!55 = !{!"_ZTSN8graphlab7dc_impl11dc_tcp_comm13timeout_eventE", !11, i64 0, !14, i64 8}
!56 = !{!"_ZTSN8graphlab18fixed_dense_bitsetILi256EEE", !9, i64 0}
!57 = !{!"int", !9, i64 0}
!58 = !{!"_ZTSN8graphlab6threadE", !15, i64 0, !15, i64 8, !15, i64 16, !11, i64 24}
!59 = !{i8 0, i8 2}
!60 = !{}
!61 = !{!6, !57, i64 792}
!62 = !{!6, !14, i64 704}
!63 = !{!6, !14, i64 712}
!64 = !{!6, !14, i64 720}
!65 = !{!66, !14, i64 32}
!66 = !{!"_ZTSN8graphlab7dc_impl11dc_tcp_comm11socket_infoE", !15, i64 0, !14, i64 8, !57, i64 16, !57, i64 20, !14, i64 24, !14, i64 32, !11, i64 40, !42, i64 48, !67, i64 88, !72, i64 160}
!67 = !{!"_ZTSN8graphlab7dc_impl21circular_iovec_bufferE", !68, i64 0, !68, i64 24, !15, i64 48, !15, i64 56, !15, i64 64}
!68 = !{!"_ZTSSt6vectorI5iovecSaIS0_EE", !69, i64 0}
!69 = !{!"_ZTSSt12_Vector_baseI5iovecSaIS0_EE", !70, i64 0}
!70 = !{!"_ZTSNSt12_Vector_baseI5iovecSaIS0_EE12_Vector_implE", !71, i64 0}
!71 = !{!"_ZTSNSt12_Vector_baseI5iovecSaIS0_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!72 = !{!"_ZTS6msghdr", !14, i64 0, !57, i64 8, !14, i64 16, !15, i64 24, !14, i64 32, !15, i64 40, !57, i64 48}
!73 = distinct !{!73, !74}
!74 = !{!"llvm.loop.mustprogress"}
!75 = !{!6, !14, i64 512}
!76 = !{!66, !57, i64 16}
!77 = distinct !{!77, !74}
!78 = !{!66, !14, i64 24}
!79 = distinct !{!79, !74}
!80 = !{!66, !57, i64 20}
!81 = distinct !{!81, !74}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass