//
// SetupShakePopup::updateShakeLabel from 0x959458 to 0x9595c0 (360 bytes)
//
// 3 xrefs:
// > SetupShakePopup::init @ 0x959e40
// > SetupShakePopup::sliderChanged @ 0x95a444
// > ??> @ 0x3e028
//
// 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!
void SetupShakePopup::updateShakeLabel(SetupShakePopup *a1, bool a2)
{
_BOOL8 v2; // x1
float m_strength; // s0
const unsigned __int8 *v5; // x0
cocos2d::CCString *v6; // x0
char *CString; // x1
CCTextInputNode *m_strengthInput; // x22
unsigned __int8 *v9; // x0
cocos2d::CCString *v10; // x0
unsigned int *v11; // x2
int v12; // w1
const unsigned __int8 *v13[2]; // [xsp+40h] [xbp+40h] BYREF
v2 = a2;
m_strength = a1->m_strength;
v5 = (const unsigned __int8 *)_stack_chk_guard;
a1->m_disableTextDelegate = 1;
v13[1] = v5;
if ( m_strength == -99999.0 )
{
CString = "Mixed";
}
else if ( !a2 && (*(_QWORD *)&a2 = (unsigned int)(int)m_strength, (float)(m_strength - (float)a2) == 0.0) )
{
v10 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)a2);
CString = (char *)cocos2d::CCString::getCString(v10);
}
else
{
v6 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%.02f",
(const char *)a2,
m_strength);
CString = (char *)cocos2d::CCString::getCString(v6);
}
m_strengthInput = a1->m_strengthInput;
sub_D153B8((int)v13, CString);
CCTextInputNode::setString(m_strengthInput, v13);
v9 = (unsigned __int8 *)(v13[0] - 24);
if ( (__int64 *)v13[0] - 3 != &qword_124B6B0 )
{
if ( &pthread_create )
{
v11 = (unsigned int *)(v13[0] - 8);
do
v12 = __ldaxr(v11);
while ( __stlxr(v12 - 1, v11) );
}
else
{
v12 = *((_DWORD *)v13[0] - 2);
*((_DWORD *)v13[0] - 2) = v12 - 1;
}
if ( v12 <= 0 )
operator delete(v9);
}
a1->m_disableTextDelegate = 0;
}