//
// sub_C8DD4 from 0xc8dd4 to 0xc8e24 (80 bytes)
//
// 1 xrefs:
// > sub_C8FEC @ 0xc9220
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_C8DD4(__int64 a1, __int64 a2)
{
__int64 v2; // x19
unsigned int *v3; // x20
int v4; // w8
unsigned int v5; // w8
unsigned int v6; // w8
v3 = (unsigned int *)(a2 + 92);
atomic_load((unsigned int *)(a2 + 92));
sub_CD4C4();
if ( (v4 & 0x80000) == 0 )
sub_C8E24(v2);
v5 = atomic_load(v3);
if ( (v5 & 0x40000) == 0 )
{
do
v6 = __ldaxr(v3);
while ( __stlxr(v6 | 0x40000, v3) );
++*(_DWORD *)(v2 + 60);
}
return 0;
}