//
// FMOD::Sound::getLoopCount from 0x1005e720c to 0x1005e7308 (252 bytes)
//
// 1 xrefs:
// > sub_10057934C @ 0x100579350
//
// 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:09:43 +0000
//
__int64 __fastcall FMOD::Sound::getLoopCount(__int64 a1, __int64 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_1005E9E48(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 *, __int64))(*(_QWORD *)v13 + 304LL))(v13, a2);
if ( !(_DWORD)v9 )
return v9;
}
}
if ( (*((_BYTE *)off_1009DA5E8 + 32) & 0x80) != 0 )
{
sub_10055C214((int)v14, 0x100u, a2, v4, v5, v6, v7, v8);
sub_1005AAA04(v9, 5, a1, (__int64)"Sound::getLoopCount", (__int64)v14);
}
return v9;
}