//
// FMOD::Sound::getMode from 0x1004c0e98 to 0x1004c0f94 (252 bytes)
//
// 1 xrefs:
// > sub_1004531C4 @ 0x1004531c8
//
// 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
//
FMOD_RESULT __fastcall FMOD::Sound::getMode(FMOD::Sound *a1, unsigned int *a2)
{
int v4; // w3
int v5; // w4
int v6; // w5
int v7; // w6
int v8; // w7
__int64 v9; // x21
unsigned int v10; // w8
unsigned int v11; // w8
unsigned int *v13; // [xsp+0h] [xbp-130h] BYREF
_BYTE v14[256]; // [xsp+8h] [xbp-128h] BYREF
v9 = sub_1004C3CE0(a1, &v13, 0);
if ( !(_DWORD)v9 )
{
v10 = atomic_load(v13 + 68);
if ( v10 && (v11 = atomic_load(v13 + 68), v11 != 7) )
{
v9 = 46;
}
else
{
v9 = (*(__int64 (__fastcall **)(unsigned int *, unsigned int *))(*(_QWORD *)v13 + 288LL))(v13, a2);
if ( !(_DWORD)v9 )
return (unsigned int)v9;
}
}
if ( (*((_BYTE *)off_1008524C8 + 32) & 0x80) != 0 )
{
sub_1004360EC((int)v14, 0x100u, (__int64)a2, v4, v5, v6, v7, v8);
sub_10048489C(v9, 5, (__int64)a1, (__int64)"Sound::getMode", (__int64)v14);
}
return (unsigned int)v9;
}