//
// sub_58984 from 0x58984 to 0x589c4 (64 bytes)
//
// 2 xrefs:
// > sub_588B4 @ 0x588f0
// > FMOD::ChannelGroup::getChannel @ 0xd2470
//
// 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:13:50 +0000
//
__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;
}