//
// cocos2d::CCBMFontConfiguration::purgeFontDefDictionary from 0x7d2ee6 to 0x7d2fba (212 bytes)
//
// 1 xrefs:
// > cocos2d::CCBMFontConfiguration::~CCBMFontConfiguration @ 0x7d33f2
//
// 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 12:00:36 +0000
//
void __fastcall cocos2d::CCBMFontConfiguration::purgeFontDefDictionary(cocos2d::CCBMFontConfiguration *this)
{
_DWORD *v2; // r4
_DWORD *v3; // r6
int v4; // lr
int v5; // r3
int v6; // r2
int v7; // r3
int v8; // r1
int v9; // r2
int v10; // r1
_DWORD *v11; // r1
int v12; // r3
int v13; // r2
int v14; // r3
int v15; // r3
_DWORD *v16; // r3
v2 = *((_DWORD **)this + 13);
if ( v2 )
v3 = (_DWORD *)v2[10];
else
v3 = nullptr;
while ( v2 )
{
v4 = v2[9];
v5 = *((_DWORD *)this + 13);
if ( v4 || v2[10] )
{
v6 = *(_DWORD *)(v5 + 32);
v7 = *(_DWORD *)(v6 + 20);
if ( v2 == (_DWORD *)(*(_DWORD *)(v6 + 16) - v7) )
*(_DWORD *)(v6 + 16) = v7 + v4;
v8 = v2[9];
v9 = v2[10];
if ( v8 )
*(_DWORD *)(*(_DWORD *)(*(_DWORD *)(*((_DWORD *)this + 13) + 32) + 20) + v8 + 8) = v9;
else
*((_DWORD *)this + 13) = v9;
v10 = v2[10];
if ( v10 )
*(_DWORD *)(*(_DWORD *)(*(_DWORD *)(*((_DWORD *)this + 13) + 32) + 20) + v10 + 4) = v2[9];
v11 = *(_DWORD **)(*((_DWORD *)this + 13) + 32);
v12 = 12 * (v2[15] & (v11[1] - 1));
--*(_DWORD *)(*v11 + v12 + 4);
v13 = **(_DWORD **)(*((_DWORD *)this + 13) + 32);
if ( *(_DWORD **)(v13 + v12) == v2 + 8 )
*(_DWORD *)(v13 + v12) = v2[12];
v14 = v2[11];
if ( v14 )
*(_DWORD *)(v14 + 16) = v2[12];
v15 = v2[12];
if ( v15 )
*(_DWORD *)(v15 + 12) = v2[11];
--*(_DWORD *)(*(_DWORD *)(*((_DWORD *)this + 13) + 32) + 12);
}
else
{
free(**(void ***)(v5 + 32));
free(*(void **)(*((_DWORD *)this + 13) + 32));
*((_DWORD *)this + 13) = 0;
}
free(v2);
if ( v3 )
v16 = (_DWORD *)v3[10];
else
v16 = nullptr;
v2 = v3;
v3 = v16;
}
}