//
// sub_100631C58 from 0x100631c58 to 0x100631cdc (132 bytes)
//
// 3 xrefs:
// > sub_10062F108 @ 0x10062f4c8
// > sub_10062F4DC @ 0x10062f898
// > sub_10062F9AC @ 0x10062fc00
//
// 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:10:28 +0000
//
__int64 __fastcall sub_100631C58(__int64 a1, __int64 a2, int a3)
{
__int16 v5; // w8
__int64 result; // x0
int *v8; // x1
int *v9; // [xsp+8h] [xbp-28h] BYREF
v5 = atomic_load((unsigned int *)(a1 + 100));
if ( (v5 & 0x100) != 0 )
{
*(_QWORD *)(a1 + 544) = a2;
return 0;
}
else
{
result = sub_100564878(*(_QWORD *)(a1 + 168), &v9, 24, a3);
if ( !(_DWORD)result )
{
*(_BYTE *)v9 = 16;
v8 = v9;
*((_QWORD *)v9 + 1) = a1;
*((_QWORD *)v8 + 2) = a2;
return sub_10056491C(*(_QWORD *)(a1 + 168), (__int64)v8, a3);
}
}
return result;
}