//
// sub_8A26E8 from 0x8a26e8 to 0x8a272c (68 bytes)
//
// 31 xrefs:
// > sub_8A7F28 @ 0x8a80e4
// > sub_8A7F28 @ 0x8a8124
// > ColorAction::setupFromMap @ 0x8b3d60
// > ColorAction::setupFromMap @ 0x8b3d6c
// > ColorAction::setupFromMap @ 0x8b3d78
// > ColorAction::setupFromMap @ 0x8b3d84
// > ColorAction::setupFromMap @ 0x8b3d90
// > ColorAction::setupFromMap @ 0x8b3d9c
// > ColorAction::setupFromMap @ 0x8b3da8
// > ColorAction::setupFromMap @ 0x8b3db4
// > ColorAction::setupFromMap @ 0x8b3dc0
// > ColorAction::setupFromMap @ 0x8b3dcc
// > ColorAction::setupFromMap @ 0x8b3dd8
// > ColorAction::setupFromMap @ 0x8b3de4
// > ColorAction::setupFromMap @ 0x8b3df0
// > ColorAction::setupFromMap @ 0x8b3dfc
// > ColorAction::setupFromMap @ 0x8b3e08
// > ColorAction::setupFromMap @ 0x8b3e14
// > ColorAction::setupFromMap @ 0x8b3e20
// > ColorAction::setupFromMap @ 0x8b3e2c
// > ColorAction::setupFromMap @ 0x8b3e7c
// > ColorAction::writeSaveString @ 0x8b970c
// > GJEffectManager::getPersistentStateString @ 0x8bd9bc
// > GJEffectManager::setupFromString @ 0x8c083c
// > GJEffectManager::setupFromString @ 0x8c09e0
// > GJEffectManager::setupFromString @ 0x8c09fc
// > GJEffectManager::setupFromString @ 0x8c0a3c
// > GJEffectManager::setupFromString @ 0x8c0a64
// > GJEffectManager::setupFromString @ 0x8c0a88
// > GJEffectManager::setupFromString @ 0x8c0aac
// > GJEffectManager::setupFromString @ 0x8c0ad4
//
// 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_8A26E8(void *p)
{
unsigned int *v1; // x3
int v2; // w2
int v3; // w2
if ( !&pthread_create )
{
v3 = *((_DWORD *)p + 4);
*((_DWORD *)p + 4) = v3 - 1;
if ( v3 > 0 )
return;
LABEL_7:
operator delete(p);
return;
}
v1 = (unsigned int *)((char *)p + 16);
do
v2 = __ldaxr(v1);
while ( __stlxr(v2 - 1, v1) );
if ( v2 <= 0 )
goto LABEL_7;
}