//
// SetupMGTrigger::textChanged from 0x10038f4dc to 0x10038f694 (440 bytes)
//
// 2 xrefs:
// > sub_10038F694 @ 0x10038f698
// > ??> @ 0x1009400c8
//
// 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:03:37 +0000
//
__int64 __fastcall SetupMGTrigger::textChanged(__int64 result, __int64 a2)
{
__int64 v3; // x19
int v4; // w20
double v5; // d8
char *v6; // x21
__int64 v7; // x0
float v8; // s0
_BOOL4 v9; // w8
_BOOL4 v10; // w9
float v11; // s2
float v12; // s0
char *v13; // x20
float v14; // s0
void *v15; // x0
float v16; // s1
_BOOL4 v17; // w8
_BOOL4 v18; // w9
char *v19[2]; // [xsp+8h] [xbp-48h] BYREF
char v20; // [xsp+1Fh] [xbp-31h]
if ( (*(_BYTE *)(result + 744) & 1) == 0 )
{
v3 = result;
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
if ( (_DWORD)result == 3 )
{
CCTextInputNode::getString(a2, v19);
if ( v20 < 0 )
{
v13 = v19[0];
v5 = atof(v19[0]);
operator delete(v13);
}
else
{
v5 = atof((const char *)v19);
}
v14 = v5;
v15 = sub_1003065B0("%.02f", v14);
*(float *)(v3 + 1032) = cocos2d::CCString::floatValue((__int64)v15);
sub_10038F3AC(v3);
v7 = *(_QWORD *)(v3 + 1024);
v12 = *(float *)(v3 + 1032) / 10.0;
v16 = 1.0;
v17 = v12 >= 1.0;
v18 = v12 > 0.0 || v12 >= 1.0;
if ( v12 <= 0.0 )
v17 = 1;
if ( !v18 )
v16 = 0.0;
if ( v17 )
v12 = v16;
}
else
{
if ( (_DWORD)result != 1 )
return result;
CCTextInputNode::getString(a2, v19);
if ( v20 < 0 )
{
v6 = v19[0];
v4 = atoi(v19[0]);
operator delete(v6);
}
else
{
v4 = atoi((const char *)v19);
}
*(_DWORD *)(v3 + 1088) = (int)(float)((float)v4 * 3.0);
sub_10038F414(v3);
v7 = *(_QWORD *)(v3 + 1080);
v8 = (float)(floorf((float)*(int *)(v3 + 1088) / 3.0) / 200.0) + 0.5;
v9 = v8 >= 1.0;
v10 = v8 > 0.0 || v8 >= 1.0;
if ( v8 <= 0.0 )
v9 = 1;
v11 = 0.0;
if ( v10 )
v11 = 1.0;
if ( v9 )
v8 = v11;
v12 = fminf(v8, 1.0);
}
return Slider::setValue(v7, v12);
}
return result;
}