//
// cocos2d::CCLabelBMFont::kerningAmountForFirst from 0x7d30b8 to 0x7d3184 (204 bytes)
//
// 1 xrefs:
// > cocos2d::CCLabelBMFont::createFontChars @ 0x7d3610
//
// 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
//
int __fastcall cocos2d::CCLabelBMFont::kerningAmountForFirst(cocos2d::CCLabelBMFont *this, int a2, int a3)
{
int result; // r0
_DWORD *v4; // r6
int v5; // r2
unsigned int v6; // r3
unsigned int v7; // r4
int v8; // r2
unsigned int v9; // r3
unsigned int v10; // r4
int v11; // r2
int v12; // r4
_DWORD v13[3]; // [sp+0h] [bp-Ch] BYREF
v13[1] = a2;
v13[2] = a3;
v13[0] = a3 | (a2 << 16);
result = *(_DWORD *)(*((_DWORD *)this + 84) + 88);
if ( result )
{
v4 = *(_DWORD **)(result + 8);
v5 = (LOBYTE(v13[0]) + 17973517 + (HIBYTE(v13[0]) << 24) + (BYTE2(v13[0]) << 16) + (BYTE1(v13[0]) << 8)) ^ 0x7F76D;
v6 = (-1622558010 - v5) ^ (v5 << 8);
v7 = (-17973517 - v5 - v6) ^ (v6 >> 13);
v8 = (v5 - v6 - v7) ^ (v7 >> 12);
v9 = (v6 - v7 - v8) ^ (v8 << 16);
v10 = (v7 - v8 - v9) ^ (v9 >> 5);
v11 = (v8 - v9 - v10) ^ (v10 >> 3);
v12 = *(_DWORD *)(*v4
+ 12
* (((v10 - v11 - ((v9 - v10 - v11) ^ (v11 << 10)))
^ (((v9 - v10 - v11) ^ (v11 << 10)) >> 15))
& (v4[1] - 1)));
if ( v12 )
v12 -= v4[5];
while ( 1 )
{
if ( !v12 )
return 0;
if ( *(_DWORD *)(v12 + 32) == 4 && !memcmp(*(const void **)(v12 + 28), v13, 4u) )
break;
result = *(_DWORD *)(v12 + 24);
if ( !result )
return result;
v12 = result - v4[5];
}
return *(_DWORD *)(v12 + 4);
}
return result;
}