//
// sub_5D1CC from 0x5d1cc to 0x5d26c (160 bytes)
//
// 1 xrefs:
// > sub_54DB0 @ 0x54f08
//
// 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 12:13:52 +0000
//
__int64 __fastcall sub_5D1CC(__int64 a1, __int64 a2)
{
__int64 result; // x0
__int64 v5; // [xsp+0h] [xbp-20h] BYREF
__int64 v6; // [xsp+8h] [xbp-18h] BYREF
if ( *(_QWORD *)(a1 + 336) )
{
if ( (unsigned int)FMOD::ChannelI::validate(a2, &v6, 0) )
{
if ( !(unsigned int)sub_579DC(a2, &v5, nullptr) && *(_DWORD *)(v5 + 544) == 1 )
{
result = v5 + 520;
*(_DWORD *)(v5 + 544) = 2;
return result;
}
}
else
{
result = *(_QWORD *)(a1 + 336) + ((__int64)*(int *)(v6 + 464) << 6);
if ( *(_DWORD *)(result + 24) == 1 )
{
*(_DWORD *)(result + 24) = 2;
return result;
}
}
}
return 0;
}