//
// DailyLevelPage::levelDownloadFinished from 0xa6ed60 to 0xa6ee18 (184 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'DailyLevelPage::levelDownloadFinished @ 0xa6ee1c
// > ??> @ 0x7ba48
// > ??> @ 0x1492408
//
// 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 13:00:22 +0000
//
__int64 __fastcall DailyLevelPage::levelDownloadFinished(__int64 this, GJGameLevel *a2)
{
int v2; // w20
__int64 v3; // x21
unsigned int *v5; // x0
GameLevelManager *v6; // x0
int v7; // w20
unsigned int *v8; // x0
if ( a2 )
{
v2 = *((_DWORD *)a2 + 230) - *((_DWORD *)a2 + 231);
if ( v2 > 0 )
{
v3 = this;
v5 = (unsigned int *)GameLevelManager::sharedState((GameLevelManager *)this);
if ( v2 == (unsigned int)GameLevelManager::getDailyID(v5, *(_DWORD *)(v3 + 732))
|| (v6 = (GameLevelManager *)*((unsigned int *)a2 + 230),
v7 = (_DWORD)v6 - *((_DWORD *)a2 + 231),
v8 = (unsigned int *)GameLevelManager::sharedState(v6),
this = GameLevelManager::getActiveDailyID(v8, *(_DWORD *)(v3 + 732)),
v7 == (_DWORD)this) )
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v3 + 704) + 344LL))(*(_QWORD *)(v3 + 704), 0);
this = *(unsigned __int8 *)(v3 + 728);
if ( !*(_BYTE *)(v3 + 728) )
return (__int64)DailyLevelPage::createDailyNode((DailyLevelPage *)v3, a2, 0, 0.0, 1u);
}
}
}
return this;
}