//
// sub_91D63C from 0x91d63c to 0x91d680 (68 bytes)
//
// 15 xrefs:
// > GauntletLayer::loadLevelsFailed @ 0x91d8a0
// > GauntletSprite::addNormalSprite @ 0x91da50
// > GauntletSprite::addLockedSprite @ 0x91dd60
// > GauntletSprite::addLockedSprite @ 0x91dd7c
// > GauntletLayer::unlockActiveItem @ 0x91e1e8
// > GauntletLayer::setupGauntlet @ 0x91f24c
// > GauntletLayer::setupGauntlet @ 0x91f26c
// > GauntletLayer::setupGauntlet @ 0x91f28c
// > GauntletLayer::setupGauntlet @ 0x91f2ac
// > GauntletLayer::setupGauntlet @ 0x91f2ec
// > GauntletLayer::setupGauntlet @ 0x91f30c
// > GauntletLayer::init @ 0x91fa44
// > GauntletLayer::init @ 0x91fa70
// > GauntletLayer::init @ 0x91fa94
// > GauntletLayer::loadLevelsFinished @ 0x91fdf0
//
// 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_91D63C(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;
}