//
// FMODAudioEngine::registerChannel from 0x3ed344 to 0x3ed3fc (184 bytes)
//
// 2 xrefs:
// > FMODAudioEngine::loadMusic @ 0x3efc26
// > FMODAudioEngine::playEffectAdvanced @ 0x3f1008
//
// 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:10 +0000
//
void *__fastcall FMODAudioEngine::registerChannel(FMODAudioEngine *this, FMOD::Channel *a2, void *a3, unsigned int a4)
{
_DWORD *v6; // r0
_DWORD *v7; // r0
void **v8; // r0
unsigned int v10; // [sp+0h] [bp-18h] BYREF
void *v11[2]; // [sp+4h] [bp-14h] BYREF
int v12; // [sp+Ch] [bp-Ch] BYREF
int v13; // [sp+10h] [bp-8h] BYREF
v10 = a4;
v11[0] = a3;
if ( !a3 )
v11[0] = (void *)FMODAudioEngine::getNextChannelID(this);
FMOD::ChannelControl::setUserData(a2, v11[0]);
*std::unordered_map::operator[]((int)this + 768, (unsigned int *)v11) = a2;
v12 = 0;
FMOD::ChannelControl::getVolume(a2, (float *)&v12);
v6 = std::unordered_map::operator[]((int)this + 468, (unsigned int *)v11);
*v6 = v12;
*std::unordered_map::operator[]((int)this + 488, (unsigned int *)v11) = 1065353216;
v13 = 0;
FMOD::ChannelControl::getPitch(a2, (float *)&v13);
v7 = std::unordered_map::operator[]((int)this + 508, (unsigned int *)v11);
*v7 = v13;
if ( v10 )
{
*std::unordered_map::operator[]((int)this + 812, (unsigned int *)v11) = v10;
v8 = (void **)std::unordered_map::operator[]((int)this + 832, &v10);
*v8 = v11[0];
}
return v11[0];
}