//
// MusicDownloadManager::pathForSong from 0x1001d4bc0 to 0x1001d4c5c (156 bytes)
//
// 17 xrefs:
// > FindBPMLayer::playMusic @ 0x100086a90
// > GJGameLevel::getAudioFileName @ 0x1000cf204
// > sub_10011F910 @ 0x10011f95c
// > sub_10011F910 @ 0x10011fa20
// > sub_10012138C @ 0x1001213d8
// > CustomSongWidget::deleteSong @ 0x1001216c4
// > CustomSongCell::onDelete @ 0x100137ad8
// > SongSelectNode::getSongFileName @ 0x1001c6520
// > MusicDownloadManager::isSongDownloaded @ 0x1001d497c
// > MusicDownloadManager::deleteSong @ 0x1001d4b0c
// > MusicDownloadManager::onDownloadSongCompleted @ 0x1001d5354
// > SetupSongTriggerPopup::updateSongTimeSlider @ 0x100258ed0
// > SetupSongTriggerPopup::onPlayback @ 0x1002590c8
// > GJBaseGameLayer::activateSongTrigger @ 0x10029fbb4
// > GJBaseGameLayer::processActivatedAudioTriggers @ 0x1002a3764
// > GameManager::getMenuMusicFile @ 0x1003aec68
// > GameManager::getPracticeMusicFile @ 0x1003aed30
//
// 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:24 +0000
//
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);
}