//
// sub_9786A from 0x9786a to 0x9788a (32 bytes)
//
// 0 xrefs:
//
// 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 11:41:29 +0000
//
int __fastcall sub_9786A(int *a1, int a2, unsigned int a3)
{
int v3; // r0
unsigned int v4; // r1
bool v5; // cf
int v6; // r1
v3 = *a1;
if ( !a2 )
{
v6 = 4;
LABEL_7:
*(_DWORD *)(v3 + 992) = v6;
return 0;
}
v4 = *(_DWORD *)(v3 + 992);
if ( v4 )
{
v5 = v4 >= a3;
v6 = v4 - a3;
if ( !v5 )
v6 = 0;
goto LABEL_7;
}
return 11;
}