//
// cocos2d::CCBMFontConfiguration::purgeKerningDictionary from 0x10039646c to 0x100396584 (280 bytes)
//
// 1 xrefs:
// > cocos2d::CCBMFontConfiguration::dCCBMFontConfiguration @ 0x1003962e0
//
// This function is hookable on this platform (idp: arm, 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:03:40 +0000
//
void __fastcall cocos2d::CCBMFontConfiguration::purgeKerningDictionary(__int64 a1)
{
_QWORD *v1; // x19
__int64 v2; // x20
void ***v3; // x8
__int64 v4; // x10
__int64 v5; // x11
__int64 v6; // x9
__int64 v7; // x11
__int64 v8; // x9
_QWORD *v9; // x12
__int64 v10; // x9
__int64 v11; // x9
__int64 v12; // x10
__int64 v13; // x8
__int64 v14; // x10
v1 = (_QWORD *)(a1 + 112);
v2 = *(_QWORD *)(a1 + 112);
if ( v2 )
{
do
{
v3 = (void ***)(v2 + 8);
v4 = *(_QWORD *)(v2 + 16);
if ( v4 || *(_QWORD *)(v2 + 24) )
{
v5 = *(_QWORD *)(v2 + 8);
v6 = *(_QWORD *)(v5 + 32);
if ( v2 == *(_QWORD *)(v5 + 24) - v6 )
*(_QWORD *)(v5 + 24) = v6 + v4;
v7 = *(_QWORD *)(v2 + 24);
v8 = v6 + v4 + 16;
if ( v4 )
v9 = (_QWORD *)v8;
else
v9 = v1;
if ( v4 )
v10 = v2;
else
v10 = *(_QWORD *)(v2 + 24);
*v9 = v7;
v11 = *(_QWORD *)(v10 + 8);
if ( v7 )
*(_QWORD *)(*(_QWORD *)(v11 + 32) + v7 + 8) = v4;
v12 = *(_QWORD *)v11 + 16LL * ((unsigned int)(*(_DWORD *)(v11 + 8) - 1) & *(_DWORD *)(v2 + 60));
--*(_DWORD *)(v12 + 8);
if ( *(void ****)v12 == v3 )
*(_QWORD *)v12 = *(_QWORD *)(v2 + 40);
v13 = *(_QWORD *)(v2 + 32);
v14 = *(_QWORD *)(v2 + 40);
if ( v13 )
*(_QWORD *)(v13 + 32) = v14;
if ( v14 )
*(_QWORD *)(v14 + 24) = v13;
--*(_DWORD *)(v11 + 16);
}
else
{
free(**v3);
free(*(void **)(*v1 + 8LL));
*v1 = 0;
}
free((void *)v2);
v2 = *v1;
}
while ( *v1 );
}
}