//
// ShareCommentLayer::textInputClosed from 0x9103d0 to 0x910558 (392 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'ShareCommentLayer::textInputClosed @ 0x91055c
// > ??> @ 0xc25c0
// > ??> @ 0x1466db0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:57:16 +0000
//
__int64 __fastcall ShareCommentLayer::textInputClosed(ShareCommentLayer *this, CCTextInputNode *a2)
{
__int64 *v3; // x0
const char *v4; // x19
size_t v5; // x0
size_t v6; // x20
unsigned __int64 v7; // x22
char *v8; // x3
__int64 v10[2]; // [xsp+48h] [xbp+48h] BYREF
void *v11; // [xsp+58h] [xbp+58h]
unsigned __int64 v12; // [xsp+60h] [xbp+60h] BYREF
size_t v13; // [xsp+68h] [xbp+68h]
void *v14; // [xsp+70h] [xbp+70h]
CCTextInputNode::getString(a2, v10);
v3 = (__int64 *)((char *)this + 728);
if ( (__int64 *)((char *)this + 728) != v10 )
{
if ( (v10[0] & 1) != 0 )
std::string::assign(v3, v11, v10[1]);
else
std::string::assign(v3, (char *)v10 + 1, LOBYTE(v10[0]) >> 1);
}
v4 = (char *)v10 + 1;
if ( (v10[0] & 1) != 0 )
v4 = (const char *)v11;
v12 = 0;
v13 = 0;
v14 = nullptr;
v5 = strlen(v4);
v6 = v5;
if ( v5 > 0xFFFFFFFFFFFFFFEFLL )
sub_62D03C();
if ( v5 > 0x16 )
{
v7 = (v5 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v8 = (char *)operator new(v7);
v14 = v8;
v13 = v6;
v12 = v7 | 1;
LABEL_9:
v8 = (char *)memcpy(v8, v4, v6);
goto LABEL_10;
}
LOBYTE(v12) = 2 * v5;
v8 = (char *)&v12 + 1;
if ( v5 )
goto LABEL_9;
LABEL_10:
v8[v6] = 0;
ShareCommentLayer::updateDescText(this, (__int64 *)&v12);
if ( (v12 & 1) != 0 )
operator delete(v14);
if ( (v10[0] & 1) != 0 )
operator delete(v11);
return _stack_chk_guard;
}