//
// MusicDownloadManager::pathForSong from 0x14033f4d0 to 0x14033f57d (173 bytes)
//
// 21 xrefs:
// > FindBPMLayer::playMusic @ 0x14009bd3b
// > CustomSongCell::onDelete @ 0x1400b492a
// > CustomSongCell::onDelete @ 0x1400b4a0c
// > SongSelectNode::getSongFileName @ 0x1400c7e18
// > CustomSongWidget::deleteSong @ 0x1400ca06a
// > CustomSongWidget::deleteSong @ 0x1400ca14c
// > CustomSongWidget::onPlayback @ 0x1400caf31
// > CustomSongWidget::onPlayback @ 0x1400cb1c1
// > CustomSongWidget::updatePlaybackBtn @ 0x1400cb2f3
// > GJGameLevel::getAudioFileName @ 0x14016cf2b
// > GameManager::getMenuMusicFile @ 0x14017b785
// > GJBaseGameLayer::activateSongTrigger @ 0x140241862
// > GJBaseGameLayer::processActivatedAudioTriggers @ 0x140243ad4
// > GJSongBrowser::FLAlert_Clicked @ 0x1402b7bb4
// > MusicDownloadManager::onDownloadSongCompleted @ 0x14033edb0
// > MusicDownloadManager::onDownloadSongCompleted @ 0x14033ef03
// > MusicDownloadManager::isSongDownloaded @ 0x14033f2a4
// > PlayLayer::togglePracticeMode @ 0x1403b9fbd
// > SetupSongTriggerPopup::init @ 0x14045d3a5
// > SetupSongTriggerPopup::onPlayback @ 0x14045d86e
// > ??> @ 0x1406d56e4
//
// 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
//
// Hidden C++ exception states: #wind=2
_QWORD *__fastcall MusicDownloadManager::pathForSong(__int64 a1, _QWORD *a2, int a3)
{
void **v5; // rax
void *v6; // rdx
char *v7; // rdx
_QWORD v9[4]; // [rsp+30h] [rbp-38h] BYREF
MusicDownloadManager::pathForSongFolder(a1, a2, a3);
v5 = (void **)GameToolbox::intToString(v9, a3);
v6 = v5;
if ( (unsigned __int64)v5[3] > 0xF )
v6 = *v5;
sub_140041270(a2, v6, (size_t)v5[2]);
sub_14003A830((__int64)v9);
v7 = ".ogg";
if ( a3 <= 10000000 )
v7 = ".mp3";
sub_140041270(a2, v7, 4u);
return a2;
}