//
// GJUINode::activeRangeTouchTest from 0x6eee40 to 0x6ef004 (452 bytes)
//
// 2 xrefs:
// > GJUINode::activeTouchTest @ 0x6ef098
// > ??> @ 0x9b9c8
//
// 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 12:51:47 +0000
//
__int64 __fastcall GJUINode::activeRangeTouchTest(__int64 a1, float *a2)
{
float *v4; // x0
float v5; // s8
float v6; // s1
float v7; // s2
float v8; // s0
unsigned int v9; // w22
float v10; // s1
float v11; // s2
float v12; // s1
float v13; // s4
float v14; // s2
float v15; // s1
float v16; // s4
float v17; // s0
float v18; // s1
__int64 v19; // x2
float v21; // s0
float v22; // s2
float v23; // [xsp+40h] [xbp+40h] BYREF
float v24; // [xsp+44h] [xbp+44h]
v4 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 320) + 192LL))(*(_QWORD *)(a1 + 320));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v23, *v4, a2[1] + 40.0);
v5 = *a2;
v6 = v5 - *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 320) + 192LL))(*(_QWORD *)(a1 + 320));
v7 = fabsf(v6);
if ( *(float *)(a1 + 376) > v7 )
{
v8 = v23;
v9 = 0;
goto LABEL_3;
}
v21 = *(float *)(a1 + 372);
if ( v21 < v7 )
{
if ( v6 > 0.0 )
{
v22 = *a2;
v9 = 3;
v8 = v22 - v21;
goto LABEL_3;
}
v8 = v21 + *a2;
}
else
{
v8 = v23;
}
if ( v6 <= 0.0 )
v9 = 2;
else
v9 = 3;
LABEL_3:
v10 = *(float *)(a1 + 344);
v11 = -v10;
v12 = v10 * 0.5;
v13 = v8;
v14 = v11 * 0.5;
if ( v12 <= v8 )
v13 = v12;
if ( v13 > v14 )
{
v14 = v8;
if ( v12 <= v8 )
v14 = v12;
}
v15 = *(float *)(a1 + 348);
v16 = (float)(v15 * 0.5) + 40.0;
v23 = v14;
v17 = 40.0 - (float)(v15 * 0.5);
v18 = v24;
if ( v16 <= v24 )
v18 = v16;
if ( v18 > v17 )
{
v17 = v24;
if ( v16 <= v24 )
v17 = v16;
}
v19 = *(_QWORD *)(a1 + 320);
v24 = v17;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v19 + 344LL))(v19, 1);
(*(void (__fastcall **)(_QWORD, float *))(**(_QWORD **)(a1 + 320) + 184LL))(*(_QWORD *)(a1 + 320), &v23);
return v9;
}