//
// sub_54A54 from 0x54a54 to 0x54ad8 (132 bytes)
//
// 1 xrefs:
// > ??> @ 0x10c3e0
//
// 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_54A54(__int64 a1, _DWORD *a2, char a3)
{
__int64 result; // x0
int v6; // w8
int v7; // [xsp+8h] [xbp-8h] BYREF
if ( !a2 || !*(_QWORD *)(a1 + 40) )
return 31;
if ( (a3 & 2) != 0 )
{
v6 = *(_DWORD *)(a1 + 76);
result = 0;
LABEL_8:
*a2 = v6;
return result;
}
if ( (a3 & 0x10) == 0 )
return sub_67040();
result = *(_QWORD *)(a1 + 192);
if ( !result )
{
v6 = *(_DWORD *)(a1 + 72);
goto LABEL_8;
}
result = (*(__int64 (__fastcall **)(__int64, int *))(*(_QWORD *)result + 136LL))(result, &v7);
if ( !(_DWORD)result )
{
v6 = v7;
goto LABEL_8;
}
return result;
}