//
// FMODAudioEngine::saveAudioState from 0x3f05cc to 0x3f06c8 (252 bytes)
//
// 1 xrefs:
// > PlayLayer::createCheckpoint @ 0x411cac
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:47:13 +0000
//
int __fastcall FMODAudioEngine::saveAudioState(int *a1, int a2)
{
_DWORD *i; // r7
_DWORD *v5; // r0
unsigned __int64 *v6; // r8
_DWORD *v7; // r4
FMOD::Channel *v8; // r0
FMOD::ChannelControl *v9; // r6
int v11; // [sp+10h] [bp+0h] BYREF
FMOD_System_LockDSP();
for ( i = (_DWORD *)a1[194]; i; i = (_DWORD *)*i )
{
v11 = i[2];
if ( std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::find(
a1 + 177,
(unsigned int *)&v11) )
{
v5 = std::unordered_map::operator[]((int)(a1 + 177), (unsigned int *)&v11);
v6 = (unsigned __int64 *)*((unsigned __int8 *)v5 + 156);
v7 = v5;
if ( !*((_BYTE *)v5 + 156) )
{
v8 = (FMOD::Channel *)FMODAudioEngine::channelForChannelID((FMODAudioEngine *)a1, v11);
v9 = v8;
if ( v8 )
{
FMOD::Channel::getLoopPoints(v8, v7 + 24, 1u, v7 + 25, 1u);
FMOD::ChannelControl::getDSPClock(v9, v6, (unsigned __int64 *)v7 + 11);
FMOD::Channel::getPosition(v9, v7 + 26, 1u);
FMOD_Channel_GetFadePoints();
if ( v7[8] )
FMOD_Channel_GetFadePoints();
FMOD_Channel_GetDelay();
}
}
}
}
FMODAudioState::operator=(a2, a1 + 106);
std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::clear(a2 + 244);
return FMOD_System_UnlockDSP();
}