//
// sub_1004AC7D0 from 0x1004ac7d0 to 0x1004ac808 (56 bytes)
//
// 1 xrefs:
// > ??> @ 0x1008283e0
//
// 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 sub_1004AC7D0(__int64 a1, __int64 a2, int a3, _DWORD *a4)
{
int v4; // w8
unsigned int v5; // w9
unsigned int v6; // w10
int v7; // w8
bool v8; // cc
int v9; // w9
__int64 v10; // x8
v4 = *(_DWORD *)(a1 + 496);
v5 = v4 + a3;
v6 = *(_DWORD *)(a1 + 32);
v7 = v6 - v4;
v8 = v5 > v6;
if ( v5 <= v6 )
v9 = a3;
else
v9 = v7;
if ( v8 )
v10 = 31;
else
v10 = 0;
*a4 = v9;
*(_DWORD *)(a1 + 496) += v9;
return v10;
}