; LLVM IR from wichue/nethello :: src/net/TcpSafeClient.ll (ZN3chw13TcpSafeClient8SendDataEPhjjtb)

; 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.std::lock_guard" = type { ptr }
%"class.std::shared_ptr.33" = type { %"class.std::__shared_ptr.34" }
%"class.std::__shared_ptr.34" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::function.70" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.72 = type { ptr }
%"class.chw::TcpSafeClient" = type <{ %"class.chw::TcpClient", i32, [4 x i8], %"class.std::mutex", i8, [7 x i8] }>
%"class.chw::TcpClient" = type { %"class.chw::Client" }
%"class.chw::Client" = type { ptr, %"class.std::enable_shared_from_this", %"class.std::__cxx11::basic_string", %"class.std::shared_ptr", %"class.std::shared_ptr.0", %"class.std::function" }
%"class.std::enable_shared_from_this" = type { %"class.std::weak_ptr" }
%"class.std::weak_ptr" = type { %"class.std::__weak_ptr" }
%"class.std::__weak_ptr" = type { ptr, %"class.std::__weak_count" }
%"class.std::__weak_count" = 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::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::shared_ptr.0" = type { %"class.std::__shared_ptr.1" }
%"class.std::__shared_ptr.1" = type { ptr, %"class.std::__shared_count" }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = 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 }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3chw13TcpSafeClient8SendDataEPhjjtb(ptr noundef nonnull align 8 dereferenceable(169) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i16 noundef zeroext %4, i1 noundef zeroext %5) #1 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i16, align 2
  %13 = alloca i8, align 1
  %14 = alloca %"class.std::lock_guard", align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::shared_ptr.33", align 8
  %20 = alloca %"class.std::function.70", align 8
  %21 = alloca %class.anon.72, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i32 %2, ptr %10, align 4, !tbaa !9
  store i32 %3, ptr %11, align 4, !tbaa !9
  store i16 %4, ptr %12, align 2, !tbaa !11
  %22 = zext i1 %5 to i8
  store i8 %22, ptr %13, align 1, !tbaa !13
  %23 = load ptr, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %24 = getelementptr inbounds %"class.chw::TcpSafeClient", ptr %23, i32 0, i32 3
  call void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(40) %24)
  %25 = getelementptr inbounds %"class.chw::TcpSafeClient", ptr %23, i32 0, i32 1
  %26 = load i32, ptr %25, align 8, !tbaa !15
  %27 = icmp slt i32 %26, 0
  br i1 %27, label %28, label %29

28:                                               ; preds = %6
  br label %29

29:                                               ; preds = %28, %6
  %30 = getelementptr inbounds %"class.chw::TcpSafeClient", ptr %23, i32 0, i32 4
  %31 = load i8, ptr %30, align 8, !tbaa !35, !range !36, !noundef !37
  %32 = trunc i8 %31 to i1
  %33 = zext i1 %32 to i32
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %35, label %36

35:                                               ; preds = %29
  store i32 0, ptr %7, align 4
  store i32 1, ptr %15, align 4
  br label %66

36:                                               ; preds = %29
  %37 = load i8, ptr %13, align 1, !tbaa !13, !range !36, !noundef !37
  %38 = trunc i8 %37 to i1
  %39 = zext i1 %38 to i32
  %40 = icmp eq i32 %39, 1
  br i1 %40, label %41, label %42

41:                                               ; preds = %36
  br label %42

42:                                               ; preds = %41, %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = load i32, ptr %10, align 4, !tbaa !9
  %45 = invoke noundef i32 @_ZN3chw6Client10senddata_iEPcj(ptr noundef nonnull align 8 dereferenceable(120) %23, ptr noundef %43, i32 noundef %44)
          to label %46 unwind label %55

46:                                               ; preds = %42
  store i32 %45, ptr %16, align 4, !tbaa !9
  %47 = load i32, ptr %16, align 4, !tbaa !9
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %49, label %63

