//
// FMODAudioEngine::updateQueuedEffects from 0x1001b5ce8 to 0x1001b5e14 (300 bytes)
//
// 1 xrefs:
// > FMODAudioEngine::update @ 0x1001b5b5c
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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:00:10 +0000
//
__int64 __fastcall FMODAudioEngine::updateQueuedEffects(__int64 result)
{
__int64 *v1; // x20
__int64 v2; // x19
__int64 v4; // x21
__int64 *v5; // x21
void *v6[2]; // [xsp+0h] [xbp-70h] BYREF
__int64 v7; // [xsp+10h] [xbp-60h]
void *__p[2]; // [xsp+20h] [xbp-50h] BYREF
__int64 v9; // [xsp+30h] [xbp-40h]
unsigned int v10; // [xsp+3Ch] [xbp-34h] BYREF
v1 = *(__int64 **)(result + 1504);
if ( v1 )
{
v2 = result;
do
{
while ( 1 )
{
result = FMOD::Sound::getOpenState(v1[5], &v10, 0, 0, 0);
*(_DWORD *)(v2 + 536) = result;
if ( v10 <= 6 && ((1 << v10) & 0x45) != 0 )
break;
v1 = (__int64 *)*v1;
if ( !v1 )
return result;
}
v4 = v1[5];
if ( *((char *)v1 + 39) < 0 )
{
sub_1000097D0(__p, (void *)v1[2], v1[3]);
}
else
{
*(_OWORD *)__p = *((_OWORD *)v1 + 1);
v9 = v1[4];
}
FMODAudioEngine::storeEffect(v2, v4, __p);
if ( SHIBYTE(v9) < 0 )
operator delete(__p[0]);
if ( *((char *)v1 + 39) < 0 )
{
sub_1000097D0(v6, (void *)v1[2], v1[3]);
}
else
{
*(_OWORD *)v6 = *((_OWORD *)v1 + 1);
v7 = v1[4];
}
FMODAudioEngine::queuedEffectFinishedLoading(v2, v6);
if ( SHIBYTE(v7) < 0 )
operator delete(v6[0]);
v5 = (__int64 *)*v1;
result = sub_1001BDA2C(v2 + 1488, v1);
v1 = v5;
}
while ( v5 );
}
return result;
}