//
// sub_F85B50 from 0xf85b50 to 0xf85c1c (204 bytes)
//
// 1 xrefs:
// > ??> @ 0x1535da0
//
// 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 13:13:52 +0000
//
__int64 __fastcall sub_F85B50(__int64 a1, int a2)
{
unsigned __int8 v3; // w8
char *v4; // x0
unsigned __int8 v5; // w8
if ( a2 < 4096 )
{
v5 = atomic_load((unsigned __int8 *)&byte_1565E78);
if ( (v5 & 1) == 0 && _cxa_guard_acquire((__guard *)&byte_1565E78) )
{
qword_1565E70 = (__int64)&off_1535D28;
v4 = &byte_1565E78;
goto LABEL_8;
}
}
else
{
v3 = atomic_load((unsigned __int8 *)&byte_1565E88);
if ( (v3 & 1) == 0 && _cxa_guard_acquire((__guard *)&byte_1565E88) )
{
qword_1565E80 = (__int64)&off_1535D88;
v4 = &byte_1565E88;
LABEL_8:
_cxa_guard_release((__guard *)v4);
}
}
return (unsigned int)a2;
}