//
// cocos2d::CCLabelBMFont::getLetterPosXRight from 0x1005db2d0 to 0x1005db377 (167 bytes)
//
// 3 xrefs:
// > CCTextInputNode::updateCursorPosition @ 0x1000a0986
// > CCTextInputNode::updateCursorPosition @ 0x1000a0a26
// > CCTextInputNode::updateCursorPosition @ 0x1000a0b54
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// local variable allocation has failed, the output may be wrong!
float __fastcall cocos2d::CCLabelBMFont::getLetterPosXRight(
cocos2d::CCLabelBMFont *a1,
cocos2d::CCSprite *a2,
float a3,
bool a4)
{
_BOOL4 v4; // r15d
float *v5; // rax
__m128 v6; // xmm2
__m128 v7; // xmm3
__m128 v8; // xmm0
__m128 v9; // xmm1
float *v10; // rax
float m_fScaleX; // xmm0_4
float v13; // [rsp+0h] [rbp-30h]
float v14; // [rsp+14h] [rbp-1Ch]
v4 = a4;
v5 = (float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a2->getContentSize)(a2);
v6 = (__m128)*(unsigned int *)v5;
if ( v4 )
{
v13 = *v5;
}
else
{
v7 = *(__m128 *)&a3;
v7.f32[0] = a3 * 1.5;
v8.i32[0] = 0;
v9 = _mm_cmpgt_ss(v6, v8);
LODWORD(v13) = _mm_andnot_ps(v9, v7).u32[0] | v9.i32[0] & v6.i32[0];
}
v10 = (float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a2->getPosition)(a2);
m_fScaleX = a1->m_fScaleX;
v14 = m_fScaleX * *v10;
return (float)((float)(v13 * m_fScaleX)
* *(float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a2->getAnchorPoint)(a2))
+ v14;
}