49:                                               ; preds = %46
  %50 = getelementptr inbounds %"class.chw::TcpSafeClient", ptr %23, i32 0, i32 4
  store i8 0, ptr %50, align 8, !tbaa !35
  %51 = getelementptr inbounds %"class.chw::Client", ptr %23, i32 0, i32 4
  %52 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3chw9EventLoopELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %51) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %53 = getelementptr inbounds %class.anon.72, ptr %21, i32 0, i32 0
  store ptr %23, ptr %53, align 8, !tbaa !38
  call void @"_ZNSt8functionIFvvEEC2IZN3chw13TcpSafeClient8SendDataEPhjjtbE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #4
  invoke void @_ZN3chw9EventLoop5asyncESt8functionIFvvEEb(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.33") align 8 %19, ptr noundef nonnull align 8 dereferenceable(432) %52, ptr noundef %20, i1 noundef zeroext true)
          to label %54 unwind label %59

54:                                               ; preds = %49
  call void @_ZNSt12__shared_ptrIN3chw17TaskCancelableImpIFvvEJEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  br label %63

55:                                               ; preds = %42
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %17, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %18, align 4
  br label %65

59:                                               ; preds = %49
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %17, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %18, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  br label %65

63:                                               ; preds = %54, %46
  %64 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %64, ptr %7, align 4
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %66

65:                                               ; preds = %59, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %68

66:                                               ; preds = %63, %35
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  %67 = load i32, ptr %7, align 4
  ret i32 %67

68:                                               ; preds = %65
  %69 = load ptr, ptr %17, align 8
  %70 = load i32, ptr %18, align 4
  %71 = insertvalue { ptr, i32 } poison, ptr %69, 0
  %72 = insertvalue { ptr, i32 } %71, i32 %70, 1
  resume { ptr, i32 } %72
}

declare noundef i32 @_ZN3chw6Client10senddata_iEPcj(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef, i32 noundef) #3

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

