//
// ShareCommentLayer::textInputClosed from 0x7e8100 to 0x7e8290 (400 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'ShareCommentLayer::textInputClosed @ 0x7e8294
// > ??> @ 0x93108
// > ??> @ 0x1183668
//
// 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 ShareCommentLayer::textInputClosed(ShareCommentLayer *a1, CCTextInputNode *a2)
{
void *v3; // x0
char *v4; // x0
unsigned int *v5; // x1
int v6; // w2
unsigned int *v7; // x1
int v8; // w2
char *v9; // [xsp+48h] [xbp+48h] BYREF
__int64 v10; // [xsp+50h] [xbp+50h] BYREF
CCTextInputNode::getString(a2, (__int64)&v9);
sub_D18EA8(&a1->m_descText, &v9);
sub_D153B8((int)&v10, v9);
ShareCommentLayer::updateDescText(a1, (__int64)&v10);
v3 = (void *)(v10 - 24);
if ( (__int64 *)(v10 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v5 = (unsigned int *)(v10 - 8);
do
v6 = __ldaxr(v5);
while ( __stlxr(v6 - 1, v5) );
}
else
{
v6 = *(_DWORD *)(v10 - 8);
*(_DWORD *)(v10 - 8) = v6 - 1;
}
if ( v6 <= 0 )
operator delete(v3);
}
v4 = v9 - 24;
if ( v9 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v7 = (unsigned int *)(v9 - 8);
do
v8 = __ldaxr(v7);
while ( __stlxr(v8 - 1, v7) );
}
else
{
v8 = *((_DWORD *)v9 - 2);
*((_DWORD *)v9 - 2) = v8 - 1;
}
if ( v8 <= 0 )
operator delete(v4);
}
}