//
// ASYNC_WAIT_CTX_clear_fd from 0xfefae8 to 0xfefb34 (76 bytes)
//
// 1 xrefs:
// > ??> @ 0xd2df0
//
// 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:15:45 +0000
//
__int64 __fastcall ASYNC_WAIT_CTX_clear_fd(__int64 *a1, __int64 a2)
{
__int64 v2; // x2
__int64 v4; // x1
v2 = *a1;
if ( !*a1 )
return (unsigned int)v2;
while ( *(_DWORD *)(v2 + 36) || *(_QWORD *)v2 != a2 )
{
v2 = *(_QWORD *)(v2 + 40);
if ( !v2 )
return (unsigned int)v2;
}
v4 = a1[2];
*(_DWORD *)(v2 + 36) = 1;
a1[2] = v4 + 1;
return 1;
}