//
// FMOD::ChannelControl::stop from 0x100503050 to 0x10050311c (204 bytes)
//
// 10 xrefs:
// > FMODAudioEngine::stopAllEffects @ 0x100138c50
// > FMODAudioEngine::stopAllEffects @ 0x100138c60
// > FMODAudioEngine::stopAllEffects @ 0x100138c80
// > FMODAudioEngine::stopAllMusic @ 0x100138d08
// > FMODAudioEngine::stopAllMusic @ 0x100138d7c
// > FMODAudioEngine::stopChannel @ 0x10013c46c
// > FMODAudioEngine::stopChannel_1 @ 0x10013c578
// > FMODAudioEngine::stopAndRemoveMusic @ 0x10013e7b4
// > sub_100453294 @ 0x100453298
// > sub_1004538E8 @ 0x1004538ec
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
FMOD_RESULT __fastcall FMOD::ChannelControl::stop(FMOD::ChannelControl *a1)
{
__int64 v2; // x19
__int64 v4; // [xsp+8h] [xbp-138h] BYREF
__int64 v5; // [xsp+10h] [xbp-130h] BYREF
_BYTE v6[256]; // [xsp+18h] [xbp-128h] BYREF
v4 = 0;
v2 = sub_1005088AC(a1, &v5, &v4);
if ( (_DWORD)v2 || (v2 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 8LL))(v5), (_DWORD)v2) )
{
if ( (*((_BYTE *)off_1008524C8 + 32) & 0x80) != 0 )
{
v6[0] = 0;
sub_10048489C(v2, 4, (__int64)a1, (__int64)"ChannelControl::stop", (__int64)v6);
}
}
if ( v4 )
sub_100442D80(v4);
return (unsigned int)v2;
}