//
// lws_send_pipe_choked from 0xe38898 to 0xe388f8 (96 bytes)
//
// 4 xrefs:
// > sub_E327AC @ 0xe32980
// > lws_serve_http_file_fragment @ 0xe33cb4
// > sub_E3A7C0 @ 0xe3a8a4
// > ??> @ 0xf4f90
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:09:59 +0000
//
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;
}