//
// cocos2d::CCBMFontConfiguration::purgeKerningDictionary from 0x18004dd30 to 0x18004de7c (332 bytes)
//
// 5 xrefs:
// > cocos2d::CCBMFontConfiguration::~CCBMFontConfiguration @ 0x1800488b5
// > ??> @ 0x1801408f4
// > ??> @ 0x180140904
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bbc2c
//
// 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 11:21:44 +0000
//
void __fastcall cocos2d::CCBMFontConfiguration::purgeKerningDictionary(cocos2d::CCBMFontConfiguration *this)
{
__int64 i; // rbx
__int64 v3; // r8
__int64 v4; // r9
__int64 v5; // r10
__int64 v6; // r11
__int64 v7; // r9
__int64 v8; // r8
__int64 v9; // r9
__int64 v10; // rdx
__int64 v11; // r9
_QWORD *v12; // rdx
__int64 v13; // rdx
__int64 v14; // rcx
for ( i = *((_QWORD *)this + 15); i; i = *((_QWORD *)this + 15) )
{
v3 = *(_QWORD *)(i + 16);
if ( v3 || *(_QWORD *)(i + 24) )
{
v4 = *(_QWORD *)(i + 8);
v5 = i;
v6 = *(_QWORD *)(v4 + 32);
if ( i == *(_QWORD *)(v4 + 24) - v6 )
{
*(_QWORD *)(v4 + 24) = v3 + v6;
v5 = *((_QWORD *)this + 15);
}
v7 = *(_QWORD *)(i + 16);
v8 = *(_QWORD *)(i + 24);
if ( v7 )
{
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v5 + 8) + 32LL) + v7 + 16) = v8;
v8 = *((_QWORD *)this + 15);
}
else
{
*((_QWORD *)this + 15) = v8;
}
v9 = *(_QWORD *)(i + 24);
if ( v9 )
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v8 + 8) + 32LL) + v9 + 8) = *(_QWORD *)(i + 16);
v10 = *(_QWORD *)(*((_QWORD *)this + 15) + 8LL);
v11 = *(_DWORD *)(i + 60) & (unsigned int)(*(_DWORD *)(v10 + 8) - 1);
--*(_DWORD *)(16 * v11 + *(_QWORD *)v10 + 8);
v12 = *(_QWORD **)(*((_QWORD *)this + 15) + 8LL);
if ( *(_QWORD *)(16 * v11 + *v12) == i + 8 )
*(_QWORD *)(*v12 + 16 * v11) = *(_QWORD *)(i + 40);
v13 = *(_QWORD *)(i + 32);
if ( v13 )
*(_QWORD *)(v13 + 32) = *(_QWORD *)(i + 40);
v14 = *(_QWORD *)(i + 40);
if ( v14 )
*(_QWORD *)(v14 + 24) = *(_QWORD *)(i + 32);
--*(_DWORD *)(*(_QWORD *)(*((_QWORD *)this + 15) + 8LL) + 16LL);
}
else
{
free(**(void ***)(i + 8));
free(*(void **)(*((_QWORD *)this + 15) + 8LL));
*((_QWORD *)this + 15) = 0;
}
free((void *)i);
}
}