//
// async_wait_ctx_reset_counts from 0xd717d4 to 0xd71870 (156 bytes)
//
// 1 xrefs:
// > ??> @ 0x9fe40
//
// 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
//
__int64 *__fastcall async_wait_ctx_reset_counts(__int64 *result)
{
__int64 v1; // x3
__int64 v2; // x19
__int64 *v3; // x21
v1 = *result;
v2 = 0;
v3 = result;
result[1] = 0;
result[2] = 0;
LABEL_2:
while ( v1 )
{
while ( 1 )
{
result = (__int64 *)v1;
if ( !*(_DWORD *)(v1 + 36) )
break;
if ( !v2 )
{
*v3 = *(_QWORD *)(v1 + 40);
result = (__int64 *)CRYPTO_free(v1, "crypto/async/async_wait.c", 180);
v1 = *v3;
goto LABEL_2;
}
*(_QWORD *)(v2 + 40) = *(_QWORD *)(v1 + 40);
result = (__int64 *)CRYPTO_free(v1, "crypto/async/async_wait.c", 180);
v1 = *(_QWORD *)(v2 + 40);
if ( !v1 )
return result;
}
v2 = v1;
if ( *(_DWORD *)(v1 + 32) )
*(_DWORD *)(v1 + 32) = 0;
v1 = *(_QWORD *)(v1 + 40);
}
return result;
}