//
// MessagesProfilePage::loadMessagesFinished from 0x8f2d08 to 0x8f2e3c (308 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'MessagesProfilePage::loadMessagesFinished @ 0x8f2e40
// > ??> @ 0xbbf38
// > ??> @ 0x11a5120
//
// 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 MessagesProfilePage::loadMessagesFinished(MessagesProfilePage *a1, cocos2d::CCArray *a2, const char *a3)
{
unsigned int m_sentMessages; // w0
int v6; // w19
cocos2d::ccArray *data; // x0
unsigned int num; // w1
cocos2d::CCObject **arr; // x0
cocos2d::CCObject **v10; // x2
cocos2d::CCObject *v11; // x1
GameLevelManager *v12; // x20
GJAccountManager *v13; // x0
GJUserScore *v14; // x0
if ( MessagesProfilePage::isCorrect(a1, a3) )
{
MessagesProfilePage::setupCommentsBrowser(a1, a2);
a1->m_loadingCircle->setVisible(a1->m_loadingCircle, 0);
a1->m_errorLabel->setVisible(a1->m_errorLabel, 0);
a1->m_refreshButton->setVisible(a1->m_refreshButton, 1);
m_sentMessages = a1->m_sentMessages;
v6 = a2 != nullptr;
if ( m_sentMessages < v6 )
{
if ( (unsigned int)cocos2d::CCArray::count(a2) )
{
if ( a2 )
{
data = a2->data;
v6 = 0;
num = data->num;
if ( data->num )
{
arr = data->arr;
v10 = &arr[num - 1];
while ( v10 >= arr )
{
v11 = *arr;
if ( !*arr )
break;
++arr;
if ( !LOBYTE(v11[6].m_uAutoReleaseCount) )
++v6;
}
}
}
v12 = GameLevelManager::sharedState();
v13 = GJAccountManager::sharedState();
v14 = GameLevelManager::userInfoForAccountID(v12, v13->m_accountID - v13->m_unkInt1);
if ( v14 )
{
if ( v14->m_newMsgCount < v6 )
v14->m_newMsgCount = v6;
}
}
}
}
}