//
// sub_10053CBE8 from 0x10053cbe8 to 0x10053cc94 (172 bytes)
//
// 1 xrefs:
// > sub_10053A8A4 @ 0x10053abc0
//
// 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_10053CBE8(__int64 a1, __int64 a2)
{
__int64 v2; // x19
__int64 v5; // x0
v2 = a2;
if ( (int)a2 < 1 )
{
if ( sub_100539D94(a1) )
{
if ( (sub_10053ED1C(a1) & 0x3000) != 0 || *(_DWORD *)(a1 + 668) )
return sub_100539B8C(a1);
v5 = sub_10053E838(a1);
sub_1005DA61C(v5, 1);
}
}
else
{
fprintf(__stderrp, "invalid state reached %s:%d", "d1_both.c", 1056);
return 1;
}
return v2;
}