//
// sub_58984 from 0x58984 to 0x589c4 (64 bytes)
//
// 2 xrefs:
// > sub_588B4 @ 0x588f0
// > FMOD::ChannelGroup::getChannel @ 0xd2470
//
// 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
//
__int64 __fastcall sub_58984(__int64 a1, int a2, _QWORD *a3)
{
int v3; // w9
_QWORD *v4; // x10
if ( a3 )
{
v3 = a2 + 1;
v4 = (_QWORD *)(a1 + 424);
*a3 = 0;
while ( 1 )
{
v4 = (_QWORD *)*v4;
if ( v4 == (_QWORD *)(a1 + 424) )
break;
if ( !--v3 )
{
*a3 = *(_QWORD *)(v4[2] + 80LL);
return 0;
}
}
}
return 31;
}