//
// sub_4C8C0 from 0x4c8c0 to 0x4c910 (80 bytes)
//
// 3 xrefs:
// > sub_79454 @ 0x79a9a
// > sub_BE9F4 @ 0xbea3e
// > sub_BEEE8 @ 0xbef32
//
// 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_4C8C0(int *a1, int a2, int a3, int a4)
{
int v8; // r0
if ( a4 < 0 )
return 31;
if ( a4 )
{
v8 = sub_BD580(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), 4 * a4, "../../src/fmod_channelpool.cpp", 56, 0);
a1[4] = v8;
if ( !v8 )
return 38;
}
a1[2] = a2;
a1[3] = a3;
*a1 = a4;
return 0;
}