//
// FMODAudioEngine::updateTemporaryEffects from 0x6d1994 to 0x6d1b0c (376 bytes)
//
// 2 xrefs:
// > sub_6DC4D0 @ 0x6dc538
// > ??> @ 0x5e990
//
// 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 12:51:27 +0000
//
__int64 __fastcall FMODAudioEngine::updateTemporaryEffects(FMODAudioEngine *this)
{
__int64 *v2; // x21
__int64 *v3; // x19
__int64 v4; // x20
_QWORD *v6; // x0
__int64 *v7; // x1
__int64 *v8; // x1
void **v9; // x20
int v10; // [xsp+6Ch] [xbp+6Ch]
void *v11; // [xsp+70h] [xbp+70h] BYREF
char v12; // [xsp+80h] [xbp+80h]
v2 = (__int64 *)((char *)this + 360);
v3 = *((__int64 **)this + 52);
while ( v3 )
{
while ( 1 )
{
v4 = std::unordered_map::operator[]((unsigned __int64)v2, v3 + 2);
if ( !*(_DWORD *)(v4 + 36) )
{
*((_DWORD *)this + 134) = FMOD::Sound::getOpenState();
ERRCHECK_fn();
if ( (v10 & 0xFFFFFFFD) == 0 )
break;
}
v3 = (__int64 *)*v3;
LABEL_4:
if ( !v3 )
return _stack_chk_guard;
}
v6 = *((_QWORD **)this + 150);
if ( v6 == *((_QWORD **)this + 151) )
{
std::vector::__push_back_slow_path((__int64)this + 1192, (_QWORD *)v4);
}
else
{
if ( v6 )
{
*v6 = *(_QWORD *)v4;
v6 = *((_QWORD **)this + 150);
}
*((_QWORD *)this + 150) = v6 + 1;
}
v7 = std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::find(
v2,
v4 + 8);
if ( v7 )
std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::erase(
v2,
(char *)v7);
v8 = v3;
v3 = (__int64 *)*v3;
std::__hash_table,std::equal_to,std::allocator>::remove(
(__int64 *)this + 50,
v8,
(__int64)&v11);
v9 = (void **)v11;
v11 = nullptr;
if ( !v9 )
goto LABEL_4;
if ( v12 && ((_BYTE)v9[2] & 1) != 0 )
operator delete(v9[4]);
operator delete(v9);
}
return _stack_chk_guard;
}