//
// FMOD::System::update from 0x1004ca330 to 0x1004ca3f4 (196 bytes)
//
// 8 xrefs:
// > PlayLayer::resume @ 0x100122aa4
// > FMODAudioEngine::start @ 0x100138aa0
// > FMODAudioEngine::stop @ 0x100138b1c
// > FMODAudioEngine::update @ 0x100138e20
// > GJBaseGameLayer::pauseAudio @ 0x1001fe4a8
// > GJBaseGameLayer::resumeAudio @ 0x1001fe4d0
// > GJBaseGameLayer::resetAudio @ 0x1001fe4f0
// > sub_100452B54 @ 0x100452b58
//
// 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
//
FMOD_RESULT __fastcall FMOD::System::update(FMOD::System *a1)
{
__int64 v2; // x19
__int64 v4; // [xsp+8h] [xbp-138h] BYREF
__int64 v5; // [xsp+10h] [xbp-130h] BYREF
_BYTE v6[256]; // [xsp+18h] [xbp-128h] BYREF
v4 = 0;
v2 = sub_1004CE440(a1, &v5, &v4);
if ( (_DWORD)v2 || (v2 = sub_1004D1C5C(v5), (_DWORD)v2) )
{
if ( (*((_BYTE *)off_1008524C8 + 32) & 0x80) != 0 )
{
v6[0] = 0;
sub_10048489C(v2, 1, (__int64)a1, (__int64)"System::update", (__int64)v6);
}
}
if ( v4 )
sub_100442D80(v4);
return (unsigned int)v2;
}