//
// GameManager::unloadIcons from 0x41d5f4 to 0x41d668 (116 bytes)
//
// 4 xrefs:
// > PlayerObject::~PlayerObject @ 0x43fe24
// > SimplePlayer::~SimplePlayer @ 0x50ad30
// > GJItemIcon::~GJItemIcon @ 0x50ad90
// > GJRobotSprite::~GJRobotSprite @ 0x5e6278
//
// 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:47:59 +0000
//
GameManager *__fastcall GameManager::unloadIcons(GameManager *this, int a2, int a3, int a4)
{
int **v4; // r6
GameManager *result; // r0
int **v7; // r0
int v8; // r1
int v9; // [sp+4h] [bp-Ch] BYREF
int v10[2]; // [sp+8h] [bp-8h] BYREF
v10[0] = a3;
v10[1] = a4;
v4 = (int **)((char *)this + 936);
v9 = a2;
result = (GameManager *)std::__tree>,std::__map_value_compare>,std::less,true>,std::allocator>>>::find(
(int)this + 936,
&v9);
if ( (GameManager *)((char *)this + 940) != result )
{
for ( v10[0] = 0; v10[0] <= 8; ++v10[0] )
{
v7 = (int **)std::map>::operator[](v4, &v9);
v8 = *std::map::operator[](v7, v10);
if ( v8 > 0 )
GameManager::unloadIcon(this, v8, v10[0], v9);
}
return (GameManager *)std::__tree>,std::__map_value_compare>,std::less,true>,std::allocator>>>::__erase_unique(
(int)v4,
&v9);
}
return result;
}