//
// sub_AAB2AC from 0xaab2ac to 0xaab380 (212 bytes)
//
// 1 xrefs:
// > ??> @ 0x111c108
//
// 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
//
void __fastcall sub_AAB2AC(_QWORD *a1)
{
unsigned int *v2; // x20
unsigned int *v3; // x0
unsigned int v4; // w1
unsigned int v5; // w0
unsigned int v6; // w0
unsigned int *v7; // x1
v2 = (unsigned int *)a1[2];
*a1 = algn_11FAE30;
if ( v2 )
{
if ( &pthread_create )
{
v3 = v2 + 2;
do
v4 = __ldaxr(v3);
while ( __stlxr(v4 - 1, v3) );
if ( v4 != 1 )
goto LABEL_6;
(*(void (__fastcall **)(unsigned int *))(*(_QWORD *)v2 + 16LL))(v2);
v7 = v2 + 3;
do
v6 = __ldaxr(v7);
while ( __stlxr(v6 - 1, v7) );
}
else
{
v5 = v2[2];
v2[2] = v5 - 1;
if ( v5 != 1 )
goto LABEL_6;
(*(void (__fastcall **)(unsigned int *))(*(_QWORD *)v2 + 16LL))(v2);
v6 = v2[3];
v2[3] = v6 - 1;
}
if ( v6 == 1 )
(*(void (__fastcall **)(unsigned int *))(*(_QWORD *)v2 + 24LL))(v2);
}
LABEL_6:
operator delete(a1);
}