//
// sub_10036FFE4 from 0x10036ffe4 to 0x100370070 (140 bytes)
//
// 1 xrefs:
// > ??> @ 0x1009318e0
//
// 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:03:22 +0000
//
__int64 __fastcall sub_10036FFE4(__int64 a1, __int64 a2)
{
__int64 result; // x0
int v4; // w8
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
if ( (unsigned int)result <= 0x34 )
{
if ( ((1LL << result) & 0x3C0) != 0 )
{
v4 = 3;
}
else if ( ((1LL << result) & 0x14000000000C00LL) != 0 )
{
v4 = 1;
}
else
{
if ( ((1LL << result) & 0x3000) == 0 )
return result;
v4 = 2;
}
*(_DWORD *)(*(_QWORD *)(a1 + 120) + 548LL) = v4;
}
return result;
}