//
// FMODAudioEngine::unloadAllEffects from 0x6ce8b8 to 0x6ce9e8 (304 bytes)
//
// 4 xrefs:
// > PlayLayer::onQuit @ 0x703710
// > EditorPauseLayer::playStep2 @ 0x8b6324
// > EditorPauseLayer::onExitEditor @ 0x8b6e3c
// > ??> @ 0x60ee0
//
// 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:26 +0000
//
__int64 __fastcall FMODAudioEngine::unloadAllEffects(FMODAudioEngine *this)
{
__int64 i; // x19
_QWORD *v3; // x0
__int64 *v4; // x1
void **v5; // x26
void *v7; // [xsp+50h] [xbp+50h] BYREF
char v8; // [xsp+60h] [xbp+60h]
FMODAudioEngine::stopAllEffects((FMOD::ChannelControl **)this);
for ( i = *((_QWORD *)this + 47);
i;
i = std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::erase(
(__int64 *)this + 45,
(char *)i) )
{
while ( *(_BYTE *)(i + 84) )
{
i = *(_QWORD *)i;
if ( !i )
goto LABEL_12;
}
v3 = *((_QWORD **)this + 150);
if ( v3 == *((_QWORD **)this + 151) )
{
std::vector::__push_back_slow_path((__int64)this + 1192, (_QWORD *)(i + 40));
}
else
{
if ( v3 )
{
*v3 = *(_QWORD *)(i + 40);
v3 = *((_QWORD **)this + 150);
}
*((_QWORD *)this + 150) = v3 + 1;
}
v4 = std::__hash_table,std::equal_to,std::allocator>::find(
(_QWORD *)this + 50,
i + 16);
if ( v4 )
{
std::__hash_table,std::equal_to,std::allocator>::remove(
(__int64 *)this + 50,
v4,
(__int64)&v7);
v5 = (void **)v7;
v7 = nullptr;
if ( v5 )
{
if ( v8 && ((_BYTE)v5[2] & 1) != 0 )
operator delete(v5[4]);
operator delete(v5);
}
}
}
LABEL_12:
dword_155C250 = 0;
return _stack_chk_guard;
}