//
// SongInfoLayer::onBPM from 0x140636750 to 0x1406367f6 (166 bytes)
//
// 2 xrefs:
// > SongInfoLayer::init @ 0x140635031
// > ??> @ 0x140930c50
//
// 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:35:30 +0000
//
__int64 __fastcall SongInfoLayer::onBPM(__int64 a1)
{
_QWORD *v2; // rbx
__int64 v3; // rcx
unsigned int *v4; // rax
void *v6; // [rsp+30h] [rbp+8h]
v2 = (_QWORD *)qword_14090BF60;
if ( !qword_14090BF60 )
{
v6 = operator new(0x8A8u);
qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v6);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);
v2 = (_QWORD *)qword_14090BF60;
}
v3 = v2[69];
if ( v3 )
FMOD::ChannelControl::stop(v3);
sub_14003EB60(v2 + 137);
sub_14003EB60(v2 + 145);
sub_14003EB60(v2 + 153);
v4 = FindBPMLayer::create(*(_DWORD *)(a1 + 728));
return (*(__int64 (__fastcall **)(unsigned int *))(*(_QWORD *)v4 + 1064LL))(v4);
}