//
// sub_7E5F10 from 0x7e5f10 to 0x7e5f54 (68 bytes)
//
// 21 xrefs:
// > ShareCommentLayer::uploadActionFinished @ 0x7e621c
// > ShareCommentLayer::uploadActionFailed @ 0x7e632c
// > ShareCommentLayer::onShare @ 0x7e6448
// > ShareCommentLayer::onShare @ 0x7e67f8
// > ShareCommentLayer::init @ 0x7e7ae4
// > ShareCommentLayer::init @ 0x7e7b00
// > ShareCommentLayer::init @ 0x7e7b1c
// > ShareCommentLayer::init @ 0x7e7b38
// > ShareCommentLayer::init @ 0x7e7b60
// > ShareCommentLayer::init @ 0x7e7b7c
// > ShareCommentLayer::init @ 0x7e7bac
// > ShareCommentLayer::init @ 0x7e7bc8
// > ShareCommentLayer::init @ 0x7e7c00
// > ShareCommentLayer::create @ 0x7e7f10
// > ShareCommentLayer::create @ 0x7e7f2c
// > ShareCommentLayer::onClear @ 0x7e80c8
// > ShareCommentLayer::onClear @ 0x7e80f4
// > ShareCommentLayer::textInputClosed @ 0x7e825c
// > ShareCommentLayer::textInputClosed @ 0x7e8278
// > ShareCommentLayer::textChanged @ 0x7e83e4
// > ShareCommentLayer::textChanged @ 0x7e8400
//
// 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_7E5F10(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;
}