//
// sub_A7620 from 0xa7620 to 0xa7654 (52 bytes)
//
// 14 xrefs:
// > sub_49B08 @ 0x49bf0
// > sub_49D8C @ 0x49ebc
// > sub_49D8C @ 0x49ede
// > sub_4A360 @ 0x4a400
// > sub_536F8 @ 0x53792
// > sub_6CE5C @ 0x6ce8c
// > sub_753C4 @ 0x77268
// > sub_753C4 @ 0x772ee
// > sub_79454 @ 0x79a48
// > sub_7AB38 @ 0x7b3be
// > sub_838A4 @ 0x84626
// > sub_87B50 @ 0x88874
// > FMOD::DSP::setChannelFormat @ 0xb142c
// > sub_B3BF8 @ 0xb3c6c
//
// 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
//
int __fastcall sub_A7620(int a1, int a2, unsigned int a3, int a4)
{
__int16 v5; // r5
if ( a3 > 0x20 )
return 31;
v5 = a3;
if ( !a3 || a4 )
{
*(_DWORD *)(a1 + 144) = a4;
if ( !a3 )
{
if ( a4 )
v5 = sub_537B4(a4);
}
}
else
{
sub_58478(a3);
}
*(_WORD *)(a1 + 192) = v5;
return 0;
}