//
// GJMessageCell::onDeleteMessage from 0x60ae54 to 0x60afbc (360 bytes)
//
// 3 xrefs:
// > ??> @ 0x7cbc0
// > GJMessageCell::loadFromMessage @ 0x61d03c
// > ??> @ 0x122c2f8
//
// 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 GJMessageCell::onDeleteMessage(GJMessageCell *a1, cocos2d::CCObject *a2)
{
int v2; // w20
GJUserMessage *m_message; // x0
FLAlertLayer *v4; // x20
void *v5; // x0
unsigned int *v6; // x2
int v7; // w1
__int64 v8; // [xsp+40h] [xbp+40h] BYREF
v2 = (int)a1;
m_message = a1->m_message;
if ( m_message && m_message->m_accountID > 0 )
{
sub_D153B8((int)&v8, "Are you sure you want to delete this message?");
v4 = FLAlertLayer::create(v2 + 536, (__int64)"Delete", (__int64)&v8);
v5 = (void *)(v8 - 24);
if ( (__int64 *)(v8 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v6 = (unsigned int *)(v8 - 8);
do
v7 = __ldaxr(v6);
while ( __stlxr(v7 - 1, v6) );
}
else
{
v7 = *(_DWORD *)(v8 - 8);
*(_DWORD *)(v8 - 8) = v7 - 1;
}
if ( v7 <= 0 )
operator delete(v5);
}
ButtonSprite::updateBGImage(v4->m_button2, "GJ_button_06.png");
v4->setTag(v4, 1);
v4->show(v4);
}
}