//
// GJBaseGameLayer::asyncMGLoaded from 0x1000f0e60 to 0x1000f0eec (140 bytes)
//
// 1 xrefs:
// > GameManager::finishedLoadingMGAsync @ 0x10036cb35
//
// This function is hookable on this platform (idp: pc, 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 12:21:11 +0000
//
__int64 __fastcall GJBaseGameLayer::asyncMGLoaded(__int64 a1, int a2, double a3)
{
__int64 v4; // rdi
unsigned int v5; // r15d
__int64 v6; // rax
v4 = *(_QWORD *)(a1 + 3976);
if ( v4 )
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v4 + 520LL))(v4);
*(_QWORD *)(a1 + 3976) = 0;
}
if ( a2 > 0 )
{
v5 = 3;
if ( (unsigned int)a2 < 3 )
v5 = a2;
v6 = GJMGLayer::create(v5, a3);
*(_QWORD *)(a1 + 3976) = v6;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v6 + 72LL))(v6, v5);
a3 = (*(double (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 3896) + 464LL))(
*(_QWORD *)(a1 + 3896),
*(_QWORD *)(a1 + 3976),
4294967257LL);
}
return GJBaseGameLayer::updateLevelColors(a1, a3);
}