//
// sub_1005D29AC from 0x1005d29ac to 0x1005d2a60 (180 bytes)
//
// 1 xrefs:
// > ??> @ 0x1009abaa8
//
// 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:09:32 +0000
//
__int64 __fastcall sub_1005D29AC(__int64 a1, __int64 a2, __int64 a3)
{
__int64 (__fastcall *v4)(__int64, __int64, __int64, _QWORD); // x9
__int64 result; // x0
v4 = *(__int64 (__fastcall **)(__int64, __int64, __int64, _QWORD))(a1 + 504);
if ( !v4
&& (v4 = *(__int64 (__fastcall **)(__int64, __int64, __int64, _QWORD))(*(_QWORD *)(a1 + 408) + 70120LL)) == nullptr
|| (result = v4(a2, a3, a1 + 552, *(_QWORD *)(a1 + 560)), !(_DWORD)result) )
{
result = (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 64LL))(a1, 0);
if ( (_DWORD)result == 14 )
{
result = 0;
*(_DWORD *)(a1 + 404) &= ~1u;
}
}
*(_QWORD *)(a1 + 496) = 0;
if ( *(_QWORD *)(a1 + 536) || !*(_QWORD *)(a1 + 520) && *(_QWORD *)(*(_QWORD *)(a1 + 408) + 70152LL) )
return sub_1005DBE70(a1 + 496);
return result;
}