//
// sub_10057EB50 from 0x10057eb50 to 0x10057ebe0 (144 bytes)
//
// 1 xrefs:
// > ??> @ 0x1009aaf18
//
// 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:28 +0000
//
__int64 __fastcall sub_10057EB50(__int64 a1, __int64 a2)
{
__int64 v4; // x19
__int64 v5; // x22
v4 = *(_QWORD *)(a1 + 8);
if ( v4 )
sub_100568CC4(*(_QWORD *)(a1 + 8), 8u);
v5 = sub_10057C524(a1, a2);
if ( !(_DWORD)v5 )
{
if ( (*(_BYTE *)(a1 + 61) & 0x40) != 0 )
{
v5 = 0;
if ( !v4 )
return v5;
goto LABEL_7;
}
v5 = (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 192) + 88LL))(*(_QWORD *)(a1 + 192), a2);
}
if ( v4 )
LABEL_7:
sub_100568CE4(v4, 8u);
return v5;
}