//
// FindBPMLayer::playMusic from 0x1401351a0 to 0x14013526f (207 bytes)
//
// 2 xrefs:
// > ??> @ 0x140736588
// > ??> @ 0x1409170cc
//
// This function is hookable on this platform (idp: pc, 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:27:04 +0000
//
// Hidden C++ exception states: #wind=3
void __fastcall FindBPMLayer::playMusic(__int64 a1)
{
__int64 v2; // rcx
__int64 v3; // rdi
_QWORD *v4; // rcx
_BYTE v5[40]; // [rsp+20h] [rbp-28h] BYREF
void *v6; // [rsp+58h] [rbp+10h]
void *v7; // [rsp+58h] [rbp+10h]
v2 = qword_14090C070;
if ( !qword_14090C070 )
{
v6 = operator new(0x3D0u);
qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v6);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);
v2 = qword_14090C070;
}
v3 = MusicDownloadManager::pathForSong(v2, v5, *(unsigned int *)(a1 + 768));
v4 = (_QWORD *)qword_14090BF60;
if ( !qword_14090BF60 )
{
v7 = operator new(0x8A8u);
qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v7);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);
v4 = (_QWORD *)qword_14090BF60;
}
FMODAudioEngine::loadAndPlayMusic(v4, v3, (int)(float)(*(float *)(a1 + 720) * 1000.0));
}