//
// EditorUI::getNeighbor from 0x1003f2b84 to 0x1003f2c64 (224 bytes)
//
// 13 xrefs:
// > EditorUI::convertKeyBasedOnNeighbors @ 0x100077e2c
// > EditorUI::convertKeyBasedOnNeighbors @ 0x100077e54
// > EditorUI::convertKeyBasedOnNeighbors @ 0x100077e7c
// > EditorUI::convertKeyBasedOnNeighbors @ 0x100077ea4
// > EditorUI::createOutlines @ 0x100078af8
// > EditorUI::createOutlines @ 0x100078b20
// > EditorUI::createOutlines @ 0x100078b48
// > EditorUI::createOutlines @ 0x100078b70
// > EditorUI::createOutlines @ 0x100078b98
// > EditorUI::createOutlines @ 0x100078bc0
// > EditorUI::createOutlines @ 0x100078be8
// > EditorUI::createOutlines @ 0x100078c10
// > EditorUI::processSmartObjectsFromType @ 0x1003f29bc
//
// 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!
cocos2d::CCNode *__fastcall EditorUI::getNeighbor(
EditorUI *a1,
int a2,
cocos2d::CCPoint a3,
GJSmartDirection a4,
cocos2d::CCArray *a5)
{
__int64 v5; // x4
__int64 v6; // x19
float32x2_t *v7; // x20
float32x2_t v8; // kr08_8
unsigned int v9; // w20
cocos2d::CCNode *v10; // x21
int v11; // w24
__int64 v12; // x0
float32x2_t v14; // [xsp+0h] [xbp-50h] BYREF
float32x2_t v15; // [xsp+8h] [xbp-48h] BYREF
v6 = v5;
v7 = *(float32x2_t **)&a4;
GJSmartTemplate::offsetForDir((GJSmartDirection)a5, a2);
sub_1000229DC(v7, &v14, &v15);
v8 = v15;
if ( !(unsigned int)sub_10024A36C(v6) )
return nullptr;
v9 = 0;
while ( 1 )
{
v10 = (cocos2d::CCNode *)sub_10024A388(v6, v9);
v11 = (int)*(float *)((__int64 (__fastcall *)(cocos2d::CCNode *))v10->getPosition)(v10);
v12 = ((__int64 (__fastcall *)(cocos2d::CCNode *))v10->getPosition)(v10);
if ( (int)v8.f32[0] == v11 && v8.i32[1] == *(int *)(v12 + 4) )
break;
if ( ++v9 >= (unsigned int)sub_10024A36C(v6) )
return nullptr;
}
return v10;
}