//
// lws_send_pipe_choked from 0xbc26d8 to 0xbc2738 (96 bytes)
//
// 4 xrefs:
// > sub_BBC5EC @ 0xbbc7c0
// > lws_serve_http_file_fragment @ 0xbbdaf4
// > sub_BC4600 @ 0xbc46e4
// > ??> @ 0xbbde8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
unsigned __int64 __fastcall lws_send_pipe_choked(__int64 a1)
{
struct pollfd fds; // [xsp+18h] [xbp+18h] BYREF
if ( *(_DWORD *)(a1 + 136) )
return 1;
fds.revents = 0;
fds.fd = *(_DWORD *)(a1 + 88);
fds.events = 4;
if ( poll(&fds, 1u, 0) != 1 )
return 1;
else
return (((unsigned __int16)fds.revents ^ 4uLL) >> 2) & 1;
}