//
// sub_9467D0 from 0x9467d0 to 0x946814 (68 bytes)
//
// 26 xrefs:
// > SecretLayer4::onChest01 @ 0x946970
// > SecretLayer4::showFirstDialog @ 0x946e64
// > SecretLayer4::showFirstDialog @ 0x946e8c
// > SecretLayer4::textInputOpened @ 0x947108
// > SecretLayer4::textInputOpened @ 0x947124
// > SecretLayer4::showDialog @ 0x947bf0
// > SecretLayer4::showDialog @ 0x947c18
// > SecretLayer4::updateSearchLabel @ 0x94804c
// > SecretLayer4::updateSearchLabel @ 0x94807c
// > SecretLayer4::updateSearchLabel @ 0x9480a0
// > SecretLayer4::updateSearchLabel @ 0x9480dc
// > SecretLayer4::textInputClosed @ 0x9481c8
// > SecretLayer4::textChanged @ 0x9482b4
// > SecretLayer4::getThreadMessage @ 0x9488ac
// > SecretLayer4::getErrorMessage @ 0x949160
// > SecretLayer4::onSubmit @ 0x949ba0
// > SecretLayer4::onSubmit @ 0x949f98
// > SecretLayer4::onSubmit @ 0x94a128
// > SecretLayer4::onSubmit @ 0x94a144
// > SecretLayer4::onSubmit @ 0x94a170
// > SecretLayer4::onSubmit @ 0x94a18c
// > SecretLayer4::onSubmit @ 0x94a264
// > SecretLayer4::onSubmit @ 0x94a2d8
// > SecretLayer4::init @ 0x94b44c
// > SecretLayer4::init @ 0x94b474
// > SecretLayer4::init @ 0x94b4a4
//
// 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_9467D0(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;
}