//
// sub_1005854AC from 0x1005854ac to 0x100585530 (132 bytes)
//
// 3 xrefs:
// > sub_100591E08 @ 0x10059267c
// > sub_1005DEF18 @ 0x1005def88
// > sub_1005DF6A4 @ 0x1005df710
//
// 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 11:08:32 +0000
//
__int64 __fastcall sub_1005854AC(__int64 a1, __int64 a2, __int64 a3, int a4)
{
__int64 v8; // x0
if ( a4 < 0 )
return 31;
if ( a4 )
{
v8 = sub_1005D7660(
*((_QWORD *)off_1009DA5E8 + 54),
(unsigned int)(8 * a4),
"/opt/teamcity-agent/work/570ad728b1678096/core_api/src/fmod_channelpool.cpp",
56,
0);
*(_QWORD *)(a1 + 24) = v8;
if ( !v8 )
return 38;
}
*(_DWORD *)a1 = a4;
*(_QWORD *)(a1 + 8) = a2;
*(_QWORD *)(a1 + 16) = a3;
return 0;
}