//
// SetupTriggerPopup::updateCustomEaseLabel from 0x9ea5e8 to 0x9ea7f4 (524 bytes)
//
// 3 xrefs:
// > SetupTriggerPopup::createCustomEasingControls @ 0x9eb184
// > SetupTriggerPopup::onCustomEaseArrow @ 0x9ed960
// > ??> @ 0x8af60
//
// 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
//
void SetupTriggerPopup::updateCustomEaseLabel(SetupTriggerPopup *a1, int a2, int a3)
{
intptr_t v3; // x20
void *v6; // x0
cocos2d::CCObject *v7; // x0
cocos2d::CCLabelBMFont *v8; // x23
cocos2d::CCObject *v9; // x0
float v10; // s1
float v11; // s0
float v12; // s1
cocos2d::CCDataVisitor *v13; // x0
unsigned int *v14; // x1
int v15; // w2
unsigned int *v16; // x1
int v17; // w2
cocos2d::CCDataVisitor *v18; // [xsp+48h] [xbp+48h] BYREF
__int64 v19; // [xsp+50h] [xbp+50h] BYREF
v3 = a2;
sub_D153B8((int)&v18, "Mixed");
if ( a3 != -99999 )
{
GameToolbox::easeToText((GameToolbox *)(unsigned int)a3, (__int64)&v19);
sub_D163D4(&v18, &v19);
v6 = (void *)(v19 - 24);
if ( (__int64 *)(v19 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v16 = (unsigned int *)(v19 - 8);
do
v17 = __ldaxr(v16);
while ( __stlxr(v17 - 1, v16) );
}
else
{
v17 = *(_DWORD *)(v19 - 8);
*(_DWORD *)(v19 - 8) = v17 - 1;
}
if ( v17 <= 0 )
operator delete(v6);
}
}
v7 = cocos2d::CCDictionary::objectForKey(a1->m_customEasingLabels, v3);
v8 = (cocos2d::CCLabelBMFont *)v7;
if ( v7 )
{
v7->__vftable[11].acceptVisitor(v7, v18);
v9 = cocos2d::CCDictionary::objectForKey(a1->m_customEasingScales, v3);
if ( v9 )
{
v10 = *(float *)&v9[1].__vftable;
v11 = v10 * 150.0;
v12 = v10 * 0.7;
}
else
{
v12 = 0.7;
v11 = 150.0;
}
cocos2d::CCLabelBMFont::limitLabelWidth(v8, v11, v12, 0.0);
}
v13 = v18 - 3;
if ( &v18[-3] != (cocos2d::CCDataVisitor *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v14 = (unsigned int *)&v18[-1];
do
v15 = __ldaxr(v14);
while ( __stlxr(v15 - 1, v14) );
}
else
{
v15 = (int)v18[-1].__vftable;
LODWORD(v18[-1].__vftable) = v15 - 1;
}
if ( v15 <= 0 )
operator delete(v13);
}
}