//
// LevelListLayer::onShare from 0xa7a904 to 0xa7aa70 (364 bytes)
//
// 3 xrefs:
// > ??> @ 0x68d48
// > LevelListLayer::init @ 0xa766d4
// > ??> @ 0x122b678
//
// 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 LevelListLayer::onShare(LevelListLayer *a1, cocos2d::CCObject *a2)
{
CCTextInputNode *m_titleInput; // x0
GJAccountManager *v4; // x0
ShareListLayer *v5; // x0
FLAlertLayer *v6; // x20
void *v7; // x0
unsigned int *v8; // x2
int v9; // w1
__int64 v10; // [xsp+30h] [xbp+30h] BYREF
if ( !a1->m_exiting )
{
m_titleInput = a1->m_titleInput;
if ( m_titleInput )
m_titleInput->onClickTrackNode(m_titleInput, 0);
v4 = GJAccountManager::sharedState();
if ( v4->m_accountID - v4->m_unkInt1 <= 0 )
{
sub_D153B8(
(int)&v10,
"You need an account to share lists. You can create one for free from settings in the main menu.");
v6 = FLAlertLayer::create(0, (__int64)"Account Needed", (__int64)&v10);
v7 = (void *)(v10 - 24);
if ( (__int64 *)(v10 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v8 = (unsigned int *)(v10 - 8);
do
v9 = __ldaxr(v8);
while ( __stlxr(v9 - 1, v8) );
}
else
{
v9 = *(_DWORD *)(v10 - 8);
*(_DWORD *)(v10 - 8) = v9 - 1;
}
if ( v9 <= 0 )
operator delete(v7);
}
v6->show(v6);
}
else
{
v5 = ShareListLayer::create(a1->m_levelList);
v5->show(v5);
}
}
}