//
// __cxa_guard_release from 0xccd118 to 0xccd188 (112 bytes)
//
// 16 xrefs:
// > cocos2d::CCCallFuncND::getClassTypeInfo @ 0xabd710
// > cocos2d::CCCallFuncO::getClassTypeInfo @ 0xabd7c0
// > cocos2d::CCCallFuncN::getClassTypeInfo @ 0xabd870
// > cocos2d::CCDirector::getClassTypeInfo @ 0xad5abc
// > cocos2d::CCFileUtils::getClassTypeInfo @ 0xb04880
// > cocos2d::CCEGLView::sharedOpenGLView @ 0xb0aa58
// > cocos2d::CCImage::initWithString @ 0xb0d67c
// > cocos2d::CCImage::initWithStringShadowStroke @ 0xb0daf0
// > Java_org_cocos2dx_lib_Cocos2dxBitmap_nativeInitBitmapDC @ 0xb0dd58
// > cocos2d::CCIMEDispatcher::sharedDispatcher @ 0xb2fba8
// > sub_CCBA98 @ 0xccbae8
// > sub_CEA7E4 @ 0xcea8b0
// > sub_CEBD04 @ 0xcebe1c
// > sub_CEBFFC @ 0xcec0f4
// > sub_D1461C @ 0xd14660
// > ??> @ 0xa1640
//
// 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 _cxa_guard_release(__guard *a1)
{
unsigned int v1; // w4
if ( &pthread_create )
{
do
v1 = __ldaxr((unsigned int *)a1);
while ( __stlxr(1u, (unsigned int *)a1) );
if ( (v1 & 0x10000) != 0 )
syscall(98, a1, 1, 0x7FFFFFFF);
}
else
{
*((_BYTE *)a1 + 1) = 0;
*(_BYTE *)a1 = 1;
}
}