//
// sub_54B70 from 0x54b70 to 0x54bec (124 bytes)
//
// 1 xrefs:
// > ??> @ 0x10c398
//
// 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:48 +0000
//
__int64 __fastcall sub_54B70(__int64 a1, unsigned int a2)
{
__int64 result; // x0
char v5; // w8
if ( !*(_QWORD *)(a1 + 192) )
return 30;
result = ((__int64 (*)(void))loc_52624)();
if ( !(_DWORD)result )
{
result = (*(__int64 (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 40) + 296LL))(*(_QWORD *)(a1 + 40), a2);
if ( !(_DWORD)result )
{
v5 = atomic_load((unsigned int *)(*(_QWORD *)(a1 + 40) + 88LL));
if ( (v5 & 0x80) == 0 )
return 0;
result = (*(__int64 (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 192) + 152LL))(*(_QWORD *)(a1 + 192), a2);
if ( !(_DWORD)result )
return 0;
}
}
return result;
}