//
// async_wait_ctx_reset_counts from 0x9e03e4 to 0x9e048c (168 bytes)
//
// 1 xrefs:
// > ??> @ 0x78dac
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:07:20 +0000
//
_DWORD *__fastcall async_wait_ctx_reset_counts(_DWORD *result)
{
_DWORD *v1; // r3
_DWORD *v2; // r4
bool v3; // zf
_DWORD *v4; // r6
v1 = (_DWORD *)*result;
v2 = nullptr;
v3 = *result == 0;
result[1] = 0;
result[2] = 0;
if ( !v3 )
{
v4 = result;
do
{
while ( 1 )
{
result = v1;
if ( v1[5] )
break;
v2 = v1;
if ( v1[4] )
v1[4] = 0;
v1 = (_DWORD *)v1[6];
if ( !v1 )
return result;
}
if ( v2 )
{
v2[6] = v1[6];
result = (_DWORD *)CRYPTO_free(v1, "crypto/async/async_wait.c", 180);
v1 = (_DWORD *)v2[6];
}
else
{
*v4 = v1[6];
result = (_DWORD *)CRYPTO_free(v1, "crypto/async/async_wait.c", 180);
v1 = (_DWORD *)*v4;
}
}
while ( v1 );
}
return result;
}