//
// sub_100459938 from 0x100459938 to 0x1004599c4 (140 bytes)
//
// 11 xrefs:
// > FMOD::ChannelGroup::release @ 0x100459178
// > FMOD::ChannelGroup::addGroup @ 0x100459250
// > FMOD::ChannelGroup::getNumGroups @ 0x100459370
// > FMOD::ChannelGroup::getGroup @ 0x100459454
// > FMOD::ChannelGroup::getParentGroup @ 0x100459570
// > FMOD::ChannelGroup::getName @ 0x100459654
// > FMOD::ChannelGroup::getNumChannels @ 0x100459770
// > FMOD::ChannelGroup::getChannel @ 0x100459854
// > sub_1004AE278 @ 0x1004ae2bc
// > sub_1004AE3C4 @ 0x1004ae404
// > sub_1005088AC @ 0x1005088b0
//
// 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_100459938(__int64 a1, _QWORD *a2, __int64 *a3)
{
__int64 result; // x0
__int64 v6; // x20
if ( !a2 )
return 31;
*a2 = a1;
result = 30;
if ( a1 && (a1 & 3) == 0 )
{
if ( *(_DWORD *)(a1 + 472) == -899895835 )
{
if ( a3 )
{
v6 = *(_QWORD *)(a1 + 8);
result = 28;
if ( v6 && !*a3 )
{
result = sub_100442CFC(v6);
if ( !(_DWORD)result )
*a3 = v6;
}
}
else
{
return 0;
}
}
else
{
return 30;
}
}
return result;
}