//
// GameLevelManager::evictDeathDataCache from 0x4b2640 to 0x4b2776 (310 bytes)
//
// 3 xrefs:
// > GameLevelManager::deleteLevel @ 0x4b2fa4
// > GameLevelManager::forceDeathDataRefetch @ 0x4c752e
// > DeathStatsPopup::showResult @ 0x76fcaa
//
// 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:50:04 +0000
//
unsigned int __fastcall GameLevelManager::evictDeathDataCache(GameLevelManager *this, unsigned int a2)
{
unsigned int v2; // r4
unsigned int v5; // r6
unsigned int v6; // r11
int v7; // r9
_DWORD **v8; // r3
_DWORD *i; // r5
unsigned int v10; // r0
int v11; // r1
unsigned int v12; // r0
int v13; // r1
int v15; // r8
unsigned int v16; // r0
int v17; // r11
_DWORD *j; // r10
unsigned int v19; // r0
int v20; // r1
unsigned int v21; // r0
int v22; // r1
_DWORD *v23; // [sp+4h] [bp-10h]
unsigned int v24[2]; // [sp+Ch] [bp-8h] BYREF
v2 = *((_DWORD *)this + 77);
v24[0] = a2;
if ( v2 )
{
v5 = v2 - 1;
v6 = ((v2 - 1) & v2) != 0 ? a2 % v2 : v5 & a2;
v7 = *((_DWORD *)this + 76);
v8 = *(_DWORD ***)(v7 + 4 * v6);
if ( v8 )
{
for ( i = *v8; i; i = (_DWORD *)*i )
{
v10 = i[1];
v11 = ((v2 - 1) & v2) != 0 ? v10 % v2 : v5 & v10;
if ( v11 != v6 )
break;
if ( i[2] == a2 )
{
v15 = v5 & v2;
v16 = i[1];
v23 = (_DWORD *)*i;
if ( (v5 & v2) != 0 )
v17 = v16 % v2;
else
v17 = v5 & v16;
for ( j = *(_DWORD **)(v7 + 4 * v17); (_DWORD *)*j != i; j = (_DWORD *)*j )
;
if ( j == (_DWORD *)((char *)this + 312)
|| ((v12 = j[1], v15) ? (v13 = v12 % v2) : (v13 = v5 & v12), v13 != v17) )
{
if ( !v23 || ((v21 = v23[1], v15) ? (v22 = v21 % v2) : (v22 = v5 & v21), v22 != v17) )
*(_DWORD *)(v7 + 4 * v17) = 0;
}
if ( *i )
{
v19 = *(_DWORD *)(*i + 4);
if ( v15 )
v20 = v19 % v2;
else
v20 = v5 & v19;
if ( v20 != v17 )
*(_DWORD *)(*((_DWORD *)this + 76) + 4 * v20) = j;
}
*j = *i;
*i = 0;
--*((_DWORD *)this + 79);
operator delete(i);
break;
}
}
}
}
std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::__erase_unique(
(int *)this + 66,
v24);
return std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::__erase_unique(
(int *)this + 71,
v24);
}