//
// NewsPopup::refreshFromManager from 0x6c3028 to 0x6c309e (118 bytes)
//
// 2 xrefs:
// > NewsPopup::init @ 0x6c3584
// > NewsPopup::musicActionFinished @ 0x6c35f4
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:56:52 +0000
//
int __fastcall NewsPopup::refreshFromManager(NewsPopup *this)
{
void **v1; // r5
int *v3; // r0
GameManager *v4; // r0
int v5; // r5
GameManager *v6; // r0
MusicDownloadManager *v7; // r5
v1 = (void **)((char *)this + 528);
v3 = (int *)MusicDownloadManager::sharedState(this);
if ( v1 != (void **)(v3 + 135) )
v3 = std::vector::assign(v1, v3[135], v3[136]);
v4 = (GameManager *)MusicDownloadManager::sharedState((MusicDownloadManager *)v3);
v5 = *((_DWORD *)v4 + 139);
v6 = (GameManager *)GameManager::sharedState(v4);
if ( v5 > *((_DWORD *)v6 + 230) )
{
v7 = (MusicDownloadManager *)GameManager::sharedState(v6);
*((_DWORD *)v7 + 230) = *(_DWORD *)(MusicDownloadManager::sharedState(v7) + 556);
}
if ( *((_DWORD *)this + 135) >= -858993459 * ((*((_DWORD *)this + 133) - *((_DWORD *)this + 132)) >> 3) )
*((_DWORD *)this + 135) = 0;
return NewsPopup::rebuildPage(this, *((_DWORD *)this + 135));
}