//
// sub_1005CD8BC from 0x1005cd8bc to 0x1005cd970 (180 bytes)
//
// 1 xrefs:
// > sub_10062F4DC @ 0x10062f70c
//
// 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:09:29 +0000
//
__int64 __fastcall sub_1005CD8BC(__int64 a1, __int64 a2, int a3)
{
__int16 v5; // w8
__int64 result; // x0
int *v8; // x1
int *v9; // [xsp+8h] [xbp-28h] BYREF
if ( !*(_QWORD *)(a1 + 168) )
return 0;
if ( !a2 )
return 31;
v5 = atomic_load((unsigned int *)(a1 + 100));
if ( (v5 & 0x100) != 0 )
return sub_1005CD1D0(a1, a2, 0);
result = sub_100564878(*(_QWORD *)(a1 + 168), &v9, 24, a3);
if ( !(_DWORD)result )
{
*(_BYTE *)v9 = 6;
v8 = v9;
*((_QWORD *)v9 + 1) = a1;
*((_QWORD *)v8 + 2) = a2;
return sub_10056491C(*(_QWORD *)(a1 + 168), (__int64)v8, a3);
}
return result;
}