//
// EditorUI::getNeighbor from 0x100044590 to 0x100044652 (194 bytes)
//
// 13 xrefs:
// > EditorUI::processSmartObjectsFromType @ 0x100044301
// > EditorUI::convertKeyBasedOnNeighbors @ 0x100613a56
// > EditorUI::convertKeyBasedOnNeighbors @ 0x100613a7d
// > EditorUI::convertKeyBasedOnNeighbors @ 0x100613aa4
// > EditorUI::convertKeyBasedOnNeighbors @ 0x100613acb
// > EditorUI::createOutlines @ 0x100614960
// > EditorUI::createOutlines @ 0x10061498d
// > EditorUI::createOutlines @ 0x1006149ba
// > EditorUI::createOutlines @ 0x1006149e7
// > EditorUI::createOutlines @ 0x100614a18
// > EditorUI::createOutlines @ 0x100614a46
// > EditorUI::createOutlines @ 0x100614a74
// > EditorUI::createOutlines @ 0x100614aa2
//
// 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; // r8
__int64 v6; // rbx
__int64 v7; // r14
int v8; // r13d
cocos2d::CCNode *v9; // r12
unsigned int v10; // r15d
int v11; // r14d
__int64 v12; // rax
char v14; // [rsp+4h] [rbp-3Ch] BYREF
float v15[2]; // [rsp+Ch] [rbp-34h] BYREF
int v16; // [rsp+14h] [rbp-2Ch]
double v17; // 0:xmm0_8.8
v6 = v5;
v7 = *(_QWORD *)&a4;
*(cocos2d::CCPoint *)&v17 = GJSmartTemplate::offsetForDir((GJSmartDirection)&v14, (int)a5);
sub_10028CCE0(v15, v7);
v8 = (int)v15[0];
v16 = (int)v15[1];
v9 = nullptr;
if ( (unsigned int)sub_100720070(v6) )
{
v10 = 0;
while ( 1 )
{
v9 = (cocos2d::CCNode *)sub_1007200C0(v6, v10);
v11 = (int)*(float *)((__int64 (__fastcall *)(cocos2d::CCNode *, double))v9->getPosition)(v9, v17);
v12 = ((__int64 (__fastcall *)(cocos2d::CCNode *))v9->getPosition)(v9);
if ( v8 == v11 && v16 == (int)*(float *)(v12 + 4) )
break;
if ( ++v10 >= (unsigned int)sub_100720070(v6) )
return nullptr;
}
}
return v9;
}