//
// FMODAudioEngine::isMusicPlaying from 0x140062b10 to 0x140062c4b (315 bytes)
//
// 7 xrefs:
// > CustomSongCell::onDelete @ 0x1401506a1
// > CustomSongWidget::deleteSong @ 0x14016b341
// > CustomSongWidget::onPlayback @ 0x14016bea9
// > CustomSongWidget::updatePlaybackBtn @ 0x14016c232
// > GameManager::playMenuMusic @ 0x140276817
// > GameManager::fadeInMusic @ 0x140276ab4
// > ??> @ 0x140910c04
//
// 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:25:44 +0000
//
// Hidden C++ exception states: #wind=2
_BOOL8 __fastcall FMODAudioEngine::isMusicPlaying(_QWORD *a1, _QWORD *a2)
{
_QWORD *v4; // rax
bool v5; // bl
void *v6; // rcx
int v8; // [rsp+30h] [rbp-58h] BYREF
_BYTE v9[16]; // [rsp+38h] [rbp-50h] BYREF
_QWORD *v10; // [rsp+48h] [rbp-40h]
void *Block[2]; // [rsp+50h] [rbp-38h] BYREF
__m128i si128; // [rsp+60h] [rbp-28h]
v10 = a2;
v8 = 0;
if ( sub_140066B50(a1 + 40, &v8) )
{
v4 = (_QWORD *)sub_140068620(a1 + 40, v9, &v8);
sub_14003F4F0((__int64)Block, *v4 + 40LL);
}
else
{
*(_OWORD *)Block = 0;
si128 = _mm_load_si128((const __m128i *)&Size);
LOBYTE(Block[0]) = 0;
}
v8 = 3;
v5 = !sub_14003D160(Block, a2) && FMODAudioEngine::isMusicPlaying_1(a1, 0);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v6 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v6 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v6);
}
sub_14003D310((__int64)a2);
return v5;
}