//
// sub_1004A731C from 0x1004a731c to 0x1004a73b8 (156 bytes)
//
// 4 xrefs:
// > FMOD::DSP::getNumOutputs @ 0x100484fa4
// > sub_10049A0EC @ 0x10049a1f8
// > sub_1004D3474 @ 0x1004d3740
// > sub_1004D382C @ 0x1004d39d4
//
// 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_1004A731C(__int64 a1, _DWORD *a2, int a3, int a4)
{
__int64 v7; // x8
__int64 result; // x0
__int64 v9; // x8
if ( !a2 )
return 31;
if ( a4 )
{
sub_10043E2C8(*(_QWORD *)(a1 + 168), 1);
sub_100442B5C(*(_QWORD *)(a1 + 168), 1u);
v7 = 418;
if ( a3 )
v7 = 422;
*a2 = *(__int16 *)(a1 + v7);
sub_100442B7C(*(_QWORD *)(a1 + 168), 1u);
return 0;
}
else
{
result = 0;
v9 = 418;
if ( a3 )
v9 = 422;
*a2 = *(__int16 *)(a1 + v9);
}
return result;
}