declare void @_ZN3chw9EventLoop5asyncESt8functionIFvvEEb(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.33") align 8, ptr noundef nonnull align 8 dereferenceable(432), ptr noundef, i1 noundef zeroext) #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN3chw13TcpSafeClient8SendDataEPhjjtbE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!16, !10, i64 120}
!16 = !{!"_ZTSN3chw13TcpSafeClientE", !17, i64 0, !10, i64 120, !33, i64 128, !14, i64 168}
!17 = !{!"_ZTSN3chw9TcpClientE", !18, i64 0}
!18 = !{!"_ZTSN3chw6ClientE", !19, i64 8, !23, i64 24, !26, i64 56, !29, i64 72, !31, i64 88}
!19 = !{!"_ZTSSt23enable_shared_from_thisIN3chw6ClientEE", !20, i64 0}
!20 = !{!"_ZTSSt8weak_ptrIN3chw6ClientEE", !21, i64 0}
!21 = !{!"_ZTSSt10__weak_ptrIN3chw6ClientELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !22, i64 8}
!22 = !{!"_ZTSSt12__weak_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !24, i64 0, !25, i64 8, !7, i64 16}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!25 = !{!"long", !7, i64 0}
!26 = !{!"_ZTSSt10shared_ptrIN3chw6SocketEE", !27, i64 0}
!27 = !{!"_ZTSSt12__shared_ptrIN3chw6SocketELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !28, i64 8}
!28 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!29 = !{!"_ZTSSt10shared_ptrIN3chw9EventLoopEE", !30, i64 0}
!30 = !{!"_ZTSSt12__shared_ptrIN3chw9EventLoopELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !28, i64 8}
!31 = !{!"_ZTSSt8functionIFvRKN3chw13SockExceptionEEE", !32, i64 0, !6, i64 24}
!32 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!33 = !{!"_ZTSSt5mutex", !34, i64 0}
!34 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!35 = !{!16, !14, i64 168}
!36 = !{i8 0, i8 2}
!37 = !{}
!38 = !{!39, !6, i64 0}
!39 = !{!"_ZTSZN3chw13TcpSafeClient8SendDataEPhjjtbE3$_0", !6, i64 0}


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

%"class.std::lock_guard" = type { ptr }
%"class.std::shared_ptr.33" = type { %"class.std::__shared_ptr.34" }
%"class.std::__shared_ptr.34" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::function.70" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.72 = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3chw13TcpSafeClient8SendDataEPhjjtb(ptr noundef nonnull align 8 dereferenceable(169) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i16 noundef zeroext %4, i1 noundef zeroext %5) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %"class.std::lock_guard", align 8
  %8 = alloca %"class.std::shared_ptr.33", align 8
  %9 = alloca %"class.std::function.70", align 8
  %10 = alloca %class.anon.72, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %11 = getelementptr inbounds i8, ptr %0, i64 128
  call void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(40) %11)
  %12 = getelementptr inbounds i8, ptr %0, i64 168
  %13 = load i8, ptr %12, align 8, !tbaa !5, !range !30, !noundef !31
  %14 = icmp eq i8 %13, 0
  br i1 %14, label %28, label %15

15:                                               ; preds = %6
  %16 = invoke noundef i32 @_ZN3chw6Client10senddata_iEPcj(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef %1, i32 noundef %2)
          to label %17 unwind label %23

17:                                               ; preds = %15
  %18 = icmp eq i32 %16, 0
  br i1 %18, label %19, label %28

19:                                               ; preds = %17
  store i8 0, ptr %12, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %0, i64 72
  %21 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3chw9EventLoopELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  store ptr %0, ptr %10, align 8, !tbaa !32
  call void @"_ZNSt8functionIFvvEEC2IZN3chw13TcpSafeClient8SendDataEPhjjtbE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  invoke void @_ZN3chw9EventLoop5asyncESt8functionIFvvEEb(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.33") align 8 %8, ptr noundef nonnull align 8 dereferenceable(432) %21, ptr noundef nonnull %9, i1 noundef zeroext true)
          to label %22 unwind label %25

22:                                               ; preds = %19
  call void @_ZNSt12__shared_ptrIN3chw17TaskCancelableImpIFvvEJEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  br label %28

23:                                               ; preds = %15
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %27

25:                                               ; preds = %19
  %26 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  br label %27

27:                                               ; preds = %25, %23
  %.pn = phi { ptr, i32 } [ %26, %25 ], [ %24, %23 ]
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  resume { ptr, i32 } %.pn

28:                                               ; preds = %17, %22, %6
  %.09 = phi i32 [ 0, %6 ], [ 0, %22 ], [ %16, %17 ]
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  ret i32 %.09
}

declare noundef i32 @_ZN3chw6Client10senddata_iEPcj(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef, i32 noundef) local_unnamed_addr #3

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

declare void @_ZN3chw9EventLoop5asyncESt8functionIFvvEEb(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.33") align 8, ptr noundef nonnull align 8 dereferenceable(432), ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvvEEC2IZN3chw13TcpSafeClient8SendDataEPhjjtbE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !29, i64 168}
!6 = !{!"_ZTSN3chw13TcpSafeClientE", !7, i64 0, !26, i64 120, !27, i64 128, !29, i64 168}
!7 = !{!"_ZTSN3chw9TcpClientE", !8, i64 0}
!8 = !{!"_ZTSN3chw6ClientE", !9, i64 8, !16, i64 24, !19, i64 56, !22, i64 72, !24, i64 88}
!9 = !{!"_ZTSSt23enable_shared_from_thisIN3chw6ClientEE", !10, i64 0}
!10 = !{!"_ZTSSt8weak_ptrIN3chw6ClientEE", !11, i64 0}
!11 = !{!"_ZTSSt10__weak_ptrIN3chw6ClientELN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0, !15, i64 8}
!12 = !{!"any pointer", !13, i64 0}
!13 = !{!"omnipotent char", !14, i64 0}
!14 = !{!"Simple C++ TBAA"}
!15 = !{!"_ZTSSt12__weak_countILN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !17, i64 0, !18, i64 8, !13, i64 16}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !12, i64 0}
!18 = !{!"long", !13, i64 0}
!19 = !{!"_ZTSSt10shared_ptrIN3chw6SocketEE", !20, i64 0}
!20 = !{!"_ZTSSt12__shared_ptrIN3chw6SocketELN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0, !21, i64 8}
!21 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0}
!22 = !{!"_ZTSSt10shared_ptrIN3chw9EventLoopEE", !23, i64 0}
!23 = !{!"_ZTSSt12__shared_ptrIN3chw9EventLoopELN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0, !21, i64 8}
!24 = !{!"_ZTSSt8functionIFvRKN3chw13SockExceptionEEE", !25, i64 0, !12, i64 24}
!25 = !{!"_ZTSSt14_Function_base", !13, i64 0, !12, i64 16}
!26 = !{!"int", !13, i64 0}
!27 = !{!"_ZTSSt5mutex", !28, i64 0}
!28 = !{!"_ZTSSt12__mutex_base", !13, i64 0}
!29 = !{!"bool", !13, i64 0}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = !{!33, !12, i64 0}
!33 = !{!"_ZTSZN3chw13TcpSafeClient8SendDataEPhjjtbE3$_0", !12, i64 0}


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