//
// CCTextInputNode::scrollWheel from 0x1001ff8f0 to 0x1001ffc3c (844 bytes)
//
// 2 xrefs:
// > sub_1001FFC60 @ 0x1001ffc64
// > ??> @ 0x1008f55b8
//
// 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:00:45 +0000
//
__int64 __fastcall CCTextInputNode::scrollWheel(_QWORD *a1)
{
int v2; // w8
__int64 result; // x0
float *v4; // x0
float *v5; // x21
__int64 v6; // x20
__n128 v7; // q0
double *v8; // x0
__int64 v9; // x0
__int64 v10; // x0
__int64 v11; // x0
__int64 v12; // x0
char *v13; // x0
char *v14; // x0
unsigned __int64 v15; // x9
__int64 v16; // x10
void **v17; // x11
int v18; // w14
_BOOL4 v19; // w13
bool v20; // zf
int v21; // w14
_BOOL4 v22; // w20
void *v23; // x20
int v24; // w9
void *v25[2]; // [xsp+18h] [xbp-98h] BYREF
char v26; // [xsp+2Fh] [xbp-81h]
float v27[4]; // [xsp+30h] [xbp-80h] BYREF
__int64 v28; // [xsp+40h] [xbp-70h] BYREF
__int64 v29; // [xsp+48h] [xbp-68h] BYREF
__int64 v30; // [xsp+50h] [xbp-60h] BYREF
void *__p[2]; // [xsp+58h] [xbp-58h] BYREF
unsigned __int8 v32; // [xsp+6Fh] [xbp-41h]
v2 = *((_DWORD *)a1 + 175);
if ( (unsigned int)(v2 - 1) < 3 )
goto LABEL_2;
if ( v2 != 5 )
return 0;
v14 = (char *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)a1[72] + 1248LL))(a1[72]);
sub_100009900(__p, v14);
v15 = v32;
if ( (v32 & 0x80u) != 0 )
v15 = (unsigned __int64)__p[1];
if ( v15 )
{
v16 = 0;
v17 = (void **)__p[0];
if ( (v32 & 0x80u) == 0 )
v17 = __p;
while ( 1 )
{
v18 = *((unsigned __int8 *)v17 + v16);
v19 = (unsigned int)(v18 - 58) < 0xFFFFFFF6;
v20 = v18 == 45 && v16 == 0;
v21 = v20 ? 4 : (unsigned int)(v18 - 58) < 0xFFFFFFF6;
if ( (v21 | 4) != 4 )
break;
if ( v15 == ++v16 )
{
v19 = 0;
break;
}
}
v22 = !v19;
if ( (char)v32 < 0 )
goto LABEL_27;
}
else
{
v22 = 0;
if ( (char)v32 < 0 )
LABEL_27:
operator delete(__p[0]);
}
if ( !v22 )
return 0;
LABEL_2:
result = CCTextInputNode::isVisibleInTree((__int64)a1);
if ( !(_DWORD)result )
return result;
result = (*(__int64 (__fastcall **)(_QWORD *))(*a1 + 992LL))(a1);
if ( !(_DWORD)result )
return result;
v4 = cocos2d::CCEGLView::sharedOpenGLView();
v5 = v4;
if ( !v4 )
return 0;
v6 = cocos2d::CCDirector::sharedDirector(v4);
(*(void (__fastcall **)(void **__return_ptr, float *))(*(_QWORD *)v5 + 184LL))(__p, v5);
cocos2d::CCDirector::convertToGL(&v30, v6, __p);
cocos2d::CCNode::convertToNodeSpace(&v29, a1, &v30, v7);
v8 = (double *)(*(__int64 (__fastcall **)(_QWORD *))(*a1 + 328LL))(a1);
sub_100026438(&v28, v8);
sub_1000262CC(v27, *(float *)&v28 * -0.5, *((float *)&v28 + 1) * -0.5, *(float *)&v28, *((float *)&v28 + 1));
result = sub_1000265E4(v27, (float *)&v29);
if ( !(_DWORD)result )
return result;
v9 = sub_1001FEF4C((__int64)a1);
if ( (v9 & 1) != 0 )
return 0;
v10 = cocos2d::CCDirector::sharedDirector(v9);
v11 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 192LL))(v10);
if ( (*(_BYTE *)(v11 + 128) & 1) == 0 )
{
v12 = cocos2d::CCDirector::sharedDirector(v11);
(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v12 + 192LL))(v12);
}
v13 = (char *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)a1[72] + 1248LL))(a1[72]);
sub_100009900(__p, v13);
if ( (char)v32 < 0 )
{
v23 = __p[0];
atof((const char *)__p[0]);
operator delete(v23);
}
else
{
atof((const char *)__p);
}
v24 = *((_DWORD *)a1 + 175);
if ( v24 == 1 )
snprintf((char *)__p, 0x20u, "%.*f");
else
snprintf((char *)__p, 0x20u, "%d");
sub_100009900(v25, (char *)__p);
CCTextInputNode::setString(a1, (__int64 *)v25);
if ( v26 < 0 )
operator delete(v25[0]);
return 1;
}