//
// FMOD::Sound::setLoopCount from 0xd9cf8 to 0xd9d84 (140 bytes)
//
// 4 xrefs:
// > FMOD::Sound::setLoopCount @ 0x10733c
// > ??> @ 0x6130
// > FMOD::Sound::setLoopCount @ 0x107334
// > ??> @ 0x110260
//
// 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 12:14:54 +0000
//
__int64 __fastcall FMOD::Sound::setLoopCount(FMOD::Sound *this, unsigned int a2)
{
unsigned int v3; // w21
__int64 v4; // x0
char v5; // w8
__int64 v6; // x0
__int64 v8; // x0
int v9; // w8
char v10; // zf
__int64 v11; // x0
__int64 v12; // x8
_BYTE v13[264]; // [xsp+0h] [xbp-130h] BYREF
v3 = sub_DA3C4(this);
if ( !v3 )
{
v8 = sub_DA368();
if ( !v9 || (v8 = sub_DA358(v8), v10) )
{
v11 = sub_DA608(v8);
v4 = (*(__int64 (__fastcall **)(__int64))(v12 + 296))(v11);
v3 = v4;
if ( !(_DWORD)v4 )
goto LABEL_4;
}
else
{
v3 = 46;
}
}
v4 = sub_DA344();
if ( v5 < 0 )
{
v6 = sub_714EC(v13, 256, a2);
v4 = sub_DA388(v6);
}
LABEL_4:
sub_DA538(v4);
return v3;
}