//
// sub_C8DD4 from 0xc8dd4 to 0xc8e24 (80 bytes)
//
// 1 xrefs:
// > sub_C8FEC @ 0xc9220
//
// 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 12:14:47 +0000
//
__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;
}