//
// FMODAudioEngine::stopAllMusic from 0x1001b5a18 to 0x1001b5ae8 (208 bytes)
//
// 30 xrefs:
// > LevelInfoLayer::onPlay @ 0x100029e4c
// > sub_1000859AC @ 0x1000859c4
// > EditLevelLayer::onPlay @ 0x10011044c
// > OptionsLayer::onMenuMusic @ 0x100113808
// > sub_10011F910 @ 0x10011f9d8
// > sub_10011F910 @ 0x10011f9f4
// > CustomSongWidget::deleteSong @ 0x1001216f0
// > CustomSongCell::onDelete @ 0x100137b04
// > PlayLayer::resetLevelFromStart @ 0x10014b0ac
// > PlayLayer::playPracticeMusic @ 0x10014c340
// > PlayLayer::resumeAndRestart @ 0x10014c56c
// > FMODAudioEngine::clearAllAudio @ 0x1001b58d0
// > CustomSongLayer::onClose @ 0x1001c3148
// > CustomSongLayer::onCreateLines @ 0x1001c3278
// > CustomSongLayer::onSearch @ 0x1001c32ec
// > SongOptionsLayer::onPlayback @ 0x1001c448c
// > GJShopLayer::dialogClosed @ 0x1001cbf64
// > GauntletSelectLayer::playUnlockAnimation @ 0x100255c30
// > SetupSongTriggerPopup::onPlayback @ 0x100258ff8
// > SetupSongTriggerPopup::valueDidChange @ 0x1002591f0
// > SetupSongTriggerPopup::onClose @ 0x10025930c
// > GJSongBrowser::exitLayer @ 0x100302ec8
// > EndLevelLayer::onEdit @ 0x100393d20
// > GameManager::playMenuMusic @ 0x1003aede4
// > GameManager::fadeInMenuMusic @ 0x1003af02c
// > LevelEditorLayer::init @ 0x1003f67c4
// > sub_100404308 @ 0x100404318
// > LevelEditorLayer::onStopPlaytest @ 0x10040557c
// > sub_10044F4FC @ 0x10044f514
// > LevelPage::onPlay @ 0x100484424
//
// 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 11:00:10 +0000
//
void __fastcall FMODAudioEngine::stopAllMusic(_QWORD *a1, int a2)
{
__int64 v3; // x0
int *v4; // x20
int *v5; // x20
int *v6; // x21
__int64 *v7; // x0
int *v8; // [xsp+8h] [xbp-38h] BYREF
int *v9; // [xsp+10h] [xbp-30h]
__int64 v10; // [xsp+18h] [xbp-28h]
if ( a2 )
{
v3 = a1[60];
if ( v3 )
FMOD::ChannelControl::stop(v3);
sub_100018AA8(a1 + 113);
sub_100018AA8(a1 + 118);
sub_100018AA8(a1 + 123);
}
else
{
v8 = nullptr;
v9 = nullptr;
v10 = 0;
v4 = (int *)a1[42];
if ( v4 )
{
do
{
if ( (*((_BYTE *)v4 + 65) & 1) == 0 )
sub_10000D038((__int64)&v8, v4 + 6);
v4 = *(int **)v4;
}
while ( v4 );
v5 = v8;
v6 = v9;
if ( v8 != v9 )
{
do
{
v7 = FMODAudioEngine::channelForChannelID((__int64)a1, *v5);
if ( v7 )
FMOD::ChannelControl::stop(v7);
++v5;
}
while ( v5 != v6 );
v5 = v8;
}
if ( v5 )
{
v9 = v5;
operator delete(v5);
}
}
}
}