//
// SetupShakePopup::textChanged from 0x100450f30 to 0x100451160 (560 bytes)
//
// 2 xrefs:
// > sub_100451160 @ 0x100451164
// > ??> @ 0x1009663e8
//
// 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:05:20 +0000
//
__int64 __fastcall SetupShakePopup::textChanged(__int64 result, __int64 a2)
{
float *v3; // x19
double v4; // d8
double v5; // d8
double v6; // d8
char *v7; // x20
float v8; // s0
void *v9; // x0
float *v10; // x20
float v11; // s8
__int64 *v12; // x8
char *v13; // x20
float v14; // s0
void *v15; // x0
char *v16; // x20
float v17; // s0
void *v18; // x0
__int64 v19; // x0
float v20; // s0
float v21; // s1
_BOOL4 v22; // w8
_BOOL4 v23; // w9
char *v24[2]; // [xsp+8h] [xbp-38h] BYREF
char v25; // [xsp+1Fh] [xbp-21h]
if ( (*(_BYTE *)(result + 744) & 1) == 0 )
{
v3 = (float *)result;
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 5 )
{
CCTextInputNode::getString(a2, v24);
if ( v25 < 0 )
{
v7 = v24[0];
v4 = atof(v24[0]);
operator delete(v7);
}
else
{
v4 = atof((const char *)v24);
}
v8 = v4;
v9 = sub_1003065B0("%.02f", v8);
v10 = v3 + 258;
v11 = 10.0;
v3[258] = fminf(fmaxf(cocos2d::CCString::floatValue((__int64)v9), 0.0), 10.0);
sub_100450DF8((__int64)v3);
v12 = (__int64 *)(v3 + 256);
}
else if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 8 )
{
CCTextInputNode::getString(a2, v24);
if ( v25 < 0 )
{
v13 = v24[0];
v5 = atof(v24[0]);
operator delete(v13);
}
else
{
v5 = atof((const char *)v24);
}
v14 = v5;
v15 = sub_1003065B0("%.02f", v14);
v3[270] = fminf(fmaxf(cocos2d::CCString::floatValue((__int64)v15), 0.0), 0.2);
sub_100450E60((__int64)v3);
v12 = (__int64 *)(v3 + 268);
v10 = v3 + 258;
v11 = 0.1;
}
else
{
CCTextInputNode::getString(a2, v24);
if ( v25 < 0 )
{
v16 = v24[0];
v6 = atof(v24[0]);
operator delete(v16);
}
else
{
v6 = atof((const char *)v24);
}
v17 = v6;
v18 = sub_1003065B0("%.02f", v17);
v10 = v3 + 264;
v3[264] = fminf(fmaxf(cocos2d::CCString::floatValue((__int64)v18), 0.0), 100.0);
sub_100450EC8((__int64)v3);
v12 = (__int64 *)(v3 + 262);
v11 = 5.0;
}
v19 = *v12;
v20 = *v10 / v11;
v21 = 1.0;
v22 = v20 >= 1.0;
v23 = v20 > 0.0 || v20 >= 1.0;
if ( v20 <= 0.0 )
v22 = 1;
if ( !v23 )
v21 = 0.0;
if ( v22 )
v20 = v21;
return Slider::setValue(v19, v20);
}
return result;
}