//
// MusicDownloadManager::pathForSong from 0x100156138 to 0x1001561d4 (156 bytes)
//
// 17 xrefs:
// > FindBPMLayer::playMusic @ 0x10007e2dc
// > GJGameLevel::getAudioFileName @ 0x1000acc98
// > CustomSongWidget::onPlayback @ 0x1000facb0
// > CustomSongWidget::onPlayback @ 0x1000fad74
// > CustomSongWidget::updatePlaybackBtn @ 0x1000fcbf8
// > CustomSongWidget::deleteSong @ 0x1000fcde8
// > CustomSongCell::onDelete @ 0x1001102dc
// > SongSelectNode::getSongFileName @ 0x100147c1c
// > MusicDownloadManager::isSongDownloaded @ 0x100155ef4
// > MusicDownloadManager::deleteSong @ 0x100156084
// > MusicDownloadManager::onDownloadSongCompleted @ 0x1001568cc
// > SetupSongTriggerPopup::updateSongTimeSlider @ 0x1001c3394
// > SetupSongTriggerPopup::onPlayback @ 0x1001c358c
// > GJBaseGameLayer::activateSongTrigger @ 0x100202e34
// > GJBaseGameLayer::processActivatedAudioTriggers @ 0x100206684
// > GameManager::getMenuMusicFile @ 0x100311f54
// > GameManager::getPracticeMusicFile @ 0x10031201c
//
// 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
//
std::string *__usercall MusicDownloadManager::pathForSong@(__int64 a1@, std::string *a2@)
{
void **v4; // x1
std::string::size_type v5; // x2
const std::string::value_type *v6; // x1
void *__p[2]; // [xsp+8h] [xbp-38h] BYREF
unsigned __int8 v9; // [xsp+1Fh] [xbp-21h]
MusicDownloadManager::pathForSongFolder();
GameToolbox::intToString(a1, __p);
if ( (v9 & 0x80u) == 0 )
v4 = __p;
else
v4 = (void **)__p[0];
if ( (v9 & 0x80u) == 0 )
v5 = v9;
else
v5 = (std::string::size_type)__p[1];
std::string::append(a2, (const std::string::value_type *)v4, v5);
if ( (char)v9 < 0 )
operator delete(__p[0]);
if ( (int)a1 <= 10000000 )
v6 = ".mp3";
else
v6 = ".ogg";
return std::string::append(a2, v6);
}